X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedsorclass.cpp;h=81d8d86b7d295502dc2d75b85cd5accdbc167cdc;hb=485c02be0cdcd06ce08dd58d551a525b6a1b47c5;hp=c9debf7748662b8ebc2464f3d2e70fd7610a72ce;hpb=25cde7ff05bbe741da1712f2c740e0bc8706e523;p=mothur.git diff --git a/sharedsorclass.cpp b/sharedsorclass.cpp index c9debf7..81d8d86 100644 --- a/sharedsorclass.cpp +++ b/sharedsorclass.cpp @@ -26,8 +26,9 @@ EstOutput SharedSorClass::getValues(SharedRAbundVector* shared1, SharedRAbundVec tempA = shared1->getAbundance(i); tempB = shared2->getAbundance(i); - S1 += tempA; - S2 += tempB; + //find number of bins in shared1 and shared2 + if (tempA != 0) { S1++; } + if (tempB != 0) { S2++; } //they are shared if ((tempA != 0) && (tempB != 0)) { S12++; }