X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedkulczynskicody.cpp;h=57fcb248d8747332098dfc57657cf021897a46e6;hb=15cde0905641f8adddc1cc704f8c064f760e7461;hp=3de7e76b322a5496806e8e82e6bef12028290acb;hpb=25cde7ff05bbe741da1712f2c740e0bc8706e523;p=mothur.git diff --git a/sharedkulczynskicody.cpp b/sharedkulczynskicody.cpp index 3de7e76..57fcb24 100644 --- a/sharedkulczynskicody.cpp +++ b/sharedkulczynskicody.cpp @@ -11,9 +11,9 @@ /***********************************************************************/ -EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAbundVector* shared2) { +EstOutput KulczynskiCody::getValues(vector shared) { try { - int S1, S2, S12, tempA, tempB; + double S1, S2, S12, tempA, tempB; S1 = 0; S2 = 0; S12 = 0; tempA = 0; tempB = 0; /*S1, S2 = number of OTUs observed or estimated in A and B @@ -21,10 +21,10 @@ EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAb data.resize(1,0); - for (int i = 0; i < shared1->size(); i++) { + for (int i = 0; i < shared[0]->size(); i++) { //store in temps to avoid multiple repetitive function calls - tempA = shared1->getAbundance(i); - tempB = shared2->getAbundance(i); + tempA = shared[0]->getAbundance(i); + tempB = shared[1]->getAbundance(i); if (tempA != 0) { S1++; } if (tempB != 0) { S2++; } @@ -40,13 +40,9 @@ EstOutput SharedKulczynskiCody::getValues(SharedRAbundVector* shared1, SharedRAb return data; } catch(exception& e) { - cout << "Standard Error: " << e.what() << " has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; + m->errorOut(e, "KulczynskiCody", "getValues"); exit(1); } - catch(...) { - cout << "An unknown error has occurred in the SharedKulczynskiCody class Function getValues. Please contact Pat Schloss at pschloss@microbio.umass.edu." << "\n"; - exit(1); - } } /***********************************************************************/