-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
executable file
·52 lines (42 loc) · 1.19 KB
/
main.cpp
File metadata and controls
executable file
·52 lines (42 loc) · 1.19 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
45
46
47
48
49
50
51
52
#include <iostream>
#include <algorithm>
#include "include/Graph.h"
#include "include/Vertex.h"
#include <vector>
#include <map>
using namespace std;
int main()
{
Graph *g1 = new Graph("/home/users/ambyassa/g1.txt");
g1->showAdjMatrix();
g1->populateVertices();
g1->showVertices();
g1->populateEdges();
g1->showEdges();
g1->matrixToList();
g1->showAdjList();
/*
Vertex *src = new Vertex(1, 10, 1);
Vertex *dest = new Vertex(1, 2, 2);
Edge *e1 = new Edge(src, dest, 15);
e1->show();
map <string, bool>SETUP{
{"ORIENTED", true},
{"SELF_LOOP", true},
};
Graph *g1 = new Graph(4, SETUP);
Vertex *v = new Vertex();
g1->addVertex(*v);
g1->showVertices();
g1->showEdges();
g1->addEdge(g1->verticesList[0], g1->verticesList[1], 18.5);
g1->addEdge(g1->verticesList[2], g1->verticesList[3], 5.5);
g1->addEdge(g1->verticesList[1], g1->verticesList[4], 0.5);
g1->showEdges();
cout << g1->findVertexById(2) << endl << g1->findVertexById(4) << endl << g1->findVertexById(8) <<endl;
g1->showAdjMatrix();
*/
//Vertex *i = find(g1->verticesList.begin(), g1->verticesList.end(), g1->verticesList[0]);
//cout <<
return 0;
}