[Wavetiling-commits] r39 - in pkg: . src vignettes

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon May 21 10:27:21 CEST 2012


Author: ppipeler
Date: 2012-05-21 10:27:21 +0200 (Mon, 21 May 2012)
New Revision: 39

Added:
   pkg/src/waveTiling.c
   pkg/vignettes/Makefile
Removed:
   pkg/src/MAPmarlik.c
   pkg/src/MAPmarlikEqSmooth.c
   pkg/src/MAPmarlikImpEqSmooth.c
Modified:
   pkg/NAMESPACE
Log:


Modified: pkg/NAMESPACE
===================================================================
--- pkg/NAMESPACE	2012-05-15 09:41:23 UTC (rev 38)
+++ pkg/NAMESPACE	2012-05-21 08:27:21 UTC (rev 39)
@@ -53,7 +53,8 @@
 importFrom(waveslim, wave.filter)
 
 ## Export Classes
-exportClasses(WaveTilingFeatureSet, MapFilterProbe, GenomeInfo, WfmFit, WfmInf, WfmFitTime, WfmFitFactor, WfmFitCircadian, WfmFitCustom, WfmInfCompare, WfmInfEffects )
+#exportClasses(WaveTilingFeatureSet, MapFilterProbe, GenomeInfo, WfmFit, WfmInf, WfmFitTime, WfmFitFactor, WfmFitCircadian, WfmFitCustom, WfmInfCompare, WfmInfEffects )
+exportClasses(WaveTilingFeatureSet, MapFilterProbe, GenomeInfo, WfmFit, WfmInf)
 
 ## Export Methods
 exportMethods(show)

Deleted: pkg/src/MAPmarlik.c
===================================================================
--- pkg/src/MAPmarlik.c	2012-05-15 09:41:23 UTC (rev 38)
+++ pkg/src/MAPmarlik.c	2012-05-21 08:27:21 UTC (rev 39)
@@ -1,32 +0,0 @@
-void MAPMARG(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
-{
-int i,j,m,n,Jcount=0;
-double phi;
-for (i=0;i<*K;i++) 
-{
-	if (i>=ends[Jcount]) Jcount++;
-	for (m=0;m<*q;m++) 
-	{	
-		phi=0;
-		for (j=0;j<*N;j++) 
-		{	
-			phi+=X[j+m*(*N)]*Din[j+i*(*N)];		
-		}
-		Bout[m*(*K)+i]=phi;
-		phi=phi*phi/XtX[m]/XtX[m]/(vareps[Jcount])-1/XtX[m];
-		if (phi<=0) 
-			{
-				Bout[m*(*K)+i]=0;	
-				varBout[m*(*K)+i]=0;
-				Phiout[m*(*K)+i]=0;
-			}
-		else 	
-			{
-				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);				    
-				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
-				Phiout[m*(*K)+i]=phi;
-			};
-	
-	}
-}
-} 

Deleted: pkg/src/MAPmarlikEqSmooth.c
===================================================================
--- pkg/src/MAPmarlikEqSmooth.c	2012-05-15 09:41:23 UTC (rev 38)
+++ pkg/src/MAPmarlikEqSmooth.c	2012-05-21 08:27:21 UTC (rev 39)
@@ -1,37 +0,0 @@
-void MAPMARGEQSMOOTH(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
-{
-int i,j,m,n,Jcount=0;
-double phi,XDm,XD;
-for (i=0;i<*K;i++) 
-{
-	if (i>=ends[Jcount]) Jcount++;
-	XD=0;
-	for (m=0;m<*q;m++) 
-	{
-		XDm=0;
-		for (j=0;j<*N;j++) 
-		{	
-			XDm+=X[j+m*(*N)]*Din[j+i*(*N)];
-		}
-		Bout[m*(*K)+i]=XDm;
-		XD+=XDm;
-	}
-	phi=XD*XD/(*q)/(vareps[Jcount])-1;
-	for (m=0;m<*q;m++)
-	{
-		if (phi<=0) 
-			{
-				Bout[m*(*K)+i]=0;	
-				varBout[m*(*K)+i]=0;
-				Phiout[m*(*K)+i]=0;
-			}
-		else 	
-			{
-				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);
-				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
-				Phiout[m*(*K)+i]=phi;
-			};
-	
-	}
-}
-}

Deleted: pkg/src/MAPmarlikImpEqSmooth.c
===================================================================
--- pkg/src/MAPmarlikImpEqSmooth.c	2012-05-15 09:41:23 UTC (rev 38)
+++ pkg/src/MAPmarlikImpEqSmooth.c	2012-05-21 08:27:21 UTC (rev 39)
@@ -1,37 +0,0 @@
-void MAPMARGIMPEQSMOOTH(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
-{
-int i,j,m,n,Jcount=0;
-double phi,XDm,XD;
-for (i=0;i<*K;i++) 
-{
-	if (i>=ends[Jcount]) Jcount++;
-	XD=0;
-	for (m=0;m<*q;m++) 
-	{
-		XDm=0;
-		for (j=0;j<*N;j++) 
-		{
-			XDm+=X[j+m*(*N)]*Din[j+i*(*N)];
-		}
-		Bout[m*(*K)+i]=XDm;
-		XD+=XDm;
-	}
-	phi=XD*XD/(*q+2)/(vareps[Jcount])-1;
-	for (m=0;m<*q;m++)
-	{
-		if (phi<=0) 
-			{
-				Bout[m*(*K)+i]=0;	
-				varBout[m*(*K)+i]=0;
-				Phiout[m*(*K)+i]=0;
-			}
-		else 	
-			{
-				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);
-				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
-				Phiout[m*(*K)+i]=phi;
-			};
-	
-	}
-}
-}

