]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedbraycurtis.cpp
added concensus command and updated calcs
[mothur.git] / sharedbraycurtis.cpp
index d1b401eb78038aaa8d462678fe7bcbc3d2b13903..9a63cdf9c0a3cbf37fd2ef179ef5bd8ff3229bc7 100644 (file)
@@ -10,8 +10,8 @@
 #include "sharedbraycurtis.h"
 
 /***********************************************************************/
-
-EstOutput BrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) {
+//This is used by SharedJAbund and SharedSorAbund
+EstOutput BrayCurtis::getValues(vector<SharedRAbundVector*> shared) {
        try {   
                data.resize(1,0);
                
@@ -24,10 +24,10 @@ EstOutput BrayCurtis::getValues(SharedRAbundVector* shared1, SharedRAbundVector*
                sumSharedAB = the sum of the minimum otus int all shared otus in AB.
                */
                
-               for (int i = 0; i < shared1->size(); i++) {
+               for (int i = 0; i < shared[0]->size(); i++) {
                        //store in temps to avoid multiple repetitive function calls
-                       tempA = shared1->getAbundance(i);
-                       tempB = shared2->getAbundance(i);
+                       tempA = shared[0]->getAbundance(i);
+                       tempB = shared[1]->getAbundance(i);
                        
                        sumSharedA += tempA;
                        sumSharedB += tempB;