-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNode.hpp
More file actions
45 lines (41 loc) · 1.06 KB
/
Node.hpp
File metadata and controls
45 lines (41 loc) · 1.06 KB
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
//
// Node.hpp
// 7-25
//
// Created by Amit Prakash on 7/25/25.
//
#ifndef Node_hpp
#define Node_hpp
#include <set>
#include <string>
#include <vector>
class Node {
public:
Node(void);
void addNeighbor(Node* p);
Node* getAncestor(void){return ancestor;}
bool getisTip(void){return isTip;}
double getbranchLength(void){return branchLength;}
std::vector<Node*>& getDescendants(void);
std::string getName(void){return name;}
std::set<Node*>& getNeighbors(void){return neighbors;}
int getOffset(void){return offset;}
int getIndex(void){return index;}
void setAncestor(Node* p){ancestor=p;}
void setisTip(bool p){isTip=p;}
void setbranchLength(double p){branchLength=p;}
void setName(std::string p){name=p;}
void setOffset(int p){offset=p;}
void setIndex(int p){index=p;}
void removeNeighbor(Node*p);
private:
Node* ancestor;
bool isTip;
double branchLength;
std::vector<Node*> descendants;
std::string name;
std::set<Node*> neighbors;
int offset;
int index;
};
#endif /* Node_hpp */