]> git.donarmstrong.com Git - mothur.git/blobdiff - jackknife.cpp
added modify names parameter to set.dir
[mothur.git] / jackknife.cpp
index a166eb4785984d23a6c5949b93db2d3d73cbe3a1..8f0629832208e797efbdc815e619bab28ed49046 100644 (file)
@@ -12,7 +12,7 @@
 /***********************************************************************/
 void Jackknife::getAMatrix(void){
        try {
-               vector<vector<double> > B = binomial(maxOrder);
+               vector<vector<double> > B = m->binomial(maxOrder);
 
                aMat.resize(maxOrder+1);
 
@@ -25,13 +25,9 @@ void Jackknife::getAMatrix(void){
                }
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Jackknife class Function getAMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "Jackknife", "getAMatrix");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Jackknife class function getAMatrix. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
 }
 
 /**************************************************************************************************/
@@ -57,13 +53,9 @@ double Jackknife::CN(double z){
                return n;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Jackknife class Function CN. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "Jackknife", "CN");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Jackknife class function CN. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
 }
 
 /***********************************************************************/
@@ -75,7 +67,7 @@ EstOutput Jackknife::getValues(SAbundVector* rank){
        
                double jack, jacklci, jackhci;
        
-               double maxRank = (double)rank->getMaxRank();
+               int maxRank = (double)rank->getMaxRank();
                int S = rank->getNumBins();
 
                double N[maxOrder+1];
@@ -130,7 +122,7 @@ EstOutput Jackknife::getValues(SAbundVector* rank){
                        }
                        ci = 1.96 * sqrt(ci - jack);
                }
-               else if(k=1){
+               else if(k==1){
                        jack = N[1];
                        ci = 1.96*sqrt(variance[1]);
                }else{
@@ -152,13 +144,9 @@ EstOutput Jackknife::getValues(SAbundVector* rank){
                return data;
        }
        catch(exception& e) {
-               cout << "Standard Error: " << e.what() << " has occurred in the Jackknife class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
+               m->errorOut(e, "Jackknife", "getValues");
                exit(1);
        }
-       catch(...) {
-               cout << "An unknown error has occurred in the Jackknife class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n";
-               exit(1);
-       }       
 }
 
 /***********************************************************************/