X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=boneh.cpp;h=2025ae70d10311c6184ee723097be4e67b22b318;hb=d873f7bf94309317a08c8757e0d0d60b06fbd473;hp=7117e356928cd11db90b260f9496a3f21db3048f;hpb=36a8526766106bce1412e530e99f9c699dd59105;p=mothur.git diff --git a/boneh.cpp b/boneh.cpp index 7117e35..2025ae7 100644 --- a/boneh.cpp +++ b/boneh.cpp @@ -70,10 +70,9 @@ EstOutput Boneh::getValues(SAbundVector* rank){ sum = 0; for(int j = 1; j < rank->size(); j++) { - double Xi = 0; //I didn't know what this was, simply replace the 0 - //with the appropriate expression for the boneh calculator - //to work. - sum += pow(1 - Xi / n, n) * (1 - pow(1 - Xi / n, m)) + v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), m)); + for (int i = 0; i < rank->get(j); i++) { + sum += pow(1 - j / n, n) * (1 - pow(1 - j / n, m)) + v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), m)); + } } }