-
Notifications
You must be signed in to change notification settings - Fork 0
/
Node.cpp
59 lines (38 loc) · 967 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
49
50
51
52
53
54
55
56
57
58
59
#include "Node.h"
Node:: Node(int ver, int wei, Node* nxt , Node* prv ) {
this->vertex = ver;
this->weight = wei;
this->next = nxt;
this->prev = prv;
}
/*********************************************************************/
// Getters:
/*********************************************************************/
int Node:: getVertex() {
return this->vertex;
}
int Node::getWeight() {
return this->weight;
}
Node* Node::getNext() {
return this->next;
}
Node* Node::getPrev() {
return this->prev;
}
/*********************************************************************/
// Setters:
/*********************************************************************/
void Node:: setVertex(int val) {
this->vertex = val;
}
void Node::setWeight(int val) {
this->weight = val;
}
void Node::setNext(Node* nxt) {
this->next = nxt;
}
void Node::setPrev(Node* prv) {
this->prev = prv;
}
/*********************************************************************/