2 * sharedsobscollectsummary.cpp
5 * Created by Sarah Westcott on 2/12/09.
6 * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10 #include "sharedsobscollectsummary.h"
12 /***********************************************************************/
13 //This returns the number of shared species observed in several groups.
14 //The shared vector is each groups sharedrabundvector.
16 EstOutput SharedSobsCS::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
22 //loop through the species in each group
23 for (int k = 0; k < shared1->size(); k++) {
24 tempA = shared1->getAbundance(k); //store in temps to avoid calling getAbundance multiple times
25 tempB = shared2->getAbundance(k);
27 //if you have found a new species
28 if ((tempA != 0) && (tempB != 0)) {//they are shared
37 cout << "Standard Error: " << e.what() << " has occurred in the SharedSobsCS class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
41 cout << "An unknown error has occurred in the SharedSobsCS class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
46 /***********************************************************************/