]> git.donarmstrong.com Git - mothur.git/blobdiff - raredisplay.h
Initial revision
[mothur.git] / raredisplay.h
diff --git a/raredisplay.h b/raredisplay.h
new file mode 100644 (file)
index 0000000..ad6a389
--- /dev/null
@@ -0,0 +1,38 @@
+#ifndef RAREDISPLAY_H
+#define RAREDISPLAY_H
+
+#include "sabundvector.hpp"
+#include "calculator.h"
+#include "fileoutput.h"
+#include "display.h"
+#include <vector>
+
+using namespace std;
+
+/***********************************************************************/
+
+class RareDisplay : public Display {
+       
+public:
+       RareDisplay(Calculator* calc, FileOutput* file) : estimate(calc), output(file), nIters(1),
+                                                       tempInName(getPathName(output->getFileName()) + ".tempin."+ getSimpleName(output->getFileName())), tempOutName(getPathName(output->getFileName()) + ".tempout."+ getSimpleName(output->getFileName())) {};
+       ~RareDisplay()                                  {       delete estimate; delete output;         };
+       void init(string);
+       void reset();
+       void update(SAbundVector*);
+       void update(SharedRAbundVector* shared1, SharedRAbundVector* shared2, int numSeqs, int numGroupComb);
+       void close();
+       
+private:
+       Calculator* estimate;
+       FileOutput* output;
+       string label;
+       int nIters;
+       string tempInName, tempOutName;
+       ifstream tempInFile;
+       ofstream tempOutFile;
+
+};
+
+#endif
+