[Genabel-commits] r744 - branches/ProbABEL/autotools-integration/ProbABEL/src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Jun 28 14:47:25 CEST 2011


Author: lckarssen
Date: 2011-06-28 14:47:24 +0200 (Tue, 28 Jun 2011)
New Revision: 744

Modified:
   branches/ProbABEL/autotools-integration/ProbABEL/src/coxfit2.c
   branches/ProbABEL/autotools-integration/ProbABEL/src/reg1.h
Log:
In the ProbABEL autotools integration branch: only removed superfluous whitespace from two files that I will change next. This way the next commit will only contain relevant changes. So, no functional changes here, only code layout is changed.

Modified: branches/ProbABEL/autotools-integration/ProbABEL/src/coxfit2.c
===================================================================
--- branches/ProbABEL/autotools-integration/ProbABEL/src/coxfit2.c	2011-06-23 11:44:32 UTC (rev 743)
+++ branches/ProbABEL/autotools-integration/ProbABEL/src/coxfit2.c	2011-06-28 12:47:24 UTC (rev 744)
@@ -84,11 +84,11 @@
 #include "survS.h"
 #include "survproto.h"
 
-void coxfit2(int   *maxiter,   int   *nusedx,    int   *nvarx, 
-	     double *time,      int   *status,    double *covar2, 
+void coxfit2(int   *maxiter,   int   *nusedx,    int   *nvarx,
+	     double *time,      int   *status,    double *covar2,
 	     double *offset,	double *weights,   int   *strata,
-	     double *means,     double *beta,      double *u, 
-	     double *imat2,     double loglik[2],  int   *flag, 
+	     double *means,     double *beta,      double *u,
+	     double *imat2,     double loglik[2],  int   *flag,
 	     double *work,	double *eps,       double *tol_chol,
 	     double *sctest)
 {
@@ -100,7 +100,7 @@
     double *mark, *wtave;
     double *a, *newbeta;
     double *a2, **cmat2;
-    double  denom=0/*-Wall*/, zbeta, risk; 
+    double  denom=0/*-Wall*/, zbeta, risk;
     double  temp, temp2;
     double  ndead;
     double  newlk=0;/*-Wall*/

Modified: branches/ProbABEL/autotools-integration/ProbABEL/src/reg1.h
===================================================================
--- branches/ProbABEL/autotools-integration/ProbABEL/src/reg1.h	2011-06-23 11:44:32 UTC (rev 743)
+++ branches/ProbABEL/autotools-integration/ProbABEL/src/reg1.h	2011-06-28 12:47:24 UTC (rev 744)
@@ -10,7 +10,7 @@
 //  last modification:  11-Jan-2009
 //
 //             Author:  Yurii S. Aulchenko
-//			  modified by: 	Maksim V. Struchalin, 11-Jan-2009 
+//			  modified by: 	Maksim V. Struchalin, 11-Jan-2009
 //
 // Modified by Han Chen (hanchen at bu.edu) on Nov 9, 2009
 // based on src/reg1.h version 0.2 as of Oct 19, 2009
@@ -174,7 +174,7 @@
 			nX[i*nX.ncol+c1] = X[i*X.ncol+c2];
 		else if (model==4)
 			nX[i*nX.ncol+c1] = X[i*X.ncol+c1];
-		if(interaction != 0)	
+		if(interaction != 0)
 			nX[i*nX.ncol+c2] = X[i*nX.ncol+interaction] * nX[i*nX.ncol+c1];//Maksim: interaction with SNP
 	}
 	//Han Chen
@@ -378,9 +378,9 @@
 
 
 
-		if(invvarmatrix.nrow!=0 && invvarmatrix.ncol!=0) 
+		if(invvarmatrix.nrow!=0 && invvarmatrix.ncol!=0)
 		{
-			tX = tX*invvarmatrix; 
+			tX = tX*invvarmatrix;
 			//			X = invvarmatrix*X; std::cout<<"new tX.nrow="<<X.nrow<<" tX.ncol="<<X.ncol<<"\n";
 		}
 
@@ -390,7 +390,7 @@
 		//		double N = tXX.get(0,0);
 		double N = X.nrow;
 		if (verbose) {printf("tXX:\n");tXX.print();}
-		// 
+		//
 		// use cholesky to invert
 		//
 		mematrix<double> tXX_i = tXX;
@@ -443,7 +443,7 @@
 		//	std::cout<<"sigma2_internal="<<sigma2_internal<<"\n";
 
 		//		replaced for ML
-		//	        sigma2_internal	= sigma2/(N - double(length_beta) - 1);
+		//		sigma2_internal	= sigma2/(N - double(length_beta) - 1);
 		sigma2 /= N;
 
 		//	std::cout<<"N="<<N<<", length_beta="<<length_beta<<"\n";
@@ -501,7 +501,7 @@
 		//cout << "estimate 0\n";
 
 		for (int i=0;i<(length_beta);i++)
-		{	
+		{
 			if (robust) {
 				double value = sqrt(robust_sigma2.get(i,i));
 				sebeta.put(value,i,0);
@@ -579,7 +579,7 @@
 		beta = v_i*u;
 		double sr = 0.;
 		double srr =0.;
-		for (int i=0;i<resid.nrow;i++) 
+		for (int i=0;i<resid.nrow;i++)
 		{
 			sr += resid[i];
 			srr += resid[i]*resid[i];
@@ -650,7 +650,7 @@
 		mematrix<double> W((X).nrow,1);
 		mematrix<double> z((X).nrow,1);
 		mematrix<double> tXWX(length_beta,length_beta);
-		mematrix<double> tXWX_i(length_beta,length_beta); 
+		mematrix<double> tXWX_i(length_beta,length_beta);
 		mematrix<double> tXWz(length_beta,1);
 
 		double prev = (rdata.Y).column_mean(0);
@@ -696,7 +696,7 @@
 			N = tXWX.get(0,0);
 
 			if (verbose) {printf("tXWX:\n");tXWX.print();}
-			// 
+			//
 			// use cholesky to invert
 			//
 			tXWX_i = tXWX;
@@ -734,8 +734,8 @@
 		}
 
 		for (int i=0;i<(length_beta);i++)
-		{	
-			if (robust) 
+		{
+			if (robust)
 			{
 				double value = sqrt(robust_sigma2.get(i,i));
 				sebeta.put(value,i,0);
@@ -754,7 +754,7 @@
 					}
 				}
 				//Oct 26, 2009
-			} 
+			}
 			else {
 				double value = sqrt(tXWX_i.get(i,i));
 				sebeta.put(value,i,0);
@@ -804,7 +804,7 @@
 		beta = v_i*u;
 		double sr = 0.;
 		double srr =0.;
-		for (int i=0;i<resid.nrow;i++) 
+		for (int i=0;i<resid.nrow;i++)
 		{
 			sr += resid[i];
 			srr += resid[i]*resid[i];
@@ -820,7 +820,7 @@
 };
 
 
-void coxfit2(int   *maxiter,   int   *nusedx,    int   *nvarx, 
+void coxfit2(int   *maxiter,   int   *nusedx,    int   *nvarx,
 		double *time,      int   *status,    double *covar2,
 		double *offset,	double *weights,   int   *strata,
 		double *means,     double *beta,      double *u,



More information about the Genabel-commits mailing list