sum += 1/(double)i;
return sum;
}
-
+/***********************************************************************/
RAbundVector BStick::getRAbundVector(SAbundVector* rank){
vector <int> rData;
int mr = 1;
int ns = 0;
for(int i = rank->size()-1; i > 0; i--) {
- int cur = rank->get(i);
+ double cur = rank->get(i);
if(mr == 1 && cur > 0)
mr = i;
nb += cur;
data[1] = 0.886/sqrt(rdata.size());
data[2] = 1.031/sqrt(rdata.size());
- /*cout << critVal << "\n";
- cout << "If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n\n";*/
+ /*m->mothurOut(critVal); m->mothurOutEndLine();
+ m->mothurOut("If D-Statistic is less than the critical value then the data fits the Broken Stick model w/ 95% confidence.\n");*/
if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
return data;
}
catch(exception& e) {
- cout << "Standard Error: " << e.what() << " has occurred in the BStick class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+ m->errorOut(e, "BStick", "getValues");
exit(1);
}
- catch(...) {
- cout << "An unknown error has occurred in the BStick class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
- exit(1);
- }
}
/***********************************************************************/