Boost logo

Boost Users :

From: Erik Arner (yg-boost-users_at_[hidden])
Date: 2002-08-01 08:42:58


Yet another question from the BGL newbie...

I understand that performing remove_vertex() on graphs with
vertexList=vecS will result in invalidated itarors and descriptors for
the graph.

However, some toy examples i made suggest that if I remove a vertex in
such a graph, the vertex descriptors and vertex iterators for vertices
with *lower* ID than the removed vertex remain valid after removal,
while those for higher ID vertices are invalidated.

Is this a true feature of a graph with Vertexlist=vecS, or is my
observation a mere coincidence? Is it safe to write code that exploits
this "feature"?

If it indeed is a feature, I can construct a sorted list of vertices to
remove, and remove the vertices in descending order in an easy fashion.

If it is not a feature, any suggestions on how to perform this task i.e.
removing a list of vertices while keeping the VertexList type vecS?

Thanks,
Erik


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net