7 * Created by Sarah Westcott on 12/9/08.
8 * Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
12 /* This class is a child to datavector. It represents OTU information at a certain distance.
13 It is similiar to an order vector except each member of data knows which group it belongs to.
14 Each member of the internal container "data" represents is an individual which knows the OTU from which it came,
15 the group it is in and the abundance is equal to the OTU number. */
20 #include "datavector.hpp"
28 #include "sabundvector.hpp"
29 #include "rabundvector.hpp"
30 #include "sharedrabundvector.h"
31 #include "sharedsabundvector.h"
32 #include "globaldata.hpp"
35 class SharedOrderVector : public DataVector {
39 // SharedOrderVector(int ns, int nb=0, int mr=0) : DataVector(), data(ns, -1), maxRank(0), numBins(0), numSeqs(0) {};
40 SharedOrderVector(const SharedOrderVector& ov) : DataVector(ov.label), data(ov.data), maxRank(ov.maxRank), numBins(ov.numBins), numSeqs(ov.numSeqs), needToUpdate(ov.needToUpdate) {if(needToUpdate == 1){ updateStats();}};
42 SharedOrderVector(string, vector<individual>);
43 SharedOrderVector(ifstream&);
44 ~SharedOrderVector(){};
46 void set(int, int, int, string); //index, OTU, abundance, group
48 void push_back(int, int, string); //OTU, abundance, group
52 vector<individual>::iterator begin();
53 vector<individual>::iterator end();
60 RAbundVector getRAbundVector();
61 SAbundVector getSAbundVector();
62 OrderVector getOrderVector(map<string,int>*);
63 SharedOrderVector getSharedOrderVector();
64 SharedRAbundVector getSharedRAbundVector(string); //get the sharedRabundvector for a sepecific group
65 SharedSAbundVector getSharedSAbundVector(string); //get the sharedSabundvector for a sepecific group
68 GlobalData* globaldata;
70 vector<individual> data;
71 map< int, vector<individual> >::iterator it;