4 #include "datavector.hpp"
6 /* DataStructure for a list file.
7 This class is a child to datavector. It represents OTU information at a certain distance.
8 A list vector can be converted into and ordervector, rabundvector or sabundvector.
9 Each member of the internal container "data" represents an individual OTU.
10 So data[0] = "a,b,c,d,e,f".
11 example: listvector = a,b,c,d,e,f g,h,i j,k l m
12 rabundvector = 6 3 2 1 1
13 sabundvector = 2 1 1 0 0 1
14 ordervector = 1 1 1 1 1 1 2 2 2 3 3 4 5 */
16 class ListVector : public DataVector {
21 // ListVector(const ListVector&);
22 ListVector(string, vector<string>);
23 ListVector(const ListVector& lv) : DataVector(lv.label), data(lv.data), maxRank(lv.maxRank), numBins(lv.numBins), numSeqs(lv.numSeqs){};
24 ListVector(ifstream&);
27 int getNumBins() { return numBins; }
28 int getNumSeqs() { return numSeqs; }
29 int getMaxRank() { return maxRank; }
31 void set(int, string);
33 void push_back(string);
39 RAbundVector getRAbundVector();
40 SAbundVector getSAbundVector();
41 OrderVector getOrderVector(map<string,int>*);
44 vector<string> data; //data[i] is a list of names of sequences in the ith OTU.