[Yuima-commits] r266 - pkg/yuima/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jan 12 17:34:59 CET 2014


Author: kyuta
Date: 2014-01-12 17:34:58 +0100 (Sun, 12 Jan 2014)
New Revision: 266

Modified:
   pkg/yuima/src/cce_functions.c
Log:
fix a bug (add a function msrc)

Modified: pkg/yuima/src/cce_functions.c
===================================================================
--- pkg/yuima/src/cce_functions.c	2013-12-26 16:07:31 UTC (rev 265)
+++ pkg/yuima/src/cce_functions.c	2014-01-12 16:34:58 UTC (rev 266)
@@ -265,6 +265,20 @@
 }
 
 
+void msrc(int *M, int *N, double *xg, double *xl, double *ygamma, double *ylambda,
+          double *result)
+{
+  int m, i;
+  
+  for(m = 0; m < *M; m++) {
+    for(i = m; i < *N; i++){
+      result[m] += (xg[i] - xl[i-m]) * (ygamma[i] - ylambda[i-m]);
+    }
+  }
+  
+}
+
+
 void HYcrosscov(int *gridL, int *xL, int *yL, double *grid, double *xtime,
                 double *ytime, double *tmptime, double *dX, double *dY, double *value)
 {



More information about the Yuima-commits mailing list