]> git.donarmstrong.com Git - mothur.git/blobdiff - boneh.cpp
changes while testing
[mothur.git] / boneh.cpp
index f5c8f90a175aa8d8e54190b7e49e8df9bf0cb683..b4ce2baf81a4371a2f59959f0658f11e50a13fe3 100644 (file)
--- 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,14 +77,10 @@ EstOutput Boneh::getValues(SAbundVector* sabund){
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Coverage class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "Boneh", "getValues");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Coverage class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
-};
+}
 
 
 /***********************************************************************/