Since remove_vertex uses erase() under the hood, I think that it should be
safe to do with the current implementation.
On Thu, Aug 13, 2015 at 7:03 PM Chris Dellin
Hello,
The documentation for the adjacency_list [0] is clear that if the vertex list container is vecS, then calling remove_vertex() will invalidate any vertex/edge descriptors into the graph.
However, I was wondering if this is actually the case if the removed vertex was the one most recently added, that is, remove_vertex(vertex(num_vertices(g)-1)). In this case, I would think that no shifting of vertex data or adjustment of edge source/target indices would be necessary, and existing descriptors are guaranteed to be still valid.
Is this safe to do with the current implementation? If not, why not?
Thanks, - Chris Dellin
[0] http://www.boost.org/doc/libs/1_59_0/libs/graph/doc/adjacency_list.html _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users