X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=calculator.h;h=6791d830f01c69492251b6110ebe5ba3d04a50a0;hb=e7ae6e6b27c45b5691c19f423ec56faae8e2f255;hp=8d9b8f01afcd580b70d92ccd1b83f0208532bb28;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;p=mothur.git diff --git a/calculator.h b/calculator.h index 8d9b8f0..6791d83 100644 --- a/calculator.h +++ b/calculator.h @@ -21,9 +21,10 @@ typedef vector EstOutput; class Calculator { public: - Calculator(){ m = MothurOut::getInstance(); } + Calculator(){ m = MothurOut::getInstance(); needsAll = false; } virtual ~Calculator(){}; - Calculator(string n, int c, bool f) : name(n), cols(c), multiple(f) {}; + Calculator(string n, int c, bool f) : name(n), cols(c), multiple(f) { m = MothurOut::getInstance(); needsAll = false; }; + Calculator(string n, int c, bool f, bool a) : name(n), cols(c), multiple(f), needsAll(a) { m = MothurOut::getInstance(); }; virtual EstOutput getValues(SAbundVector*) = 0; virtual EstOutput getValues(vector) = 0; virtual void print(ostream& f) { f.setf(ios::fixed, ios::floatfield); f.setf(ios::showpoint); @@ -31,12 +32,16 @@ public: virtual string getName() { return name; } virtual int getCols() { return cols; } virtual bool getMultiple() { return multiple; } + virtual bool getNeedsAll() { return needsAll; } + virtual string getCitation() = 0; + void citation() { m->mothurOut(getCitation()); m->mothurOutEndLine(); } protected: MothurOut* m; EstOutput data; string name; int cols; bool multiple; + bool needsAll; }; @@ -95,7 +100,7 @@ class BrokenStick void doBStick(vector); }; -/**************************************************************************************************/ +//**************************************************************************************************/ /*This Class calculates the geometric series distribution for the data. It prints the D-Statistic and the critical values for the Kolmogorov-Smirnov 1-sample test at the 95% confidence interval.*/