-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraphNode.cpp
More file actions
26 lines (23 loc) · 791 Bytes
/
Copy pathGraphNode.cpp
File metadata and controls
26 lines (23 loc) · 791 Bytes
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
#include "GraphNode.h"
bool operator<(const GraphNode& a, const GraphNode& b) {
return a.capacity < b.capacity;
};
bool operator>(const GraphNode& a, const GraphNode& b) {
return a.capacity > b.capacity;
};
bool operator==(const GraphNode& a, const int& i) {
return a.vertexName == i;
};
bool operator==(const GraphNode& a, const GraphNode& b) {
return a.vertexName == b.vertexName;
};
bool operator<=(const GraphNode& a, const GraphNode& b) {
return a.capacity <= b.capacity;
};
bool operator>=(const GraphNode& a, const GraphNode& b) {
return a.capacity >= b.capacity;
};
ostream& operator<<(std::ostream& os, const GraphNode& p) {
os << "Vertex Name : " << p.getVertexName() << " Capacity : " << p.getCapacity() << " Flow : " << p.getFlow() << endl;
return os;
}