]> git.donarmstrong.com Git - mothur.git/blobdiff - treenode.h
fixed some bugs
[mothur.git] / treenode.h
index a5c39167ca6bda64c8058e99b16a02ca4e07c748..d6163a2b1275f9816a576659019d178005042e6d 100644 (file)
@@ -10,8 +10,6 @@
  *
  */
 
-using namespace std;
-
 #include "mothur.h"
 
 /* This class represents a node on a tree. */
@@ -20,18 +18,22 @@ 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 setBranchLength(float);
+               void setLabel(float);
                void setParent(int);
                void setChildren(int, int);             //leftchild, rightchild
                void setIndex(int);
+               void setLengthToLeaves(float);
                
                string getName();
                string getGroup();  
                float getBranchLength();
+               float getLengthToLeaves();
+               float getLabel();
                int getParent();
                int getLChild();
                int getRChild();
@@ -51,7 +53,7 @@ class Node  {
        private:
                string                  name;
                string                  group;
-               float                   branchLength;
+               float                   branchLength, length2leaf, label;
                int                             parent;
                int                             lchild;
                int                             rchild;