X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=sharedsobs.cpp;h=f9b5eddcd919acdd409c9b0792294034dbcb7391;hp=c8ecba71127de2319b34e5838dcc9eafe1f8b8df;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0 diff --git a/sharedsobs.cpp b/sharedsobs.cpp index c8ecba7..f9b5edd 100644 --- a/sharedsobs.cpp +++ b/sharedsobs.cpp @@ -16,10 +16,10 @@ EstOutput SharedSobs::getValues(vector shared){ try { data.resize(1,0); - int observed = 0; + 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++; }