forked from JenJenChung/RAGS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVertex.h
40 lines (33 loc) · 988 Bytes
/
Vertex.h
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
#ifndef VERTEX_H_
#define VERTEX_H_
#include <vector> // std::vector
using std::vector ;
// Vertex class to contain location of vertices
class Node ;
class Vertex
{
public:
Vertex(double x, double y):
itsX(x), itsY(y) {}
~Vertex() {}
double GetX() const {return itsX ;}
void SetX(double x) {itsX = x ;}
double GetY() const {return itsY ;}
void SetY(double y) {itsY = y ;}
double GetCTC()const{return itsCTC ;}
void SetCTC(double cost_to_come) {itsCTC = cost_to_come ;}
void SetNodes(vector<Node *> NewNodes) {itsNodes = NewNodes ;}
vector<Node *> GetNodes() {return itsNodes ;}
void SetActualCost(double ac) {itsActualCost = ac;}
double GetActualCost() const {return itsActualCost ;}
friend bool operator==(const Vertex &lhs, const Vertex &rhs){
return lhs.GetX()==rhs.GetX() && lhs.GetY()==rhs.GetY();
}
private:
double itsActualCost ;
double itsX ;
double itsY ;
double itsCTC ;
vector<Node *> itsNodes ;
};
#endif // VERTEX_H_