
14 Sep
2005
14 Sep
'05
2:15 p.m.
On Sep 14, 2005, at 6:41 AM, Giulio Veronesi wrote:
Hi,
Excuse me for the very trivial question, but I'm new with boost and I'm looking for help. How I can locate a vertex of a graph by the index of the vertex?
If your graph is an adjacency_list, you can use vertex(N, g) to get the Nth vertex in the graph g. Otherwise, you can advance a vertex iterator: vertex_iterator vi = vertices(g).first; std::advance(vi, N); vertex_descriptor v = *vi; // v is the Nth vertex Doug