]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedsobs.cpp
fixes while testing 1.33.0
[mothur.git] / sharedsobs.cpp
index b65a8781db509ab48c77ea20f0341c47e2ad1d62..f9b5eddcd919acdd409c9b0792294034dbcb7391 100644 (file)
 EstOutput SharedSobs::getValues(vector<SharedRAbundVector*> 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++; }
@@ -29,7 +29,7 @@ EstOutput SharedSobs::getValues(vector<SharedRAbundVector*> shared){
                return data;
        }
        catch(exception& e) {
-               errorOut(e, "SharedSobs", "getValues");
+               m->errorOut(e, "SharedSobs", "getValues");
                exit(1);
        }
 }