-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGraph.h
56 lines (41 loc) · 977 Bytes
/
Graph.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
55
56
#pragma once
#include "List.h"
#include "Queue.h"
#include <iostream>
#define infiniti -1
using namespace std;
class Graph
{
private:
int _start;
int _end;
int numOfVertices;
public:
List* VerticesArray;
//Ctors & Dtor
Graph();
Graph(int numOfVertices);
~Graph();
Graph& Transpose();
List& GetAdjList(int u);
int* BFS(int vertex);
bool IsAdjacent(int u, int v);
bool isVertexValueValid(int value);
int IsEmpty();
int AddEdge(int i, int j);
List* MakeEmptyGraph(int n);
void RemoveEdge(int u, int v);
void RemoveRedundantEdges(int* distanceArray);
void RemoveUnreachableEdges(int* distanceArray);
// need to implement
void ReadGraph();
void PrintGraph();
//Getters
List* GetVerticesArray() { return VerticesArray; }
int GetStart() { return _start; }
int GetEnd() { return _end; }
int GetNumOfVertices() { return numOfVertices; }
//Setters
// ???
//List Adj(int i);
};