Douglas Gregor wrote:
On Nov 30, 2005, at 2:06 PM, Luis Quesada wrote:
Given the index of a vertex, how can I get its descriptor? I guess function vertex (page 225 of The Boost Graph Library) does that but the function is not defined.
For adjacency_list, there is a vertex function:
vertex(i, g)
returns the ith vertex in the graph g. It's documented in the "Non- Member Functions" section of
Indeed. However vertex returns the descriptor of the ith vertex in the *current* graph. What I actually need is the descriptor of the ith vertex in the original graph (before any removal has taken place). If descriptors are not invalidated, the simple solution is to have a vector mapping original indexes to descriptors. However, I want to know what is the most appropriate way of checking whether edge (where i and j are original indexes) is in the graph in a context where descriptors are invalidated. Luis