5 * Created by Sarah Westcott on 1/7/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "bootstrap.h"
12 /***********************************************************************/
14 EstOutput Bootstrap::getValues(SAbundVector* rank){
16 //vector<double> bootData(3,0);
18 double maxRank = (double)rank->getMaxRank();
19 double sampled = rank->getNumSeqs();
20 double sobs = rank->getNumBins();
22 double boot = (double)sobs;
24 for(int i=1;i<=maxRank;i++){
25 boot += (double)rank->get(i)*pow((1.0-(double)i/(double)sampled),sampled);
30 if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }
35 m->errorOut(e, "Bootstrap", "getValues");
40 /***********************************************************************/