Function names are corrected according to naming conventions.
2 #include <lemon/list_graph.h>
6 typedef lemon::ListGraph Graph;
7 typedef Graph::EdgeIt EdgeIt;
8 typedef Graph::NodeIt NodeIt;
13 for (int i = 0; i < 3; i++)
16 for (NodeIt i(g); i!=INVALID; ++i)
17 for (NodeIt j(g); j!=INVALID; ++j)
18 if (i != j) g.addEdge(i, j);
20 std::cout << "Nodes:";
21 for (NodeIt i(g); i!=INVALID; ++i)
22 std::cout << " " << g.id(i);
23 std::cout << std::endl;
25 std::cout << "Edges:";
26 for (EdgeIt i(g); i!=INVALID; ++i)
27 std::cout << " (" << g.id(g.source(i)) << "," << g.id(g.target(i)) << ")";
28 std::cout << std::endl;