5 * Created by Sarah Westcott on 1/7/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "sharedsobs.h"
12 /***********************************************************************/
13 //This returns the number of unique species observed in several groups.
14 //The shared vector is each groups sharedrabundvector.
16 EstOutput SharedSobs::getValues(vector<SharedRAbundVector*> shared){
21 //loop through the species in each group
22 for (int k = 0; k < shared[0]->getNumBins(); k++) {
23 //if you have found a new species
24 if (shared[0]->getAbundance(k) != 0) { observed++; }
25 else if ((shared[0]->getAbundance(k) == 0) && (shared[1]->getAbundance(k) != 0)) { observed++; }
32 m->errorOut(e, "SharedSobs", "getValues");
37 /***********************************************************************/