+int UnifracWeightedCommand::findIndex(float score, int index) {
try{
try{
- for (int e = 0; e < numComp; e++) {
- for (int i = 0; i < rScores[e].size(); i++) {
-//cout << rScores[e][i] << " number " << i << endl;
- if (rScores[e][i] >= score) { return i; }
- }
+ for (int i = 0; i < rScores[index].size(); i++) {
+ if (rScores[index][i] >= score) { return i; }
}
}
- return -1;
+ return rScores[index].size();
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function findIndex. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
}
catch(exception& e) {
cout << "Standard Error: " << e.what() << " has occurred in the UnifracWeightedCommand class Function findIndex. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";