X-Git-Url: https://git.auder.net/?p=valse.git;a=blobdiff_plain;f=test%2Ftest.EMGLLF.c;h=fa6e36c81dd934ffa70c6a7ef37081d36163f8fb;hp=7eed301119f4600f1c3711ccbb35c6691411614a;hb=321e13a991a5a0e6c97225fdca436870e5e805d1;hpb=2e813ad23c796bbed3d5ba685b8fa002bdc6689d diff --git a/test/test.EMGLLF.c b/test/test.EMGLLF.c index 7eed301..fa6e36c 100644 --- a/test/test.EMGLLF.c +++ b/test/test.EMGLLF.c @@ -31,7 +31,7 @@ int main(int argc, char** argv) 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)); ///////////// @@ -39,7 +39,7 @@ int main(int argc, char** argv) //////////////////// // Call to EMGLLF // EMGLLF_core(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,lambda,X,Y,tau, - phi,rho,pi,LLF,S,affec, + phi,rho,pi,&llh,S,affec, n,p,m,k); //////////////////// @@ -66,10 +66,8 @@ int main(int argc, char** argv) 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);