[Vinecopula-commits] r47 - pkg/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fr Jan 24 10:33:10 CET 2014


Author: ulf
Date: 2014-01-24 10:33:09 +0100 (Fri, 24 Jan 2014)
New Revision: 47

Modified:
   pkg/src/gof.c
   pkg/src/rvine.c
Log:
Fehler in gofECP behoben, der durch die Aenderung von Marius aufgetreten ist in der RVineSimulate

Modified: pkg/src/gof.c
===================================================================
--- pkg/src/gof.c	2014-01-09 12:42:23 UTC (rev 46)
+++ pkg/src/gof.c	2014-01-24 09:33:09 UTC (rev 47)
@@ -465,8 +465,8 @@
 
 void gofECP(int* T, int* d, int* family, int* maxmat, int* matrix, int* conindirect, double* par, double* par2, double* data, double* statistic, int* statisticName)
 {
-	double *znull, *Chat1, *Chat2;
-	int T2=1000, i=0, t=0;
+	double *znull, *Chat1, *Chat2, U=0;
+	int T2=1000, i=0, t=0, takeU=0;
 	znull = malloc(*d*1000*sizeof(double));
 	Chat1 = malloc(*T*sizeof(double));
 	Chat2 = malloc(*T*sizeof(double));
@@ -479,7 +479,7 @@
 		}
 	}
 
-	SimulateRVine(&T2, d, family, maxmat, matrix, conindirect, par, par2, znull);
+	SimulateRVine(&T2, d, family, maxmat, matrix, conindirect, par, par2, znull, &U, &takeU);
 	
 	
 	ChatZj(data, data, T, d, T, Chat1);

Modified: pkg/src/rvine.c
===================================================================
--- pkg/src/rvine.c	2014-01-09 12:42:23 UTC (rev 46)
+++ pkg/src/rvine.c	2014-01-24 09:33:09 UTC (rev 47)
@@ -533,7 +533,10 @@
 			fam2[i][j]=family[(i+1)+(*d)*j-1] ;
 		}
 	}
-	for(j=0;j<(*d);j++) for(i=0;i<(*T);i++) U2[i][j]=U[(*T)*j+i]; // (T [=N], d)-matrix
+	if(*takeU == 1)
+	{
+		for(j=0;j<(*d);j++) for(i=0;i<(*T);i++) U2[i][j]=U[(*T)*j+i]; // (T [=N], d)-matrix
+	}
 
 	// Matrizen rotieren für den Algo
 	for(i=0;i<(*d);i++)



Mehr Informationen über die Mailingliste Vinecopula-commits