-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode.cpp
48 lines (36 loc) · 802 Bytes
/
node.cpp
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
47
48
#include "ibex.h"
#include "node.h"
using namespace ibex;
using namespace std;
Node::Node(): _value(IntervalVector::empty(2)), _dist(10000000), _pred(NULL)
{
_neighbor.reserve(15);
}
Node::Node(IntervalVector value): _value(value), _dist(10000000), _pred(NULL)
{
_neighbor.reserve(15);
}
vector<Node*> Node::getNeighbor() const{
return _neighbor;
}
IntervalVector Node::getValue() const{
return _value;
}
void Node::addNeighbor(Node* newNeighbor){
_neighbor.push_back(newNeighbor);
}
void Node::setValue(IntervalVector newValue){
_value = newValue;
}
void Node::setDist(double newDist){
_dist = newDist;
}
void Node::setPred(Node* newPred){
_pred = newPred;
}
double Node::getDist() const{
return _dist;
}
Node* Node::getPred() const{
return _pred;
}