X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=bergerparker.cpp;h=d00403c9edc8d236ef9cd1cf02dc179001573d75;hb=bd27c2b0612942815b7417c79f7ee41f669a2a34;hp=41e6e9fe97d193b4491fb33e3c5074b817516c8c;hpb=c5c7502f435e1413c19e373dab1dfebcaa67588d;p=mothur.git diff --git a/bergerparker.cpp b/bergerparker.cpp index 41e6e9f..d00403c 100644 --- a/bergerparker.cpp +++ b/bergerparker.cpp @@ -3,7 +3,7 @@ * Mothur * * Created by Thomas Ryabin on 3/6/09. - * Copyright 2009 __MyCompanyName__. All rights reserved. + * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. * */ @@ -15,8 +15,7 @@ EstOutput BergerParker::getValues(SAbundVector* rank){ try { data.resize(1,0); //Berger-Parker index - double BP = (double)rank->getNumSeqs()/(double)rank->getMaxRank(); - //cout << "BP index = " << 1/BP << "\n\n"; + double BP = (double)rank->getMaxRank() / (double)rank->getNumSeqs(); data[0] = BP; if (isnan(data[0]) || isinf(data[0])) { data[0] = 0; } @@ -24,13 +23,9 @@ EstOutput BergerParker::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, "BergerParker", "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); - } } /***********************************************************************/