NodeMap values are now visualizable. Todo: default map-values
2 #include <lemon/list_graph.h>
8 typedef ListGraph Graph;
9 typedef Graph::Edge Edge;
10 typedef Graph::InEdgeIt InEdgeIt;
11 typedef Graph::OutEdgeIt OutEdgeIt;
12 typedef Graph::EdgeIt EdgeIt;
13 typedef Graph::Node Node;
14 typedef Graph::NodeIt NodeIt;
18 for (int i = 0; i < 3; i++)
21 for (NodeIt i(g); i!=INVALID; ++i)
22 for (NodeIt j(g); j!=INVALID; ++j)
23 if (i != j) g.addEdge(i, j);
25 std::cout << "Hello World!" << std::endl;
26 std::cout << std::endl;
27 std::cout << "This is library LEMON here! We have a graph!" << std::endl;
28 std::cout << std::endl;
30 std::cout << "Nodes:";
31 for (NodeIt i(g); i!=INVALID; ++i)
32 std::cout << " " << g.id(i);
33 std::cout << std::endl;
35 std::cout << "Edges:";
36 for (EdgeIt i(g); i!=INVALID; ++i)
37 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
38 std::cout << std::endl;