Removing edges/vertices from a boost.graph object
I'm using boost.graph captured from CVS on Tue Jun 29 05:25:17 EDT 2004. The type of graph that I'm using is: typedef boost::adjacency_listboost::vecS,boost::vecS,boost::bidirectionalS GraphT; I need to trim vertex/edges that was moved to other graphs. I can't seem to do this. Calling remove_vertex appears to be a NOOP. The last thing I tried was: clear_vertex(*vi); remove_vertex(*vi); The gerdemann.cpp example gave me this idea. The clear_vertex did the job that I need in that the necessary edges disappeared. However, the remove_vertex still does not remove the vertexs. What do I have to do to get the ability to clear vertices?
On Aug 22, 2004, at 6:09 PM, Jeff Holle wrote:
I'm using boost.graph captured from CVS on Tue Jun 29 05:25:17 EDT 2004. The type of graph that I'm using is: typedef boost::adjacency_listboost::vecS,boost::vecS,boost::bidirectionalS GraphT;
If you are removing/adding vertices often, you might consider using boost::listS for the vertex list. It depends, as always, on the number of insertions/deletions vs. traversals.
The last thing I tried was: clear_vertex(*vi); remove_vertex(*vi); The gerdemann.cpp example gave me this idea.
The clear_vertex did the job that I need in that the necessary edges disappeared. However, the remove_vertex still does not remove the vertexs.
Do you have an example? Doug
Excuse me, I misinterpreted the info that I was printing to stdout. The deletion of vertices works as expected. Doug Gregor wrote:
On Aug 22, 2004, at 6:09 PM, Jeff Holle wrote:
I'm using boost.graph captured from CVS on Tue Jun 29 05:25:17 EDT 2004. The type of graph that I'm using is: typedef boost::adjacency_listboost::vecS,boost::vecS,boost::bidirectionalS GraphT;
If you are removing/adding vertices often, you might consider using boost::listS for the vertex list. It depends, as always, on the number of insertions/deletions vs. traversals.
The last thing I tried was: clear_vertex(*vi); remove_vertex(*vi); The gerdemann.cpp example gave me this idea.
The clear_vertex did the job that I need in that the necessary edges disappeared. However, the remove_vertex still does not remove the vertexs.
Do you have an example?
Doug
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (2)
-
Doug Gregor
-
Jeff Holle