33 double eigenvector[
LEN*
LEN];
34 double eigenvalue[
LEN];
41 for(i=0; i<9000000; i++){
48 if(j<=pos) v[j]= v[0];
64 ff_pca(pca, eigenvector, eigenvalue);
82 memset(v, 0,
sizeof(v));
87 v[j] /= eigenvalue[i];
88 error += fabs(v[j] - eigenvector[i + j*LEN]);
96 printf(
"%9.6f ", eigenvector[i + j*LEN]);
98 printf(
" %9.1f %f\n", eigenvalue[i], eigenvalue[i]/eigenvalue[0]);
int ff_pca(PCA *pca, double *eigenvector, double *eigenvalue)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
principal component analysis (PCA)
void ff_pca_add(PCA *pca, const double *v)
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)