X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=boneh.cpp;h=b4ce2baf81a4371a2f59959f0658f11e50a13fe3;hp=dc1475a4f2f9d0639d2aa234403bee0b3d3e1021;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=510b1cfc25cd79391d6973ca20c5ec25fb1bb3b2 diff --git a/boneh.cpp b/boneh.cpp index dc1475a..b4ce2ba 100644 --- a/boneh.cpp +++ b/boneh.cpp @@ -44,7 +44,7 @@ EstOutput Boneh::getValues(SAbundVector* sabund){ bool valid = false; double sum = 0; double n = (double)sabund->getNumSeqs(); - if(m==0){ m=n; } + if(f==0){ f=n; } double f1 = (double)sabund->get(1); @@ -66,10 +66,10 @@ EstOutput Boneh::getValues(SAbundVector* sabund){ sum = 0; for(int j = 1; j < sabund->size(); j++) { for (int i = 0; i < sabund->get(j); i++) { - sum += pow(1 - j / n, n) * (1 - pow(1 - j / n, m)); + sum += pow(1 - j / n, n) * (1 - pow(1 - j / n, f)); } } - sum += v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), m)); + sum += v * pow(1 - f1/(n*v), n) * (1 - pow(1 - f1/(n*v), f)); } data[0] = sum; @@ -77,7 +77,7 @@ EstOutput Boneh::getValues(SAbundVector* sabund){ return data; } catch(exception& e) { - errorOut(e, "Boneh", "getValues"); + m->errorOut(e, "Boneh", "getValues"); exit(1); } }