X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedchao1.h;h=243039e3a8822c0b9e7a66b6e17d08fcee56cf34;hb=2bb20fb79f19b8bda48492d89f8e8b7389431413;hp=86f718fdaae07b85e8f9d796af51b3b0761b4524;hpb=20a2d0350a737a434c89f303662d64a8eeea7b05;p=mothur.git diff --git a/sharedchao1.h b/sharedchao1.h index 86f718f..243039e 100644 --- a/sharedchao1.h +++ b/sharedchao1.h @@ -13,18 +13,36 @@ It is a child of the calculator class. */ -#include #include "calculator.h" /***********************************************************************/ + 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); + private: + IntNode* f1root; + IntNode* f2root; + vector f1leaves; + vector 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); //take vector containing the abundance info. for a bin and updates trees. + void updateBranchf1(IntNode*, vector, int); //pointer, vector of abundance values, index into vector + void updateBranchf2(IntNode*, vector, int); //pointer, vector of abundance values, index into vector + + //for debugging + void printTree(); + void printBranch(IntNode*); }; /***********************************************************************/ -#endif \ No newline at end of file + +#endif