-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
43 lines (36 loc) · 891 Bytes
/
main.cpp
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
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>
#include "BinaryTree.h"
#include "dynamicP.h"
#include "graph.h"
#include "select.h"
#include "sort.h"
#include "utils.h"
#include "timer.h"
#include "list.h"
#include "hashtable.h"
#include "Huffman.h"
int main()
{
Timer t;
std::vector<std::list<int>> adj_list = { {}, {2,7,8}, {1,3,6}, {2,4,5}, {3}, {3}, {2}, {1}, {1,9,12}, {8,10,11}, {9}, {9}, {8} };
graph G;
G.initMatrix(13);
G.addEdge(0, 1, 2);
G.addEdge(0, 6, 5);
G.addEdge(0, 7, 6);
G.addEdge(1, 2, 1);
G.addEdge(1, 5, 3);
G.addEdge(2, 3, 1);
G.addEdge(2, 4, 7);
G.addEdge(4, 9, 1);
G.addEdge(5, 8, 2);
G.addEdge(7, 8, 3);
G.addEdge(7, 11, 4);
G.addEdge(8, 9, 4);
G.addEdge(8, 10, 8);
std::cout << "Distance:\t" << G.Dijkstra(3, 10) << std::endl;
// system("PAUSE");
}