-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTree.hpp
More file actions
47 lines (37 loc) · 903 Bytes
/
Tree.hpp
File metadata and controls
47 lines (37 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//
// Tree.hpp
// 7-25
//
// Created by Amit Prakash on 7/30/25.
//
// Tree.hpp
// 7-25
// Created by Amit Prakash on 7/30/25.
#ifndef Tree_hpp
#define Tree_hpp
#include <map>
#include <vector>
#include <string>
class Node;
class Tree {
public:
Tree(void) = delete;
Tree(int nt, double lambda);
Tree(std::vector<std::string> TN, double lambda);
~Tree(void);
void initalizeDownPassSequence(void);
void print(void);
Node* getRoot(void) { return Root; }
void simBM(double a, double sig2);
void exportSpatialGraphCSV(const std::string& nodeFile, const std::string& edgeFile);
private:
Node* addNode(void);
void PassDown(Node* p, Node* from);
void ShowNode(Node* p, int indent);
std::vector<Node*> DownPassSequence;
std::vector<Node*> Nodes;
int NumTaxa;
Node* Root;
std::map<int, double> simdata;
};
#endif /* Tree_hpp */