X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=sharedsobscollectsummary.cpp;fp=sharedsobscollectsummary.cpp;h=0000000000000000000000000000000000000000;hb=4a877efa127e56e81a21f53cfdbbfd3bfbe8c4ff;hp=fffed0290b1136da46e42d31c99542da19ec9a0a;hpb=a6cf29fa4dac0909c7582cb1094151d34093ee76;p=mothur.git diff --git a/sharedsobscollectsummary.cpp b/sharedsobscollectsummary.cpp deleted file mode 100644 index fffed02..0000000 --- a/sharedsobscollectsummary.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* - * sharedsobscollectsummary.cpp - * Mothur - * - * Created by Sarah Westcott on 2/12/09. - * Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved. - * - */ - -#include "sharedsobscollectsummary.h" - -/***********************************************************************/ -//This returns the number of shared species observed in several groups. -//The shared vector is each groups sharedrabundvector. - -EstOutput SharedSobsCS::getValues(vector shared){ - try { - data.resize(1,0); - double observed = 0; - int numGroups = shared.size(); - - for (int i = 0; i < shared[0]->getNumBins(); i++) { - //get bin values and set sharedByAll - bool sharedByAll = true; - for (int j = 0; j < numGroups; j++) { - if (shared[j]->getAbundance(i) == 0) { sharedByAll = false; } - } - - //they are shared - if (sharedByAll == true) { observed++; } - } - - data[0] = observed; - return data; - } - catch(exception& e) { - m->errorOut(e, "SharedSobsCS", "getValues"); - exit(1); - } -} - -/***********************************************************************/