X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedrabundvector.h;h=792543e5abe87e9ac346f98004f33af1c8a39e46;hb=a6cf29fa4dac0909c7582cb1094151d34093ee76;hp=0c71394689e8aad4d522e5f1ba6948466b218f56;hpb=016a30dacbe75869aef5fdb58d2d1bf9eb8f9b33;p=mothur.git diff --git a/sharedrabundvector.h b/sharedrabundvector.h index 0c71394..792543e 100644 --- a/sharedrabundvector.h +++ b/sharedrabundvector.h @@ -13,16 +13,18 @@ #include "datavector.hpp" #include "sharedordervector.h" #include "sharedsabundvector.h" +#include "sharedrabundfloatvector.h" #include "rabundvector.hpp" -#include "groupmap.h" +//#include "groupmap.h" -/* This class is a child to datavector. It represents OTU information at a certain distance. +/* DataStructure for a shared file. + 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. Each member of the internal container "data" is a struct of type individual. An individual which knows the OTU from which it came, the group it is in and its abundance. */ -class GlobalData; +//class GlobalData; class SharedRAbundVector : public DataVector { @@ -30,7 +32,7 @@ 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(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(); @@ -39,6 +41,8 @@ public: int getMaxRank(); string getGroup(); void setGroup(string); + string getBinLabel(); + void setBinLabel(string); int getGroupIndex(); void setGroupIndex(int); @@ -51,14 +55,16 @@ public: 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, int, string); //abundance, otu, groupname + void push_back(int, string); //abundance, groupname void pop_back(); void resize(int); int size(); + void clear(); vector::reverse_iterator rbegin(); vector::reverse_iterator rend(); void print(ostream&); + void printHeaders(ostream&); RAbundVector getRAbundVector(); RAbundVector getRAbundVector2(); @@ -68,17 +74,20 @@ public: SharedSAbundVector getSharedSAbundVector(); SharedRAbundVector getSharedRAbundVector(); vector getSharedRAbundVectors(); + vector getSharedRAbundFloatVectors(vector); private: vector data; vector lookup; - GlobalData* globaldata; - GroupMap* groupmap; + //GlobalData* globaldata; + //GroupMap* groupmap; int maxRank; int numBins; int numSeqs; string group; int index; + + int eliminateZeroOTUS(vector&); };