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 <Carbon/Carbon.h>
14 #include "datavector.hpp"
15 #include "sharedordervector.h"
16 #include "sharedsabundvector.h"
17 #include "rabundvector.hpp"
19 /* This class is a child to datavector. It represents OTU information at a certain distance.
20 It is similiar to an rabundvector except each member of data knows which group it belongs to.
21 Each member of the internal container "data" is a struct of type individual.
22 An individual which knows the OTU from which it came,
23 the group it is in and its abundance. */
27 class SharedRAbundVector : public DataVector {
31 SharedRAbundVector(int);
32 //SharedRAbundVector(string, vector<int>);
33 SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){};
34 // SharedRAbundVector(ifstream&);
35 ~SharedRAbundVector();
41 void setGroup(string);
43 void set(int, int, string); //OTU, abundance, groupname
45 int getAbundance(int);
46 void push_back(int, int, string); //abundance, OTU, groupname
50 vector<individual>::reverse_iterator rbegin();
51 vector<individual>::reverse_iterator rend();
55 RAbundVector getRAbundVector();
56 SAbundVector getSAbundVector();
57 OrderVector getOrderVector(map<string,int>*);
58 SharedOrderVector getSharedOrderVector();
59 SharedSAbundVector getSharedSAbundVector();
60 SharedRAbundVector getSharedRAbundVector();
63 vector<individual> data;