X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedordervector.h;h=7d383ac84f431830e2324cd51d4777d80a3390e0;hb=250e3b11b1c9c1e1ad458ab6c7e71ac2e67e11d9;hp=d0a714cf98c8d0406fc5ebba751d4fe63d40ac31;hpb=74c78f9abd9e733f0c2f812efec97a76632fcbf8;p=mothur.git diff --git a/sharedordervector.h b/sharedordervector.h index d0a714c..7d383ac 100644 --- a/sharedordervector.h +++ b/sharedordervector.h @@ -24,17 +24,25 @@ struct individual { bool operator()(const individual& i1, const individual& i2) { return (i1.abundance > i2.abundance); } + individual() { group = ""; bin = 0; abundance = 0; } }; +struct individualFloat { + string group; + int bin; + float abundance; + bool operator()(const individual& i1, const individual& i2) { + return (i1.abundance > i2.abundance); + } + individualFloat() { group = ""; bin = 0; abundance = 0.0; } +}; + + #include "sabundvector.hpp" #include "rabundvector.hpp" #include "sharedrabundvector.h" #include "sharedsabundvector.h" -#include "globaldata.hpp" #include "groupmap.h" -//#include "globaldata.hpp" - -class GlobalData; class SharedOrderVector : public DataVector { @@ -56,6 +64,7 @@ public: vector::iterator end(); void push_back(int, int, string); //OTU, abundance, group MUST CALL UPDATE STATS AFTER PUSHBACK!!! void updateStats(); + void clear(); int getNumBins(); int getNumSeqs(); @@ -70,7 +79,6 @@ public: vector getSharedRAbundVector(); //returns sharedRabundVectors for all the users groups private: - GlobalData* globaldata; GroupMap* groupmap; vector data; map< int, vector >::iterator it;