Module pathfinding::directed::dfs
source · Expand description
Compute a path using the depth-first search algorithm.
Structs§
- Struct returned by
dfs_reach.
Functions§
- Compute a path using the depth-first search algorithm. The path starts from
startup to a node for whichsuccessreturnstrueis computed and returned along with its total cost, in aSome. If no path can be found,Noneis returned instead. - Visit all nodes that are reachable from a start node. The node will be visited in DFS order, starting from the
startnode and following the order returned by thesuccessorsfunction.