Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SVD·Ö½âCʵÏÖ

int svd(int m,int n,int withu,int withv,double eps,double tol,
double *a, double *q, double *u, double *v, double *vt)
{

int i,j,k,l,l1,iter,retval;
double c,f,g,h,s,x,y,z;
double *e;

e = (double *)calloc(n,sizeof(double));

retval = 0;
/* Copy 'a' to 'u' */
for (i=0;i<m;i++) {
for (j=0;j<n;j++)
u[i*n + j] = a[i*n + j];
}

/* Householder's reduction to bidiagonal form. */
g = x = 0.0;

for (i=0;i<n;i++) {

e[i] = g;
s = 0.0;
l = i+1;

for (j=i;j<m;j++)
s += (u[j*n+i]*u[j*n+i]);

if (s < tol)
g = 0.0;

else {

f = u[i*n+i];

g = (f < 0) ? sqrt(s) : -sqrt(s);

h = f * g - s;

u[i*n+i] = f - g;

for (j=l;j<n;j++) {

s = 0.0;

for (k=i;k<m;k++)
s += (u[k*n+i] * u[k*n+j]);

f = s / h;

for (k=i;k<m;k++)
u[k*n+j] += (f * u[k*n+i]);

}
/* end j */
}
/* end s */
q[i] = g;

s = 0.0;

for (j=l;j<n;j++)
s += (u[i*n+j] * u[i*n+j]);

if (s < tol)
g = 0.0;

else {

f = u[i*n+i+1];

g = (f < 0) ? sqrt(s) : -sqrt(s);

h = f * g - s;

u[i*n+i+1] = f - g;

for (j=l;j<n;j++)
e[j] = u[i*n+j]/h;

for (j=l;j<m;j++) {

s = 0.0;


Ïà¹ØÎĵµ£º

c¿âº¯ÊýÏê½â——assert

c¿âº¯ÊýÏê½â——assert
º¯ÊýÃû: assert
¹¦  ÄÜ: ²âÊÔÒ»¸öÌõ¼þ²¢¿ÉÄÜʹ³ÌÐòÖÕÖ¹
Óà ·¨: void assert(int test);
³ÌÐòÀý:
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
struct ITEM {
   int key;
   int value;
};
/* add item to ......

ʹÓÃCÓïÑÔÀ©Õ¹Python(Èý)

ÉÏһƪÖÐÎÒÃÇÒѾ­Á˽âÈçºÎÔÚPython³ÌÐòºÍCÄ£¿éÖ®¼ä½øÐÐÖµµÄÏ໥´«µÝ£¬ÏÖÔÚÎÒÃÇÀ´½øÈëʵ×÷½×¶Î£¬¿´¿´ÈçºÎ½«Ò»¸öCÓïÑÔ¿ª·¢µÄ¿ªÔ´mp3±à½âÂë¿âLAME°üװΪһ¸öPythonÏ¿ÉÒÔʹÓõÄÀ©Õ¹Ä£¿é¡£Ê×ÏÈÈ¥http://lame.sourceforge.net/download.phpÏÂÔØLAMEµÄÔ´´úÂ룬ȻºóÇл»µ½rootÓû§±àÒëÔ´´úÂ룬./configure
make
make instal ......

¡¾×ª¡¿CµÄÁíÒ»ÖØÒªÊý¾Ý½á¹¹bit fields

½ñÌì¿´K&RµÄÊéµÄʱºò˳±ãÎÂϰÁËCµÄÁíÒ»ÖØÒªÊý¾Ý½á¹¹bit-fields£¬ÎÒÏëbit-fieldsÔÚ±àдµ×²ãÇý¶¯
Çý¶¯³ÌÐòµÄʱºòÓ¦¸Ã±È½ÏºÃÓã¬Ëü¿ÉÒÔÈÆ¿ª"&"ºÍ"|"½øÐÐλ²Ù×÷£¬¶øÇÒ¸ü¼Ó½ÚÔ¼ÄÚ´æ¿Õ¼ä¡£·Ï»°²»¶à˵
ÁË£¬»¹ÊÇÏÈÀ´¿´¿´ËüµÄÕæÃæÄ¿°É£º
bit-fieldÀ´Ô´:
bit-fieldÊÇΪÁ˽ÚÔ¼´æ´¢¿Õ¼ä¶ø´´ÔìµÄÒ»ÖÖÊý¾ ......

ʹÓÃCÓïÑÔÀ©Õ¹Python(ËÄ)

ÉÏһƪÀïµÄLAMEÏîÄ¿ÒѾ­Õ¹Ê¾ÁËpythonÈçºÎÓëCÓïÑÔ½»»¥£¬µ«³ÌÐòÈÔ²»¹»ÀíÏ룬ÔÚpythonÕâÒ»¶Ë½ö½öÊÇ´«µÝÔ´ÎļþºÍÄ¿±êÎļþµÄ·¾¶£¬ÔÙµ÷ÓÃCÄ£¿éµÄencode·½·¨À´½øÐбàÂ룬µ«ÎÊÌâÔÚÓÚÄãÎÞ·¨¿ØÖÆencodeº¯Êý£¬±ÈÈçÄãÏë±àÂëµÄÔ´ÎļþÈç¹û²»ÊÇԭʼÊý¾Ý£¬¶øÊÇwavÎļþ»òÕ߯äËû¸ñÊ½ÄØ£¿¶ÔÓÚÕâ¸öÎÊÌ⣬ÓÐÁ½ÖÖ·½·¨¿ÉÒÔÑ¡Ôñ£¬Ò»ÖÖÄ£·ÂÇ°ÃæµÄCÄ£ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