X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=collectdisplay.h;h=d33efe9792332902559d4a600bc3c5581b557185;hb=dfae916a398508554d35c6b3c8002b69becb53be;hp=4fe358800dba8dd40a1132f8330ca7ebe5671956;hpb=0470f6d037aacb3563c3f7010708120a4a67d4e6;p=mothur.git diff --git a/collectdisplay.h b/collectdisplay.h index 4fe3588..d33efe9 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); @@ -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 @@ -70,18 +72,32 @@ public: output->output(numSeqs, groupData); } }; - + void init(string s) { output->initFile(s); }; void reset() { output->resetFile(); }; void close() { output->resetFile(); }; - bool isCalcMultiple() { return estimate->getMultiple(); } + void setAll(bool a) { all = a; } + bool getAll() { return all; } + + + bool isCalcMultiple() { return estimate->getMultiple(); } + bool hasLciHci() { + if (estimate->getCols() == 3) { return true; } + else{ return false; } + } + + string getName() { return estimate->getName(); } + private: + Calculator* estimate; FileOutput* output; int nSeqs, timesCalled, numGroupComb; vector data; vector groupData; + bool all; + }; /***********************************************************************/