X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=collectdisplay.h;h=15cc5a75a1f32edac6d234ea934ceffdad608301;hb=c3f0a9c8f932b923f3a6fbbf143e8f4b85fd6f5f;hp=110d816f1718f374c5dca22afd4c65502ac889fa;hpb=74c78f9abd9e733f0c2f812efec97a76632fcbf8;p=mothur.git diff --git a/collectdisplay.h b/collectdisplay.h index 110d816..15cc5a7 100644 --- a/collectdisplay.h +++ b/collectdisplay.h @@ -15,6 +15,8 @@ class CollectDisplay : public Display { public: CollectDisplay(Calculator* calc, FileOutput* file) : estimate(calc), output(file) {timesCalled = 0;}; ~CollectDisplay() { delete estimate; delete output; } + + void update(SAbundVector* rank){ nSeqs=rank->getNumSeqs(); data = estimate->getValues(rank); @@ -26,7 +28,7 @@ public: data = estimate->getValues(shared); //passes estimators a shared vector from each group to be compared //figure out what groups are being compared in getValues - //because the jumble parameter randomizes the order we need to put the results in the correct column in the output file + //because we randomizes the order we need to put the results in the correct column in the output file int group1Index, group2Index, pos; group1Index = shared[0]->getGroupIndex(); group2Index = shared[1]->getGroupIndex(); @@ -45,7 +47,7 @@ public: n++; } - if (estimate->getMultiple() == true) { + if ((estimate->getMultiple() == true) && all) { numGroupComb++; groupData.resize((numGroupComb*data.size()), 0); //is this the time its called with all values @@ -74,14 +76,23 @@ public: void init(string s) { output->initFile(s); }; void reset() { output->resetFile(); }; void close() { output->resetFile(); }; + void setAll(bool a) { all = a; } + bool getAll() { return all; } + bool isCalcMultiple() { return estimate->getMultiple(); } + string getName() { return estimate->getName(); } + + private: + Calculator* estimate; FileOutput* output; int nSeqs, timesCalled, numGroupComb; vector data; vector groupData; + bool all; + }; /***********************************************************************/