]> git.donarmstrong.com Git - mothur.git/blob - rarefact.h
paralellized rarefaction.single
[mothur.git] / rarefact.h
1 #ifndef RAREFACT_H
2 #define RAREFACT_H
3
4 #include "rarefactioncurvedata.h"
5 #include "raredisplay.h"
6 #include "ordervector.hpp"
7 #include "mothur.h"
8 #include "globaldata.hpp"
9
10
11 class Rarefact {
12         
13 public:
14         Rarefact(OrderVector* o, vector<Display*> disp, int p) :
15                         numSeqs(o->getNumSeqs()), order(o), displays(disp), label(o->getLabel()), processors(p)  { m = MothurOut::getInstance(); }
16         Rarefact(vector<SharedRAbundVector*> shared, vector<Display*> disp) :
17                                          lookup(shared), displays(disp) {  globaldata = GlobalData::getInstance(); m = MothurOut::getInstance(); }
18
19         ~Rarefact(){};
20         int getCurve(float, int);
21         int getSharedCurve(float, int);
22         
23 private:
24         GlobalData* globaldata;
25         OrderVector* order;
26         vector<Display*> displays;
27         int numSeqs, numGroupComb, processors;
28         string label;
29         void mergeVectors(SharedRAbundVector*, SharedRAbundVector*);
30         vector<SharedRAbundVector*> lookup; 
31         MothurOut* m;
32         
33         int createProcesses(vector<int>&, RarefactionCurveData*, int);
34         int driver(RarefactionCurveData*, int, int);
35
36 };
37
38
39 #endif
40