Most examples for the Boost: graph library perform a depth search in the first call using the first search utility to increase the depth. After creating vertices and edges, the DFS call on the graph intersects the entire graph with depth in the first order, and if we have a visitor method associated with it, it will call the visitor method to perform the action for each node it passes.
What I'm looking for is a way to maintain an iterator on a graph, where instead of moving around the graph at a time when the client calls "next ()", the iterator will move to the next vertex so that it traverses for DFS, and after repeated call, the iterator will move to the next vertex, as dictated by DFS.
Are there any examples of doing the above using boost: graph?
thank
source
share