X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=treenode.h;h=029cee9419cf7adf88344d1635e5709196bd5c73;hb=6b32d112bb60e9f7eb6d4407a4eed4c49b67bced;hp=799595646268d40dbf64bb118774931ea4ae1098;hpb=d037597badc8d18e235c59f0c1114180edb7f98f;p=mothur.git diff --git a/treenode.h b/treenode.h index 7995956..029cee9 100644 --- a/treenode.h +++ b/treenode.h @@ -10,14 +10,8 @@ * */ -using namespace std; - -#include -#include -#include -#include -#include -#include +#include "mothur.h" +#include "mothurout.h" /* This class represents a node on a tree. */ @@ -25,23 +19,27 @@ using namespace std; class Node { public: Node(); //pass it the sequence name - ~Node() {}; + ~Node() { pGroups.clear(); pcount.clear(); }; void setName(string); - void setGroup(string); + void setGroup(vector); void setBranchLength(float); + void setLabel(float); void setParent(int); void setChildren(int, int); //leftchild, rightchild void setIndex(int); + void setLengthToLeaves(float); string getName(); - string getGroup(); + vector getGroup(); float getBranchLength(); + float getLengthToLeaves(); + float getLabel(); int getParent(); int getLChild(); int getRChild(); int getIndex(); - void printNode(ostream&); //prints out the name and the branch length + void printNode(); //prints out the name and the branch length //pGroup is the parsimony group info. i.e. for a leaf node it would contain 1 enter pGroup["groupname"] = 1; @@ -55,12 +53,13 @@ class Node { private: string name; - string group; - float branchLength; + vector group; + float branchLength, length2leaf, label; int parent; int lchild; int rchild; int vectorIndex; + MothurOut* m; }; #endif