X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=jackknife.cpp;h=8f0629832208e797efbdc815e619bab28ed49046;hp=a166eb4785984d23a6c5949b93db2d3d73cbe3a1;hb=a8e2df1b96a57f5f29576b08361b86a96a8eff4f;hpb=20a2d0350a737a434c89f303662d64a8eeea7b05 diff --git a/jackknife.cpp b/jackknife.cpp index a166eb4..8f06298 100644 --- a/jackknife.cpp +++ b/jackknife.cpp @@ -12,7 +12,7 @@ /***********************************************************************/ void Jackknife::getAMatrix(void){ try { - vector > B = binomial(maxOrder); + vector > 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); - } } /***********************************************************************/