59a68d073401c4d9451f91bde69d3ac9170a59ca
4 int main(int argc
, char** argv
)
6 int* dimensions
= readArray_int("dimensions");
10 int k
= dimensions
[3];
17 float* Rho
= readArray_real("Rho");
18 float* Pi
= readArray_real("Pi");
19 int mini
= read_int("mini");
20 int maxi
= read_int("maxi");
21 float* X
= readArray_real("X");
22 float* Y
= readArray_real("Y");
23 float tau
= read_real("tau");
24 int* rank
= readArray_int("rank");
30 float* phi
= (float*)malloc(p
*m
*k
*sizeof(float));
31 float* LLF
= (float*)malloc(1*sizeof(float));
33 //////////////////////////
34 // Main call to EMGrank //
35 //////////////////////////
37 EMGrank(Pi
,Rho
,mini
,maxi
,X
,Y
,tau
,rank
,
47 // Compare to reference outputs
48 float* ref_phi
= readArray_real("phi");
49 compareArray_real("phi", phi
, ref_phi
, p
*m
*k
);
54 float* ref_LLF
= readArray_real("LLF");
55 compareArray_real("LLF", LLF
, ref_LLF
, 1);