X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=listvector.hpp;h=b2bc511cfd258da992f9f1b8a44971f4dd29e3e2;hp=e195f4e089f48afd94d3027470b8bf42b1e165a3;hb=b206f634aae1b4ce13978d203247fb64757d5482;hpb=fd282e6b4be2560f5b1bd154a9e8d24b798eefaf diff --git a/listvector.hpp b/listvector.hpp index e195f4e..b2bc511 100644 --- a/listvector.hpp +++ b/listvector.hpp @@ -1,12 +1,10 @@ #ifndef LIST_H #define LIST_H -#include #include "datavector.hpp" -#include -#include -/* This class is a child to datavector. It represents OTU information at a certain distance. +/* DataStructure for a list file. + This class is a child to datavector. It represents OTU information at a certain distance. A list vector can be converted into and ordervector, rabundvector or sabundvector. Each member of the internal container "data" represents an individual OTU. So data[0] = "a,b,c,d,e,f". @@ -22,7 +20,7 @@ public: ListVector(int); // ListVector(const ListVector&); ListVector(string, vector); - ListVector(const ListVector& lv) : DataVector(lv.label), data(lv.data), maxRank(lv.maxRank), numBins(lv.numBins), numSeqs(lv.numSeqs){}; + ListVector(const ListVector& lv) : DataVector(lv.label), data(lv.data), maxRank(lv.maxRank), numBins(lv.numBins), numSeqs(lv.numSeqs), binLabels(lv.binLabels) {}; ListVector(ifstream&); ~ListVector(){}; @@ -32,11 +30,14 @@ public: void set(int, string); string get(int); + vector getLabels(); + void setLabels(vector); void push_back(string); void resize(int); void clear(); int size(); void print(ostream&); + void printHeaders(ostream&); RAbundVector getRAbundVector(); SAbundVector getSAbundVector(); @@ -47,6 +48,7 @@ private: int maxRank; int numBins; int numSeqs; + vector binLabels; };