Graph
Functions
main.cpp File Reference
#include "graph.h"
#include <array>
#include <iostream>
#include <string>
#include <vector>

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

int main ( )

Definition at line 9 of file main.cpp.

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 }
std::vector< std::vector< unsigned int > > get_node2nodes() const
Definition: graph.cpp:42
Definition: graph.h:12