]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedkulczynskicody.cpp
changes to beta diversity calculators
[mothur.git] / sharedkulczynskicody.cpp
index 57fcb248d8747332098dfc57657cf021897a46e6..de90252769a3925c96a463a62c63a1349c3ef710 100644 (file)
@@ -33,7 +33,7 @@ EstOutput KulczynskiCody::getValues(vector<SharedRAbundVector*> shared) {
                        if ((tempA != 0) && (tempB != 0)) {     S12++; }
                }
                
-               data[0] = 0.5 * ((S12 / (float)S1) + (S12 / (float)S2));
+               data[0] = 1.0 - 0.5 * ((S12 / (float)S1) + (S12 / (float)S2));
                
                if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; }