Real lambda = read_real("lambda");
Real* X = readArray_real("X");
Real* Y = readArray_real("Y");
- Real tau = read_real("tau");
+ Real eps = read_real("eps");
////////////
/////////////
Real* phi = (Real*)malloc(p*m*k*sizeof(Real));
Real* rho = (Real*)malloc(m*m*k*sizeof(Real));
Real* pi = (Real*)malloc(k*sizeof(Real));
- Real* LLF = (Real*)malloc(maxi*sizeof(Real));
+ Real llh;
Real* S = (Real*)malloc(p*m*k*sizeof(Real));
+ int* affec = (int*)malloc(n*sizeof(int));
/////////////
////////////////////
// Call to EMGLLF //
- EMGLLF_core(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau,
- phi,rho,pi,LLF,S,
+ EMGLLF_core(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,eps,
+ phi,rho,pi,&llh,S,affec,
n,p,m,k);
////////////////////
free(pi);
free(ref_pi);
- Real* ref_LLF = readArray_real("LLF");
- compareArray_real("LLF", LLF, ref_LLF, maxi);
- free(LLF);
- free(ref_LLF);
+ Real ref_llh = read_real("llh");
+ compareArray_real("llh", &llh, &ref_llh, 1);
Real* ref_S = readArray_real("S");
compareArray_real("S", S, ref_S, p*m*k);
free(S);
free(ref_S);
+ int* ref_affec = readArray_int("affec");
+ compareArray_int("affec", affec, ref_affec, n);
+ free(affec);
+ free(ref_affec);
+
return 0;
}