X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedrabundvector.h;h=8f4227eebe0c21823a6f25d22ed3e29dbee79ab3;hb=30f2d98fffb579b870c8969ddcc1dfc61ccbb70a;hp=5547f89dabeafdf59554e4c8d2144e5375b38fe8;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed;p=mothur.git diff --git a/sharedrabundvector.h b/sharedrabundvector.h index 5547f89..8f4227e 100644 --- a/sharedrabundvector.h +++ b/sharedrabundvector.h @@ -14,6 +14,7 @@ #include "sharedordervector.h" #include "sharedsabundvector.h" #include "rabundvector.hpp" +#include "groupmap.h" /* This class is a child to datavector. It represents OTU information at a certain distance. It is similiar to an rabundvector except each member of data knows which group it belongs to. @@ -21,7 +22,7 @@ An individual which knows the OTU from which it came, the group it is in and its abundance. */ - +class GlobalData; class SharedRAbundVector : public DataVector { @@ -29,20 +30,28 @@ public: SharedRAbundVector(); SharedRAbundVector(int); //SharedRAbundVector(string, vector); - SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){}; -// SharedRAbundVector(ifstream&); + SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs), group(bv.group), index(bv.index){}; + SharedRAbundVector(ifstream&); ~SharedRAbundVector(); int getNumBins(); int getNumSeqs(); int getMaxRank(); string getGroup(); - void setGroup(string); + void setGroup(string); + int getGroupIndex(); + void setGroupIndex(int); void set(int, int, string); //OTU, abundance, groupname + void setData(vector ); individual get(int); + vector getData(); int getAbundance(int); - void push_back(int, int, string); //abundance, OTU, groupname + int numNZ(); + void sortD(); //Sorts the data in descending order. + void push_front(int, int, string); //abundance, otu, groupname + void insert(int, int, string); //abundance, otu, groupname + void push_back(int, string); //abundance, groupname void pop_back(); void resize(int); int size(); @@ -52,18 +61,24 @@ public: void print(ostream&); RAbundVector getRAbundVector(); + RAbundVector getRAbundVector2(); SAbundVector getSAbundVector(); OrderVector getOrderVector(map*); SharedOrderVector getSharedOrderVector(); SharedSAbundVector getSharedSAbundVector(); SharedRAbundVector getSharedRAbundVector(); + vector getSharedRAbundVectors(); private: vector data; + vector lookup; + GlobalData* globaldata; + GroupMap* groupmap; int maxRank; int numBins; int numSeqs; - string group; + string group; + int index; };