-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVertex.h
More file actions
31 lines (29 loc) · 762 Bytes
/
Copy pathVertex.h
File metadata and controls
31 lines (29 loc) · 762 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
27
28
29
30
#pragma once
#include "GraphNode.h"
#include <list>
#include <algorithm>
#include <string>
#include <iostream>
using namespace std;
class Vertex
{
private:
int vertexName;
list<GraphNode>* l;
public:
Vertex() : vertexName(-1), l(new list<GraphNode>{}) {};
Vertex(int vertexName, list<GraphNode>* l);
list<GraphNode>::iterator findEdge(int v) const;
list<int> getAdjList() const;
list<GraphNode> getAdjFullList() const;
void removeEdge(int v);
void addEdge(int v, int c);
void addFlow(int v, int f);
void printAdjList() const;
int getVertexName() const;
friend bool operator==(const Vertex& a, const Vertex& b);
int getCapacity(int v) const;
int getFlow(int v) const;
Vertex& operator=(const Vertex& a);
bool checkIfEdgeExists(int v) const;
};