]> git.donarmstrong.com Git - mothur.git/blob - tree.h
fixed bug in sharedcommand and parselistcommand and changed file extension of sorenso...
[mothur.git] / tree.h
1 #ifndef TREE_H
2 #define TREE_H
3
4 /*
5  *  tree.h
6  *  Mothur
7  *
8  *  Created by Sarah Westcott on 1/22/09.
9  *  Copyright 2009 Schloss Lab UMASS Amherst. All rights reserved.
10  *
11  */
12
13 using namespace std;
14
15 #include <string>
16 #include <iostream>
17 #include <vector>
18
19 struct Node  {
20                 string  name;
21                 string  group;
22                 float   branchLength;
23                 Node*   parent;
24                 Node*   lchild;
25                 Node*   rchild;
26 };              
27
28
29
30 class Tree {
31         public: 
32                 Tree();
33                 ~Tree();
34                 
35                 Node* getParent(Node);
36                 Node* getLChild(Node);
37                 Node* getRChild(Node);
38                 
39                 void setParent(Node);
40                 void setLChild(Node);
41                 void setRChild(Node);
42                 
43                 
44                 Tree generateRandomTree();
45                 
46                 vector<Node> leaves;            //gives you easy access to the leaves of the tree to generate the parsimony score
47                 
48         private:
49 };
50
51
52
53
54 #endif