Opened 8 years ago

#10675 new Feature Requests

support pruning/stopping bfs/dfs traversing

Reported by: phreakuencies@… Owned by: Jeremiah Willcock
Milestone: To Be Determined Component: graph
Version: Boost 1.56.0 Severity: Not Applicable
Keywords: Cc:

Description

In some cases, BFS/DFS traversal is required only in the local neighborhood of a node (i.e. I would like to visit nodes up to a defined distance, and this distance may have an implementation-dependent meaning) or to only traverse certain portions of the graph (i.e. to skip certain edges/target nodes based on some property found during traversal). Currently, BFS/DFS do not allow to do this. One way would be to gain access to the underlying color map but the functions take the map by copy. Another (cleaner, IMHO) way, would be to allow the events to return true/false which could allow the BFS/DFS algorithm to skip the target node/edge or not.

Change History (0)

Note: See TracTickets for help on using tickets.