|
Boost Users : |
Subject: Re: [Boost-users] [BGL] vecS for vertex container and vertex index adjustments
From: Ed Linde (edolinde_at_[hidden])
Date: 2012-09-26 16:09:32
Hi Jeremiah,
I am facing a similar problem where I have to iterate through the vertices
of a graph and
conditionally remove a lot of vertices. With the idea you mention of keeping
a VecS adjacency_list
graph + some external vertex property map indexed by vertex ID. And then
iterating with a for loop over
"vertex IDs" instead of using the iterators, wouldn't the *remove_vertex*
anyway make the
descriptors on the remaining vertices of the graph invalid?
So in the end when I want to output the remaining graph, I might have
problems when I iterate
through the vertices. So is there an additional step of updating these
external vertex property maps
every time you delete a vertex using remove_vertex? Also do you think its a
good idea to process the
vertices in a descending order? But I think the removal will mess up all the
vertex descriptors anyway, so
I cannot save the output right? Just a bit confused I guess. I also do
shortest path calculations on the graph
while removing vertices, so I cannot just have a flag set that can allow SP
algorithms to skip these vertices
( I think). So if you have any good work arounds let me know. :)
Cheers,
Ed
-- View this message in context: http://boost.2283326.n4.nabble.com/BGL-vecS-for-vertex-container-and-vertex-index-adjustments-tp4630730p4636256.html Sent from the Boost - Users mailing list archive at Nabble.com.
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