]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedrabundvector.h
pca command
[mothur.git] / sharedrabundvector.h
index 5cc92a3b0904d7e685d89b8160c396f249164d1e..beece8e14a1082d7347a62fdc0e95ebcd24a9cc2 100644 (file)
@@ -13,7 +13,9 @@
 #include "datavector.hpp"
 #include "sharedordervector.h"
 #include "sharedsabundvector.h"
+#include "sharedrabundfloatvector.h"
 #include "rabundvector.hpp"
+#include "groupmap.h"
 
 /* This class is a child to datavector.  It represents OTU information at a certain distance. 
        It is similiar to an rabundvector except each member of data knows which group it belongs to.
@@ -21,7 +23,7 @@
        An individual which knows the OTU from which it came, 
        the group it is in and its abundance.  */
 
-
+class GlobalData;
 
 class SharedRAbundVector : public DataVector {
        
@@ -29,8 +31,8 @@ public:
        SharedRAbundVector();
        SharedRAbundVector(int);
        //SharedRAbundVector(string, vector<int>);
-       SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs){};
-    //SharedRAbundVector(ifstream&);
+       SharedRAbundVector(const SharedRAbundVector& bv) : DataVector(bv), data(bv.data), maxRank(bv.maxRank), numBins(bv.numBins), numSeqs(bv.numSeqs), group(bv.group), index(bv.index){};
+    SharedRAbundVector(ifstream&);
        ~SharedRAbundVector();
 
        int getNumBins();               
@@ -50,10 +52,11 @@ public:
        void sortD();  //Sorts the data in descending order.
        void push_front(int, int, string); //abundance, otu, groupname
        void insert(int, int, string); //abundance, otu, groupname
-       void push_back(int, int, string);  //abundance, otu, groupname
+       void push_back(int, string);  //abundance, groupname
        void pop_back();
        void resize(int);
        int size();
+       void clear();
        vector<individual>::reverse_iterator rbegin();
        vector<individual>::reverse_iterator rend();
        
@@ -66,14 +69,21 @@ public:
        SharedOrderVector getSharedOrderVector();
        SharedSAbundVector getSharedSAbundVector();
        SharedRAbundVector getSharedRAbundVector();
+       vector<SharedRAbundVector*> getSharedRAbundVectors();
+       vector<SharedRAbundFloatVector*> getSharedRAbundFloatVectors(vector<SharedRAbundVector*>);
        
 private:
        vector<individual>  data; 
+       vector<SharedRAbundVector*> lookup;
+       GlobalData* globaldata;
+       GroupMap* groupmap;
        int maxRank;
        int numBins;
        int numSeqs;
        string group;
        int index;      
+       
+       int eliminateZeroOTUS(vector<SharedRAbundVector*>&);
 };