From: Benjamin Auder Date: Mon, 20 Mar 2017 03:18:01 +0000 (+0100) Subject: remove also NY21 as in R code X-Git-Url: https://git.auder.net/doc/html/%7B%7B?a=commitdiff_plain;h=37e11bb06399b30c3a26d5e21a80a921898053d6;p=valse.git remove also NY21 as in R code --- diff --git a/pkg/src/sources/EMGLLF.c b/pkg/src/sources/EMGLLF.c index e41fe3c..a028919 100644 --- a/pkg/src/sources/EMGLLF.c +++ b/pkg/src/sources/EMGLLF.c @@ -54,7 +54,6 @@ void EMGLLF_core( const Real EPS = 1e-15; // Additional (not at this place, in R file) Real* gam2 = (Real*)malloc(k*sizeof(Real)); - Real* nY21 = (Real*)malloc(n*m*k*sizeof(Real)); Real* sqNorm2 = (Real*)malloc(k*sizeof(Real)); gsl_matrix* matrix = gsl_matrix_alloc(m, m); gsl_permutation* permutation = gsl_permutation_alloc(m); @@ -216,18 +215,17 @@ void EMGLLF_core( dotProduct += X2[ai(i,u,r,n,p,k)] * phi[ai(u,mm,r,p,m,k)]; //ps1[i,mm,r] = Y2[i,mm,r] * sum(X2[i,,r] * phi[,mm,r]) ps1[ai(i,mm,r,n,m,k)] = Y2[ai(i,mm,r,n,m,k)] * dotProduct; - nY21[ai(i,mm,r,n,m,k)] = Y2[ai(i,mm,r,n,m,k)] * Y2[ai(i,mm,r,n,m,k)]; } //ps[mm,r] = sum(ps1[,mm,r]) Real sumPs1 = 0.; for (int u=0; u