X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=npshannon.cpp;h=a855b316964da97dd261f33ee094f014a4ed7b05;hp=80c83728adccbcc691d1a082d95e4c07521a263f;hb=d1c97b8c04bb75faca1e76ffad60b37a4d789d3d;hpb=d037597badc8d18e235c59f0c1114180edb7f98f diff --git a/npshannon.cpp b/npshannon.cpp index 80c8372..a855b31 100644 --- a/npshannon.cpp +++ b/npshannon.cpp @@ -18,7 +18,7 @@ EstOutput NPShannon::getValues(SAbundVector* rank){ float npShannon = 0.0000; double maxRank = (double)rank->getMaxRank(); - int sampled = rank->getNumSeqs(); + double sampled = rank->getNumSeqs(); double Chat = 1.0000 - (double)rank->get(1)/(double)sampled; @@ -43,13 +43,9 @@ EstOutput NPShannon::getValues(SAbundVector* rank){ return data; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the NPShannon class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "NPShannon", "getValues"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the NPShannon class function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/