]> git.donarmstrong.com Git - mothur.git/commitdiff
changes while testing
authorSarah Westcott <mothur.westcott@gmail.com>
Tue, 1 May 2012 12:20:19 +0000 (08:20 -0400)
committerSarah Westcott <mothur.westcott@gmail.com>
Tue, 1 May 2012 12:20:19 +0000 (08:20 -0400)
cooccurrencecommand.cpp
trialswap2.h

index cfde0a906d7a3138160205623bd42b59f9c2918f..8c763e275e5d9cebf885794fafdc3c9f44f0cb6a 100644 (file)
@@ -412,7 +412,7 @@ int CooccurrenceCommand::getCooccurrence(vector<SharedRAbundVector*>& thisLookUp
         }
 
         //populate null matrix from probability matrix, do this a lot.
-        for(int h=0;h<runs;h++){
+        for(int k=0;k<runs;k++){
             nullmatrix.clear();
             //zero-fill the null matrix
             nullmatrix.assign(nrows, vector<int>(ncols, 0));
@@ -458,7 +458,7 @@ int CooccurrenceCommand::getCooccurrence(vector<SharedRAbundVector*>& thisLookUp
                         randnum = rand() / double(RAND_MAX);
                         for(int j=0;j<ncols;j++) {
                             current = probabilityMatrix[ncols * i + j];
-                            if((randnum <= current && randnum > previous && nullmatrix[i][j] != 1) || (previous==current)){
+                            if(randnum <= current && randnum > previous && nullmatrix[i][j] != 1) {
                                 nullmatrix[i][j] = 1;
                                 count++;
                                 previous = 0.0;
index 4c03278917e9bda274c5693b328bf9cbe58b6104..924938b1a16297015a3bdb14d07db0f91fc7b5bc 100644 (file)
@@ -21,7 +21,7 @@ public:
     
     double calc_pvalue_lessthan (vector<double>, double);
     double calc_pvalue_greaterthan (vector<double>, double);
-    int swap_checkerboards (vector<vector<int> > &, vector<int>, vector<int>, int, int);
+    int swap_checkerboards (vector<vector<int> > &, int, int);
     int calc_combo (int, int, vector<vector<int> > &);
     double calc_vratio (int, int, vector<int>, vector<int>);
     int calc_checker (vector<vector<int> > &, vector<int>, int, int);