X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=pkg%2Fsrc%2Ffunctions.c;h=41065bdc30dea0f4d52ee3d8bda5930fa54cd1a0;hb=7737c2fa8362b2bf590c2e2f9dcbd75424c51271;hp=0d632d3828216727b97e7cc676496e57ad0e87ec;hpb=cbd88fe5729bf206a784238a2637aa60e697fcdc;p=morpheus.git diff --git a/pkg/src/functions.c b/pkg/src/functions.c index 0d632d3..41065bd 100644 --- a/pkg/src/functions.c +++ b/pkg/src/functions.c @@ -53,3 +53,18 @@ void Moments_M3(double* X, double* Y, int* pn, int* pd, double* M3) } } } + +void Compute_Omega(double* X, double* Y, double* M, int* pn, int* pd, double* W) +{ + int n=*pn, d=*pd; + //double* W = (double*)calloc(d+d*d+d*d*d,sizeof(double)); + + // TODO: formula 1/N sum( t(g(Zi,theta)) g(Zi,theta) ) + // = 1/N sum( t( (XiYi-...) - M[i] ) ( ... ) ) + // --> similar to Moments_M2 and M3 above + for (int j=0; j< + for (int i=0; i