-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGraph.h
More file actions
43 lines (38 loc) · 1.03 KB
/
Graph.h
File metadata and controls
43 lines (38 loc) · 1.03 KB
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
#pragma once
#include "FifoQueue.h"
#include "PriorityQueue.h"
#include "HighLabelQueue.h"
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
using namespace std;
class Graph
{
public:
Graph::Graph(string file, bool hlQueue);
~Graph(void);
int getSource() { return sourceID; }
int getTarget() { return targetID; }
int getNodesNum() { return nodesNum; }
int getEdgesNum() { return edgesNum; }
int getMaxDistance() { return maxDistance; }
void setMaxDistance(int max) { maxDistance = max; }
NodePool* getPool() { return pool; }
int readGraph (string file);
int printGraph(string file);
int debugDump();
Node* getNodeArray() { return nodeArray; }
int dijkstra(int source_id, int* &dist, int* &prev, int &max);
int* prevArray; //This will hold the previous node in the BFS path for each node
int incPrevPathCap(int val);
private:
int sourceID;
int targetID;
int nodesNum;
int edgesNum;
int maxDistance;
NodePool* pool;
Node* nodeArray;
};