]> git.donarmstrong.com Git - mothur.git/blob - sharedsabundvector.h
changed random forest output filename
[mothur.git] / sharedsabundvector.h
1 #ifndef SHAREDSABUND_H
2 #define SHAREDSABUND_H
3
4
5 /*
6  *  sharedSharedSAbundVector.h
7  *  Dotur
8  *
9  *  Created by Sarah Westcott on 12/10/08.
10  *  Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
11  *
12  */
13
14 #include "datavector.hpp"
15 #include "rabundvector.hpp"
16 #include "ordervector.hpp"
17 #include "sharedordervector.h"
18 #include "sharedrabundvector.h"
19
20 /* This class is a child to datavector.  It represents OTU information at a certain distance. 
21         It is similiar to an sabundvector except each member of data knows which group it belongs to.
22         Each member of the internal container "data" is a struct of type individual. 
23         An individual which knows the OTU from which it came, 
24         the group it is in and its abundance.  */
25
26
27 class SharedSAbundVector : public DataVector {
28         
29 public:
30         SharedSAbundVector();
31         SharedSAbundVector(int);
32         SharedSAbundVector(const SharedSAbundVector& rv) : DataVector(rv.label), data(rv.data), maxRank(rv.maxRank), numBins(rv.numBins), numSeqs(rv.numSeqs){};
33         ~SharedSAbundVector(){};
34
35         int getNumBins();       
36         int getNumSeqs();       
37         int getMaxRank();       
38         string getGroup();
39         void setGroup(string);  
40         
41         void set(int, int, string);      //OTU, abundance, group
42         individual get(int);
43         int getAbundance(int);
44         void push_back(int, int, string);       //abundance, OTU, group
45         void pop_back();
46         void resize(int);
47         int size();
48         void clear();
49
50         void print(ostream&);
51                 
52         RAbundVector getRAbundVector(); 
53         SAbundVector getSAbundVector();
54         OrderVector getOrderVector(map<string,int>*);
55         SharedSAbundVector getSharedSAbundVector();
56         SharedRAbundVector getSharedRAbundVector();
57         SharedOrderVector getSharedOrderVector();
58         
59 private:
60         vector<individual> data;
61         
62         int maxRank;
63         int numBins;
64         int numSeqs;
65         string group;
66 };
67
68 #endif
69