]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedordervector.h
finishing the container classes, combining read.otu and read.list commands. some...
[mothur.git] / sharedordervector.h
index ef9d6a75b9821ff013a7e94d0c3f67f57886bcf8..f925964e72b7bf7173945b7c04299bbfba1d2fdc 100644 (file)
@@ -5,14 +5,19 @@
  *  Dotur
  *
  *  Created by Sarah Westcott on 12/9/08.
- *  Copyright 2008 __MyCompanyName__. All rights reserved.
+ *  Copyright 2008 Schloss Lab UMASS Amherst. All rights reserved.
  *
  */
+ /* This class is a child to datavector.  It represents OTU information at a certain distance. 
+       It is similiar to an order vector except each member of data knows which group it belongs to.
+       Each member of the internal container "data" represents is an individual which knows the OTU from which it came, 
+       the group it is in and the abundance is equal to the OTU number.  */
+
+
+using namespace std;
 
-#include <Carbon/Carbon.h>
 #include "datavector.hpp"
-#include "sabundvector.hpp"
-#include "rabundvector.hpp"
 
 struct individual {
                string group;
@@ -20,6 +25,11 @@ struct individual {
                int abundance;
 };
 
+#include <Carbon/Carbon.h>
+#include "sabundvector.hpp"
+#include "rabundvector.hpp"
+#include "sharedrabundvector.h"
+#include "sharedsabundvector.h"
 
 class SharedOrderVector : public DataVector {
        
@@ -32,9 +42,9 @@ public:
 //     SharedOrderVector(ifstream&);
        ~SharedOrderVector(){};
        
-       void set(int, int, int, string);
+       void set(int, int, int, string);        //index, OTU, abundance, group
        individual get(int);
-       void push_back(int, int, string);
+       void push_back(int, int, string);  //OTU, abundance, group
        void resize(int);
        int size();
        void print(ostream&);
@@ -50,6 +60,8 @@ public:
        SAbundVector getSAbundVector();
        OrderVector getOrderVector(map<string,int>*);
        SharedOrderVector getSharedOrderVector();
+       SharedRAbundVector getSharedRAbundVector(string);  //get the sharedRabundvector for a sepecific group
+       SharedSAbundVector getSharedSAbundVector(string);       //get the sharedSabundvector for a sepecific group
        
 private:
        vector<individual>  data;