]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedordervector.h
started adding chimeraslayer method and fixed minor bug in treegroupscommand deconstr...
[mothur.git] / sharedordervector.h
index a530ad65289a67a9c92cbeeb55c0ce661ef1ac8c..d0a714cf98c8d0406fc5ebba751d4fe63d40ac31 100644 (file)
@@ -2,7 +2,7 @@
 #define SHAREDORDER_H
 /*
  *  sharedorder.h
- *  Dotur
+ *  Mothur
  *
  *  Created by Sarah Westcott on 12/9/08.
  *  Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
@@ -15,8 +15,6 @@
        the group it is in and the abundance is equal to the OTU number.  */
 
 
-using namespace std;
-
 #include "datavector.hpp"
 
 struct individual {
@@ -34,6 +32,9 @@ struct individual {
 #include "sharedsabundvector.h"
 #include "globaldata.hpp"
 #include "groupmap.h"
+//#include "globaldata.hpp"
+
+class GlobalData;
 
 class SharedOrderVector : public DataVector {
        
@@ -46,15 +47,15 @@ public:
        SharedOrderVector(ifstream&);
        ~SharedOrderVector(){};
        
-       void set(int, int, int, string);        //index, OTU, abundance, group
+       
        individual get(int);
-       void push_back(int, int, string);  //OTU, abundance, group
        void resize(int);
        int size();
        void print(ostream&);
        vector<individual>::iterator begin();
        vector<individual>::iterator end();
-
+       void push_back(int, int, string);  //OTU, abundance, group  MUST CALL UPDATE STATS AFTER PUSHBACK!!!
+       void updateStats();
 
        int getNumBins();
        int getNumSeqs();
@@ -66,6 +67,7 @@ public:
        SharedOrderVector getSharedOrderVector();
        SharedRAbundVector getSharedRAbundVector(string);  //get the sharedRabundvector for a sepecific group
        SharedSAbundVector getSharedSAbundVector(string);       //get the sharedSabundvector for a sepecific group
+       vector<SharedRAbundVector*> getSharedRAbundVector(); //returns sharedRabundVectors for all the users groups
        
 private:
        GlobalData* globaldata;
@@ -76,7 +78,8 @@ private:
        int numBins;
        int numSeqs;
        bool needToUpdate;
-       void updateStats();
+       void set(int, int, int, string);        //index, OTU, abundance, group
+       
 };
 
 #endif