]> git.donarmstrong.com Git - mothur.git/blobdiff - whittaker.cpp
added concensus command and updated calcs
[mothur.git] / whittaker.cpp
index 95f1c9c5fcb789a19a7496a83177ab639d0067e6..3b179111a854e934b6f9d05e231649796e5565a3 100644 (file)
 
 /***********************************************************************/
 
-EstOutput Whittaker::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2){
+EstOutput Whittaker::getValues(vector<SharedRAbundVector*> shared){
        try{
                data.resize(1);
 
                int countA = 0;
                int countB = 0;
-               int sTotal = shared1->getNumBins();
+               int sTotal = shared[0]->getNumBins();
                for(int i=0;i<sTotal;i++){
-                       if(shared1->getAbundance(i) != 0){      countA++;       }
-                       if(shared2->getAbundance(i) != 0){      countB++;       }               
+                       if(shared[0]->getAbundance(i) != 0){    countA++;       }
+                       if(shared[1]->getAbundance(i) != 0){    countB++;       }               
                }
                
                data[0] = 2*sTotal/(float)(countA+countB)-1;