
28 Feb
2008
28 Feb
'08
2:55 p.m.
I have another problem with the DFS. In the description it's said that "once all reachable vertices have been visited, the algorithm selects from any remaining undiscovered vertices and continues the traversal". What I need is a DFS beginning at the root vertex and traversing over all vertices that can be reached from that root vertex. All further remaining vertices not reachable from the root vertex are irrelevant for me. Is there a way to modify depth_first_search to just get the first set of vertices? Or are there maybe other BGL that would be more suitable for that?
depth_first_visit (with the root vertex as the start vertex - http://www.boost.org/libs/graph/doc/depth_first_visit.html) - Allen Ding