1 #ifndef SHAREDRABUNDVECTOR_H
2 #define SHAREDRABUNDVECTOR_H
8 * Created by Sarah Westcott on 12/5/08.
9 * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
13 #include "datavector.hpp"
14 #include "sharedordervector.h"
15 #include "sharedsabundvector.h"
16 #include "rabundvector.hpp"
18 /* This class is a child to datavector. It represents OTU information at a certain distance.
19 It is similiar to an rabundvector except each member of data knows which group it belongs to.
20 Each member of the internal container "data" is a struct of type individual.
21 An individual which knows the OTU from which it came,
22 the group it is in and its abundance. */
26 class SharedRAbundVector : public DataVector {
30 SharedRAbundVector(int);
31 //SharedRAbundVector(string, vector<int>);
32 SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){};
33 //SharedRAbundVector(ifstream&);
34 ~SharedRAbundVector();
40 void setGroup(string);
42 void setGroupIndex(int);
44 void set(int, int, string); //OTU, abundance, groupname
45 void setData(vector <individual>);
47 vector <individual> getData();
48 int getAbundance(int);
50 void sortD(); //Sorts the data in descending order.
51 void push_front(int, int, string); //abundance, otu, groupname
52 void push_back(int, int, string); //abundance, otu, groupname
56 vector<individual>::reverse_iterator rbegin();
57 vector<individual>::reverse_iterator rend();
61 RAbundVector getRAbundVector();
62 RAbundVector getRAbundVector2();
63 SAbundVector getSAbundVector();
64 OrderVector getOrderVector(map<string,int>*);
65 SharedOrderVector getSharedOrderVector();
66 SharedSAbundVector getSharedSAbundVector();
67 SharedRAbundVector getSharedRAbundVector();
70 vector<individual> data;