X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2Fsrc%2Ffunctions.c;h=feea3ade92def6f860e0a88f12f7ac0c802f8b54;hb=ef0d907c50abe7c4dc0d3c0e94645b5bf6ef3626;hp=e534c57200a1e1c0843f8a335a71bf6b395c02f7;hpb=6dd5c2acccd10635449230faa824b7e8906911bf;p=morpheus.git diff --git a/pkg/src/functions.c b/pkg/src/functions.c index e534c57..feea3ad 100644 --- a/pkg/src/functions.c +++ b/pkg/src/functions.c @@ -54,9 +54,63 @@ void Moments_M3(double* X, double* Y, int* pn, int* pd, double* M3) } } +#include + // W = 1/N sum( t(g(Zi,theta)) g(Zi,theta) ) // with g(Zi, theta) = i-th contribution to all moments (size dim) - real moments -void Compute_Omega(double* X, double* Y, double* M, int* pn, int* pd, double* W) +//void Compute_Omega(double* X, int* Y, double* M, int* pn, int* pd, double* W) +//{ +// int n=*pn, d=*pd; +// int dim = d + d*d + d*d*d; +// //double* W = (double*)malloc(dim*dim*sizeof(double)); +// +// // (Re)Initialize W: +// for (int j=0; j