[Genabel-commits] r827 - pkg/VariABEL/src/ITERlib

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 7 13:06:07 CET 2011


Author: maksim
Date: 2011-12-07 13:06:07 +0100 (Wed, 07 Dec 2011)
New Revision: 827

Modified:
   pkg/VariABEL/src/ITERlib/iterator.cpp
   pkg/VariABEL/src/ITERlib/iterator_functions.cpp
Log:
cout deleted

Modified: pkg/VariABEL/src/ITERlib/iterator.cpp
===================================================================
--- pkg/VariABEL/src/ITERlib/iterator.cpp	2011-12-07 11:44:11 UTC (rev 826)
+++ pkg/VariABEL/src/ITERlib/iterator.cpp	2011-12-07 12:06:07 UTC (rev 827)
@@ -31,7 +31,6 @@
 		if (margin == 2) { // column-wise
 			for (int i=0; i<step; i++) {
 				for (unsigned long int j = 0; j < datasize; j++, k++) {
-					//					cout << k << " " << index*datasize+k << " " << inData[index*datasize+k] << endl;
 					outData[k] = inData[(index * inDataRowLength) + k];
 				}
 			}
@@ -39,7 +38,6 @@
 			//Rprintf("Row %d ", index);
 			for (int i=0; i<step; i++) {
 				for (unsigned long int j = 0; j < datasize; j++, k++) {
-					//					cout << k << " " << k*datasize+index << " " << inData[k*datasize+index] << endl;
 					outData[k] = inData[(index + i) + (j * inDataRowLength)];
 					//Rprintf("at %d: %f ", j, outData[j]);
 				}
@@ -249,14 +247,11 @@
 			return R_NilValue;
 		}
 
-		//cout << "before cycle 0:" << ncol << " " << nids << endl;
 		unsigned long int nrow_new, ncol_multi;
 
 		// Get the dimensions of the output the function of our choosing will be giving
 		pMethod(0, nrow, step, 0, ncol_multi, nrow_new, narg, argList);
 		//Rprintf("ncol_multi,nrow_new=%d,%d\n",ncol_multi,nrow_new);
-		//cout << "ncol_multi=" << ncol_multi << endl;
-		//cout << "nrow_new=" << nrow_new << endl;
 		// Allocate vector
 		// Start output SEXP for passing to R
 		// Even when the output is put into a filevector, we still return an (empty) SEXP
@@ -315,7 +310,6 @@
 
 		// Read in data and apply function (row- or column-wise)
 		// use 'STEP' here?
-		//cout << "before cycle:" << ncol << " " << step << endl;
 
 		int rowlength = nrow;
 		if (mar == 1) {
@@ -323,7 +317,6 @@
 		}
 
 		for (unsigned long int i = 0; i < ncol; i+=step) {
-			//cout << "in cycle: " << i << endl;
 			// Get row or column
 			if (intype==0) {
 			
@@ -340,16 +333,12 @@
 				return R_NilValue;
 			}
 			/**
-			cout << "internal_data " << i << ":";
 			for (int iii=0;iii<step;iii++)
-				for (int jjj=0;jjj<nrow;jjj++) cout << " " << internal_data[iii*nrow+jjj];
-			cout << endl;
 			 **/
 
 			// Apply function of choosing
 			pMethod(internal_data, nrow, step, out_data, ncol_multi, nrow_new, narg,
 					argList);
-			//cout << "pMethod returns " << out_data[0] << endl;
 
 			// Write analyzed data to R vector or filevector
 			unsigned long int i_cs = (unsigned long int) (i / step);
@@ -357,7 +346,6 @@
 				if (!fv) {
 					for (unsigned long int k = 0; k < nrow_new; k++) {
 						// Add to output SEXP
-						//cout << "set element " << (i_cs * ncol_multi + j) * nrow_new + k <<
 						//		"from k " << k << " to value " << out_data[k] << endl;
 						//REAL(out)[(i_cs * ncol_multi + j) * nrow_new + k]
 						//          = out_data[k];
@@ -383,7 +371,6 @@
 		delete [] out_data;
 
 		UNPROTECT(1);
-		//cout << "iterator: STOP\n";
 		return out;
 	}
 

Modified: pkg/VariABEL/src/ITERlib/iterator_functions.cpp
===================================================================
--- pkg/VariABEL/src/ITERlib/iterator_functions.cpp	2011-12-07 11:44:11 UTC (rev 826)
+++ pkg/VariABEL/src/ITERlib/iterator_functions.cpp	2011-12-07 12:06:07 UTC (rev 827)
@@ -263,7 +263,6 @@
 //																				 unsigned long outdata_Ncol, unsigned long outdata_Nrow,
 //	unsigned narg, double *argList)
 //{
-//		std::cout<<"snp[1]="<<snp[1]<<"\n";
 //}
 
 //SEXP variance_homogeneity_test_C_wrapper_DEBUGING(SEXP trait_,
@@ -485,7 +484,6 @@
 	//_________________________________________________________
 	for(unsigned id_counter=0 ; id_counter<indataHeight ; id_counter++)
 		{
-//		std::cout<<"id_counter="<<id_counter<<"\n";
 		is_trait_na[id_counter]=0;
 		
 		//NA among covariates
@@ -515,13 +513,11 @@
 //	double *design_matrix_ = new double[*p*indataWidth];
 //  for(int i=0 ; i<*p*indataWidth ; i++) design_matrix_[i]=design_matrix[i];	
 
-//	std::cout<<"variance_homogeneity_test_C_wrapper: 1\n";
 	
 
 
 	variance_homogeneity_test_C(indata, trait, design_matrix_copy, design_matrix, p, &indataHeight, betas, se, chi2, df, residuals,
 				 											analys_type, is_trait_na, testname, /*auxiliary variables:*/ qty, jpvt, qraux, work, v, x_for_ch2inv);
-//	std::cout<<"variance_homogeneity_test_C_wrapper: 2\n";
 
 //	delete[] design_matrix_;
 
@@ -539,7 +535,6 @@
 
 //	for(int i=0 ; i<2 + (*INTEGER(argList[3]))*2 ; i++)
 //		{
-//		std::cout<<"outdata["<<i<<"]="<<outdata[i]<<"\n";
 //		}
 
 
@@ -555,7 +550,6 @@
 	outdataNrow = 1;
 	}
 					
-//  std::cout<<"variance_homogeneity_test_C_wrapper: STOP\n";
 }
 
 #ifdef __cplusplus



More information about the Genabel-commits mailing list