From: Benjamin Auder <benjamin.auder@somewhere>
Date: Fri, 6 Jan 2017 15:47:50 +0000 (+0100)
Subject: fix typos
X-Git-Url: https://git.auder.net/js/doc/app_dev.php/R.css?a=commitdiff_plain;h=aa8df014ec50b2569f03eb81de720355c77633ea;p=valse.git

fix typos
---

diff --git a/R/main.R b/R/main.R
index 059843f..6633be2 100644
--- a/R/main.R
+++ b/R/main.R
@@ -6,10 +6,10 @@ Valse = setRefClass(
 
 		# regression data (size n*p, where n is the number of observations,
 		# and p is the number of regressors)
-		X = "numeric",
+		X = "matrix",
 		# response data (size n*m, where n is the number of observations,
 		# and m is the number of responses)
-		Y = "numeric",
+		Y = "matrix",
 
 		# Optionally user defined (some default values)
 
diff --git a/src/sources/EMGLLF.c b/src/sources/EMGLLF.c
index b305641..42419ac 100644
--- a/src/sources/EMGLLF.c
+++ b/src/sources/EMGLLF.c
@@ -281,7 +281,7 @@ void EMGLLF_core(
 				{
 					YiRhoR[u] = 0.0;
 					for (int v=0; v<m; v++)
-						YiRhoR[u] += Y[imi(i,v,n,m)] * rho[ai(v,u,r,m,m,k)];
+						YiRhoR[u] += Y[mi(i,v,n,m)] * rho[ai(v,u,r,m,m,k)];
 				}
 
 				//compute X(i,:)*phi(:,:,r)
diff --git a/src/sources/selectiontotale.c b/src/sources/selectiontotale.c
index d3e2dc4..04ec0a4 100644
--- a/src/sources/selectiontotale.c
+++ b/src/sources/selectiontotale.c
@@ -1,5 +1,6 @@
 #include <stdlib.h>
 #include <omp.h>
+#include <math.h>
 #include "EMGLLF.h"
 #include "utils.h"
 
@@ -55,7 +56,7 @@ void selectiontotale_core(
 		double* pi = (double*)malloc(k*sizeof(double));
 		double* LLF = (double*)malloc(maxi*sizeof(double));
 		double* S = (double*)malloc(p*m*k*sizeof(double));
-		EMGLLF(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,glambda[lambdaIndex],X,Y,tau,
+		EMGLLF_core(phiInit,rhoInit,piInit,gamInit,mini,maxi,gamma,glambda[lambdaIndex],X,Y,tau,
 			phi,rho,pi,LLF,S,
 			n,p,m,k);
 		free(LLF);