Added: pkg/src/waveTiling.c
===================================================================
--- pkg/src/waveTiling.c	                        (rev 0)
+++ pkg/src/waveTiling.c	2012-05-21 08:27:21 UTC (rev 39)
@@ -0,0 +1,132 @@
+#include <R.h>
+#include <Rinternals.h>
+#include <R_ext/Rdynload.h>
+
+void R_init_waveTiling( DllInfo *info );
+void R_unload_waveTiling( DllInfo *info );
+
+void MAPMARG(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
+{
+int i,j,m,n,Jcount=0;
+double phi;
+for (i=0;i<*K;i++) 
+{
+	if (i>=ends[Jcount]) Jcount++;
+	for (m=0;m<*q;m++) 
+	{	
+		phi=0;
+		for (j=0;j<*N;j++) 
+		{	
+			phi+=X[j+m*(*N)]*Din[j+i*(*N)];		
+		}
+		Bout[m*(*K)+i]=phi;
+		phi=phi*phi/XtX[m]/XtX[m]/(vareps[Jcount])-1/XtX[m];
+		if (phi<=0) 
+			{
+				Bout[m*(*K)+i]=0;	
+				varBout[m*(*K)+i]=0;
+				Phiout[m*(*K)+i]=0;
+			}
+		else 	
+			{
+				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);				    
+				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
+				Phiout[m*(*K)+i]=phi;
+			};
+	
+	}
+}
+} 
+
+void MAPMARGEQSMOOTH(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
+{
+int i,j,m,n,Jcount=0;
+double phi,XDm,XD;
+for (i=0;i<*K;i++) 
+{
+	if (i>=ends[Jcount]) Jcount++;
+	XD=0;
+	for (m=0;m<*q;m++) 
+	{
+		XDm=0;
+		for (j=0;j<*N;j++) 
+		{	
+			XDm+=X[j+m*(*N)]*Din[j+i*(*N)];
+		}
+		Bout[m*(*K)+i]=XDm;
+		XD+=XDm;
+	}
+	phi=XD*XD/(*q)/(vareps[Jcount])-1;
+	for (m=0;m<*q;m++)
+	{
+		if (phi<=0) 
+			{
+				Bout[m*(*K)+i]=0;	
+				varBout[m*(*K)+i]=0;
+				Phiout[m*(*K)+i]=0;
+			}
+		else 	
+			{
+				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);
+				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
+				Phiout[m*(*K)+i]=phi;
+			};
+	
+	}
+}
+}
+
+void MAPMARGIMP(double *Din,int *K, double *vareps,double *Bout,double *varBout,double *Phiout, double *X, double *XtX, int *q,int *N,int *ends)
+{
+int i,j,m,n,Jcount=0;
+double phi;
+for (i=0;i<*K;i++) 
+{
+	if (i>=ends[Jcount]) Jcount++;
+	for (m=0;m<*q;m++) 
+	{	
+		phi=0;
+		for (j=0;j<*N;j++) 
+		{	
+			phi+=X[j+m*(*N)]*Din[j+i*(*N)];		
+		}
+		Bout[m*(*K)+i]=phi;
+		phi=phi*phi/XtX[m]/XtX[m]/(vareps[Jcount])/3-1/XtX[m];
+		if (phi<=0) 
+			{
+				Bout[m*(*K)+i]=0;	
+				varBout[m*(*K)+i]=0;
+				Phiout[m*(*K)+i]=0;
+			}
+		else 	
+			{
+				Bout[m*(*K)+i]=Bout[m*(*K)+i]/(XtX[m]+1/phi);				    
+				varBout[m*(*K)+i]=(vareps[Jcount])/(XtX[m]+1/phi);
+				Phiout[m*(*K)+i]=phi;
+			};
+	
+	}
+}
+}
+
+/* Registration information for DLL */
+R_CMethodDef cMethods[] = {
+    { "MAPMARG", ( DL_FUNC ) &MAPMARG, 11, /*{ REALSXP, INTSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, INTSXP, INTSXP, INTSXP }*/ },
+    { NULL, NULL, 0 },
+    { "MAPMARGEQSMOOTH", ( DL_FUNC ) &MAPMARGEQSMOOTH, 11, /*{ REALSXP, INTSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, INTSXP, INTSXP, INTSXP }*/  },
+    { NULL, NULL, 0 },
+    { "MAPMARGIMP", ( DL_FUNC ) &MAPMARGIMP, 11, /*{ REALSXP, INTSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, REALSXP, INTSXP, INTSXP, INTSXP }*/  },
+    { NULL, NULL, 0 }
+};
+
+
+void R_init_waveTiling( DllInfo *info ) {
+    R_registerRoutines( info, cMethods, NULL, NULL, NULL );
+}
+
+void R_unload_waveTiling( DllInfo *info ) {
+  /* Release resources. */
+}
+
+
+

Added: pkg/vignettes/Makefile
===================================================================
--- pkg/vignettes/Makefile	                        (rev 0)
+++ pkg/vignettes/Makefile	2012-05-21 08:27:21 UTC (rev 39)
@@ -0,0 +1,8 @@
+all: waveTiling clean
+
+waveTiling: waveTiling-vignette.tex 
+	cp -p ../inst/scripts/waveTiling-vignette.pdf .
+
+clean:
+	rm -f *.out *.bbl *.log *.aux *.blg *.brf *.toc *.tex
+	rm -f Rplots.pdf 


Property changes on: pkg/vignettes/Makefile
___________________________________________________________________
Added: svn:executable
   + *



More information about the Wavetiling-commits mailing list