-
Notifications
You must be signed in to change notification settings - Fork 5
/
Edge.h
55 lines (41 loc) · 977 Bytes
/
Edge.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
////////////////////////////////////////////////////////////////////////////////////
// Copyright © Charalambos "Charis" Poullis, [email protected] //
// This work can only be used under an exclusive license of the author. //
////////////////////////////////////////////////////////////////////////////////////
#ifndef __EDGE_H__
#define __EDGE_H__
/** Edge
* This class defines an edge connecting 2 points
*
**/
class Edge {
public:
///Constructor 2
Edge(Edge *_edge) {
vertex1 = _edge->vertex1;
vertex2 = _edge->vertex2;
}
///Copy constructor
Edge(Edge const &_edge) {
vertex1 = _edge.vertex1;
vertex2 = _edge.vertex2;
}
///Constructor 3
Edge(int v1, int v2) {
vertex1 = v1;
vertex2 = v2;
}
///Get values
int getVertex1() {
return vertex1;
}
int getVertex2() {
return vertex2;
}
private:
///The two vertices
int vertex1,vertex2;
///Constructor
Edge() {;}
};
#endif