1 #ifndef SHAREDRABUNDFLOATVECTOR_H
2 #define SHAREDRABUNDFLOATVECTOR_H
5 * sharedrabundfloatvector.h
8 * Created by westcott on 8/18/10.
9 * Copyright 2010 Schloss Lab. All rights reserved.
14 #include "datavector.hpp"
15 #include "sharedordervector.h"
16 #include "sharedsabundvector.h"
17 #include "rabundvector.hpp"
18 //#include "groupmap.h"
20 /* This class is a child to datavector. It represents OTU information at a certain distance.
21 It is similiar to an rabundvector except each member of data knows which group it belongs to.
22 Each member of the internal container "data" is a struct of type individualFloat.
23 An individual which knows the OTU from which it came,
24 the group it is in and its abundance. */
27 class SharedRAbundFloatVector : public DataVector {
30 SharedRAbundFloatVector();
31 SharedRAbundFloatVector(int);
32 SharedRAbundFloatVector(const SharedRAbundFloatVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs), group(bv.group), index(bv.index){};
33 SharedRAbundFloatVector(ifstream&);
34 ~SharedRAbundFloatVector();
40 void setGroup(string);
42 void setGroupIndex(int);
44 void set(int, float, string); //OTU, abundance, groupname
45 individualFloat get(int);
46 vector <individual> getData();
47 float getAbundance(int);
48 void push_front(float, int, string); //abundance, otu, groupname
49 void insert(float, int, string); //abundance, otu, groupname
50 void push_back(float, string); //abundance, groupname
57 void printHeaders(ostream&);
59 RAbundVector getRAbundVector();
60 SAbundVector getSAbundVector();
61 OrderVector getOrderVector(map<string,int>*);
62 //SharedOrderVector getSharedOrderVector();
63 //SharedSAbundVector getSharedSAbundVector();
64 //SharedRAbundVector getSharedRAbundVector();
65 SharedRAbundFloatVector getSharedRAbundFloatVector();
66 vector<SharedRAbundFloatVector*> getSharedRAbundFloatVectors();
69 vector<individualFloat> data;
70 vector<SharedRAbundFloatVector*> lookup;
71 //GlobalData* globaldata;
79 int eliminateZeroOTUS(vector<SharedRAbundFloatVector*>&);