From: Sarah Westcott Date: Tue, 1 May 2012 12:20:19 +0000 (-0400) Subject: changes while testing X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=commitdiff_plain;h=696633b3cf5f0b6928216069a780fccc87a69f0b changes while testing --- diff --git a/cooccurrencecommand.cpp b/cooccurrencecommand.cpp index cfde0a9..8c763e2 100644 --- a/cooccurrencecommand.cpp +++ b/cooccurrencecommand.cpp @@ -412,7 +412,7 @@ int CooccurrenceCommand::getCooccurrence(vector& thisLookUp } //populate null matrix from probability matrix, do this a lot. - for(int h=0;h(ncols, 0)); @@ -458,7 +458,7 @@ int CooccurrenceCommand::getCooccurrence(vector& thisLookUp randnum = rand() / double(RAND_MAX); for(int j=0;j previous && nullmatrix[i][j] != 1) || (previous==current)){ + if(randnum <= current && randnum > previous && nullmatrix[i][j] != 1) { nullmatrix[i][j] = 1; count++; previous = 0.0; diff --git a/trialswap2.h b/trialswap2.h index 4c03278..924938b 100644 --- a/trialswap2.h +++ b/trialswap2.h @@ -21,7 +21,7 @@ public: double calc_pvalue_lessthan (vector, double); double calc_pvalue_greaterthan (vector, double); - int swap_checkerboards (vector > &, vector, vector, int, int); + int swap_checkerboards (vector > &, int, int); int calc_combo (int, int, vector > &); double calc_vratio (int, int, vector, vector); int calc_checker (vector > &, vector, int, int);