]> git.donarmstrong.com Git - mothur.git/blobdiff - treenode.h
added bootstrap.shared command and fixed some bugs with heatmap
[mothur.git] / treenode.h
index 799595646268d40dbf64bb118774931ea4ae1098..58d967d5cf297bbcd82e3839822e201a0aed121f 100644 (file)
 
 using namespace std;
 
-#include <string>
-#include <iostream>
-#include <fstream>
-#include <iomanip>
-#include <vector>
-#include <map>
+#include "mothur.h"
 
 /* This class represents a node on a tree. */
 
@@ -25,7 +20,7 @@ using namespace std;
 class Node  {
        public:
                Node();  //pass it the sequence name
-               ~Node() {};
+               ~Node() { pGroups.clear(); pcount.clear(); };
                
                void setName(string);
                void setGroup(string);  
@@ -33,15 +28,17 @@ class Node  {
                void setParent(int);
                void setChildren(int, int);             //leftchild, rightchild
                void setIndex(int);
+               void setLengthToLeaves(float);
                
                string getName();
                string getGroup();  
                float getBranchLength();
+               float getLengthToLeaves();
                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;
@@ -56,7 +53,7 @@ class Node  {
        private:
                string                  name;
                string                  group;
-               float                   branchLength;
+               float                   branchLength, length2leaf;
                int                             parent;
                int                             lchild;
                int                             rchild;