]> git.donarmstrong.com Git - mothur.git/blobdiff - sharedchao1.h
added concensus command and updated calcs
[mothur.git] / sharedchao1.h
index 7cca63a8fb48bb9ac9a45757d95436562deff455..243039e3a8822c0b9e7a66b6e17d08fcee56cf34 100644 (file)
@@ -17,12 +17,30 @@ It is a child of the calculator class. */
 
 /***********************************************************************/
 
+
 class SharedChao1 : public Calculator  {
        
-public: 
-       SharedChao1() : Calculator("sharedchao", 3) {};
-       EstOutput getValues(SAbundVector*) {return data;};
-       EstOutput getValues(SharedRAbundVector*, SharedRAbundVector*);
+       public: 
+               SharedChao1() : Calculator("sharedchao", 3, true) {};
+               EstOutput getValues(SAbundVector*) {return data;};
+               EstOutput getValues(vector<SharedRAbundVector*>);
+       private:
+               IntNode* f1root;
+               IntNode* f2root;
+               vector<IntNode*> f1leaves;
+               vector<IntNode*> f2leaves;
+               int numLeaves;
+               int numNodes;
+
+               void initialTree(int);  //builds trees structure with n leaf nodes initialized to 0.
+               void setCoef(IntNode*, int);
+               void updateTree(vector<int>); //take vector containing the abundance info. for a bin and updates trees.
+               void updateBranchf1(IntNode*, vector<int>, int);  //pointer, vector of abundance values, index into vector
+               void updateBranchf2(IntNode*, vector<int>, int);  //pointer, vector of abundance values, index into vector
+               
+               //for debugging
+               void printTree();
+               void printBranch(IntNode*);
 };
 
 /***********************************************************************/