X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=sharedsobs.cpp;h=f9b5eddcd919acdd409c9b0792294034dbcb7391;hp=36cacd6935727ba1763b436e25f334ab2c1862bc;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=e4c80376cc4533f66c8dfc18f3e1a86a60ac17fe diff --git a/sharedsobs.cpp b/sharedsobs.cpp index 36cacd6..f9b5edd 100644 --- a/sharedsobs.cpp +++ b/sharedsobs.cpp @@ -19,7 +19,7 @@ EstOutput SharedSobs::getValues(vector shared){ double observed = 0; //loop through the species in each group - for (int k = 0; k < shared[0]->size(); k++) { + for (int k = 0; k < shared[0]->getNumBins(); k++) { //if you have found a new species if (shared[0]->getAbundance(k) != 0) { observed++; } else if ((shared[0]->getAbundance(k) == 0) && (shared[1]->getAbundance(k) != 0)) { observed++; }