When I build a graph g
with this code:
ListDigraph g;
for (int i = 0; i < 7; ++i)
g.addNode();
its nodes will have indexes {0..6}, which I tested by calling g.id()
on them. How can I get a node by using its index? For example, I would like to add an arc to g
by calling:
g.addArc(<node n>, <node m>);