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"
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. */
28 class SharedRAbundFloatVector : public DataVector {
31 SharedRAbundFloatVector();
32 SharedRAbundFloatVector(int);
33 SharedRAbundFloatVector(const SharedRAbundFloatVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs), group(bv.group), index(bv.index){};
34 SharedRAbundFloatVector(ifstream&);
35 ~SharedRAbundFloatVector();
41 void setGroup(string);
43 void setGroupIndex(int);
45 void set(int, float, string); //OTU, abundance, groupname
46 individualFloat get(int);
47 vector <individual> getData();
48 float getAbundance(int);
49 void push_front(float, int, string); //abundance, otu, groupname
50 void insert(float, int, string); //abundance, otu, groupname
51 void push_back(float, string); //abundance, groupname
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;