X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=kruskalwalliscommand.cpp;fp=kruskalwalliscommand.cpp;h=946701bd46268a59556df9757c3fefba4ecbfd49;hb=b07e5c455cbf6907186dd821f7f33462706bd225;hp=f67fef89f65c53964a354023ed20a7bbc00f3c3f;hpb=847bb54463913763210bd5974bc1b7830012e3ea;p=mothur.git diff --git a/kruskalwalliscommand.cpp b/kruskalwalliscommand.cpp index f67fef8..946701b 100644 --- a/kruskalwalliscommand.cpp +++ b/kruskalwalliscommand.cpp @@ -7,7 +7,7 @@ #include "kruskalwalliscommand.h" //********************************************************************************************************************** -vector KruskalWallisCommand::setParameters(){ +/*vector KruskalWallisCommand::setParameters(){ try { CommandParameter pinputdir("inputdir", "String", "", "", "", "", "",false,false); parameters.push_back(pinputdir); CommandParameter poutputdir("outputdir", "String", "", "", "", "", "",false,false); parameters.push_back(poutputdir); @@ -117,7 +117,7 @@ KruskalWallisCommand::KruskalWallisCommand(string option) { m->errorOut(e, "KruskalWallisCommand", "KruskalWallisCommand"); exit(1); } -} +}**/ //********************************************************************************************************************** int KruskalWallisCommand::execute(){ try { @@ -176,7 +176,7 @@ int KruskalWallisCommand::execute(){ void KruskalWallisCommand::assignRank(vector &vec) { try { double rank = 1; - double numRanks, avgRank; + double numRanks, avgRank, j; vector::iterator it, oldit; sort (vec.begin(), vec.end(), comparevalue); @@ -186,7 +186,7 @@ void KruskalWallisCommand::assignRank(vector &vec) { while ( it != vec.end() ) { j = rank; oldit = it; - if (!equalvalue(*it, *it+1)) { *it->rank = rank; rank++; it++; } + if (!equalvalue(*it, *it+1)) { *it->rank = rank; rank=rank+1; it++; } else { while(equalrank(*it, *it+1)) { j = j + (j+1.0);