projects
/
valse.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
still some problems with LLF
[valse.git]
/
test
/
test.EMGLLF.c
diff --git
a/test/test.EMGLLF.c
b/test/test.EMGLLF.c
index
7eed301
..
fa6e36c
100644
(file)
--- 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* 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));
/////////////
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,
////////////////////
// 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);
////////////////////
n,p,m,k);
////////////////////
@@
-66,10
+66,8
@@
int main(int argc, char** argv)
free(pi);
free(ref_pi);
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);
Real* ref_S = readArray_real("S");
compareArray_real("S", S, ref_S, p*m*k);