]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedbraycurtis.cpp
changes to beta diversity calculators
[mothur.git] / sharedbraycurtis.cpp
index 566df3b8d87a93c8bbc069e078c2a68f4e71f2bd..0182e13bd34ea9164383b5f83c221ae705898677 100644 (file)
@@ -37,7 +37,7 @@ EstOutput BrayCurtis::getValues(vector<SharedRAbundVector*> shared) {
                        else  { sumSharedAB += tempB; }                         
                }
                
-               data[0] = (2 * sumSharedAB) / (float)( sumSharedA + sumSharedB);
+               data[0] = 1.0 - (2 * sumSharedAB) / (float)( sumSharedA + sumSharedB);
                
                if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }