]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedlistvector.h
fixes while testing 1.33.0
[mothur.git] / sharedlistvector.h
index 228ccf1865888664396aa08bf94bc9fc2dd2eddd..13fed9791fb347806f33723893aacd15eb535690 100644 (file)
  *
  */
 
-#include <Carbon/Carbon.h>
 #include "datavector.hpp"
 #include "groupmap.h"
-#include "globaldata.hpp"
+#include "counttable.h"
 #include "sharedrabundvector.h"
 #include "sharedsabundvector.h"
-#include <iostream>
-#include <map>
 
 /* 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 
 class SharedListVector : public DataVector {
        
 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<string> getLabels();
+    void setLabels(vector<string>);
        void push_back(string);
        void resize(int);
        void clear();
@@ -56,16 +56,17 @@ public:
        SharedOrderVector* getSharedOrderVector();
        SharedRAbundVector getSharedRAbundVector(string);  //get sharedrabundvector for a certain group
        SharedSAbundVector getSharedSAbundVector(string);                       //get sharedsabundvector for a certain group
+       vector<SharedRAbundVector*> getSharedRAbundVector(); //returns sharedRabundVectors for all the users groups
        
 private:
        vector<string> 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<string> binLabels;
 
 };
 
 #endif
-