Graph 2
main.cpp
Go to the documentation of this file.
1
//graph
2
#include "
graph.h
"
3
#include <array>
4
#include <iostream>
5
#include <string>
6
#include <vector>
7
using namespace
std;
8
9
int
main
()
10
{
11
cout <<
"Hello Graph!"
<< endl;
12
const
graph
g1{
"g_2.txt"
};
13
14
cout << g1 << endl;
15
16
// construct mapping nodes to nodes
17
auto
n2n=g1.
get_node2nodes
();
18
19
cout <<
"\n -- Nodes to Node --\n"
;
20
for
(
size_t
k=0; k<n2n.size(); ++k)
21
{
22
cout << k <<
" : "
;
23
for
(
size_t
j=0; j<n2n[k].size(); ++j)
24
{
25
cout << n2n[k].at(j) <<
" "
;
26
}
27
cout << endl;
28
}
29
30
return
0;
31
}
graph
Definition:
graph.h:13
main
int main()
Definition:
main.cpp:9
graph.h
graph::get_node2nodes
std::vector< std::vector< unsigned int > > get_node2nodes() const
Definition:
graph.cpp:42
main.cpp
Generated on Thu May 12 2022 14:37:08 for Graph 2 by
1.8.17