X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=sharedlistvector.h;h=13fed9791fb347806f33723893aacd15eb535690;hp=f62248db77da9895e25fcb57f687fcf24922b47d;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=58cf1d08fee8c64334979075fa57bcafb035a2ed diff --git a/sharedlistvector.h b/sharedlistvector.h index f62248d..13fed97 100644 --- a/sharedlistvector.h +++ b/sharedlistvector.h @@ -12,11 +12,9 @@ #include "datavector.hpp" #include "groupmap.h" -#include "globaldata.hpp" +#include "counttable.h" #include "sharedrabundvector.h" #include "sharedsabundvector.h" -#include -#include /* This class is a child to datavector. It represents OTU information at a certain distance. A sharedlistvector can be converted into a sharedordervector, sharedrabundvector or sharedsabundvectorand @@ -35,8 +33,8 @@ public: SharedListVector(); SharedListVector(int); SharedListVector(ifstream&); - SharedListVector(const SharedListVector& lv) : DataVector(lv.label), data(lv.data), maxRank(lv.maxRank), numBins(lv.numBins), numSeqs(lv.numSeqs){}; - ~SharedListVector(){}; + SharedListVector(const SharedListVector& lv) : DataVector(lv.label), data(lv.data), maxRank(lv.maxRank), numBins(lv.numBins), numSeqs(lv.numSeqs), binLabels(lv.binLabels) { groupmap = NULL; countTable = NULL; }; + ~SharedListVector(){ if (groupmap != NULL) { delete groupmap; } if (countTable != NULL) { delete countTable; } }; int getNumBins() { return numBins; } int getNumSeqs() { return numSeqs; } @@ -44,6 +42,8 @@ public: void set(int, string); string get(int); + vector getLabels(); + void setLabels(vector); void push_back(string); void resize(int); void clear(); @@ -56,14 +56,16 @@ public: SharedOrderVector* getSharedOrderVector(); SharedRAbundVector getSharedRAbundVector(string); //get sharedrabundvector for a certain group SharedSAbundVector getSharedSAbundVector(string); //get sharedsabundvector for a certain group + vector getSharedRAbundVector(); //returns sharedRabundVectors for all the users groups private: vector data; //data[i] is a list of names of sequences in the ith OTU. - GlobalData* globaldata; GroupMap* groupmap; + CountTable* countTable; int maxRank; int numBins; int numSeqs; + vector binLabels; };