-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathManager.h
More file actions
44 lines (40 loc) · 1.32 KB
/
Copy pathManager.h
File metadata and controls
44 lines (40 loc) · 1.32 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
44
#define _CRT_SECURE_NO_WARNINGS
#ifndef SOLUTION_H
#define SOLUTION_H
#include "Result.h"
#include "Graph.h"
#include <fstream>
class Manager
{
private:
// the filepath for the result log
const char* RESULT_LOG_PATH = "log.txt";
// the file stream for the result log
std::ofstream fout;
// graph instance to manage the vertics.
Graph m_graph;
public:
~Manager();
void Run(const char* filepath);
void PrintError(Result result);
void PrintErrorName(char* command, string name);
int sel=1;//sort selector
private:
Result Load(const char* filepath);
Result Update();
Result Print();
Result FindPathBfs(int startVertexKey, int endVertexKey);
Result FindShortestPathDijkstraUsingSet(int startVertexKey, int endVertexKey);
Result FindShortestPathDijkstraUsingMinHeap(int startVertexKey, int endVertexKey);
Result FindShortestPathBellmanFord(int startVertexKey, int endVertexKey);
Result FindShortestPathFloyd();
Result RabinKarpCompare(string longstr, string shortstr);
void QuickSort(vector<int>& v, int left, int right);
void InsertSort(vector<int>& v);
void MergeSort(vector<int>& v, int left, int right);
void HeapSort(vector<int>& v);
void BubbleSort(vector<int>& v);
void CountingSort(vector<int>& v);
string Compression(string s);
};
#endif