X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=rabundvector.hpp;h=c7222291e714d3b23879e594a8fcf51bc9ce331d;hp=327b29b5dc8fa881ca8f8f543c1f5f293974cda8;hb=cf9987b67aa49777a4c91c2d21f96e58bf17aa82;hpb=fd282e6b4be2560f5b1bd154a9e8d24b798eefaf diff --git a/rabundvector.hpp b/rabundvector.hpp index 327b29b..c722229 100644 --- a/rabundvector.hpp +++ b/rabundvector.hpp @@ -3,7 +3,8 @@ #include "datavector.hpp" -/* This class is a child to datavector. It represents OTU information at a certain distance. +/* Data Structure for a rabund file. + This class is a child to datavector. It represents OTU information at a certain distance. A rabundvector can be converted into and ordervector, listvector or sabundvector. Each member of the internal container "data" represents an individual OTU. So data[0] = 6, because there are six member in that OTU. @@ -12,11 +13,15 @@ sabundvector = 2 1 1 0 0 1 ordervector = 1 1 1 1 1 1 2 2 2 3 3 4 5 */ +//class SAbundVector; +//class OrderVector; + class RAbundVector : public DataVector { public: RAbundVector(); RAbundVector(int); + RAbundVector(vector, int, int, int); // RAbundVector(const RAbundVector&); RAbundVector(string, vector); RAbundVector(const RAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){}; @@ -33,11 +38,17 @@ public: void pop_back(); void resize(int); int size(); + void quicksort(); + int sum(); + int sum(int); + int numNZ(); + void clear(); vector::reverse_iterator rbegin(); vector::reverse_iterator rend(); void print(ostream&); void print(string, ostream&); + void nonSortedPrint(ostream&); RAbundVector getRAbundVector(); SAbundVector getSAbundVector();