X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedthetayc.cpp;fp=sharedthetayc.cpp;h=6c0f6c7f91bf46bf314c7e16cfcf6997bed4f388;hb=53171f07cc0c0e560e2b4ba2946f690d59fc2dc4;hp=315a61f1310f8381e7fab74546f059d1823f11f7;hpb=8da8321bc4d705f6c156248d6229c60a0204f750;p=mothur.git diff --git a/sharedthetayc.cpp b/sharedthetayc.cpp index 315a61f..6c0f6c7 100644 --- a/sharedthetayc.cpp +++ b/sharedthetayc.cpp @@ -29,14 +29,14 @@ EstOutput ThetaYC::getValues(vector shared) { double sumPsqQ = 0; //get the total values we need to calculate the theta denominator sums - for (int i = 0; i < shared[0]->size(); i++) { + for (int i = 0; i < shared[0]->getNumBins(); i++) { //store in temps to avoid multiple repetitive function calls Atotal += (double)shared[0]->getAbundance(i); Btotal += (double)shared[1]->getAbundance(i); } //calculate the theta denominator sums - for (int j = 0; j < shared[0]->size(); j++) { + for (int j = 0; j < shared[0]->getNumBins(); j++) { //store in temps to avoid multiple repetitive function calls pi = shared[0]->getAbundance(j) / Atotal; qi = shared[1]->getAbundance(j) / Btotal;