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
start
up to a node for whichsuccess
returnstrue
is computed and returned along with its total cost, in aSome
. If no path can be found,None
is returned instead. - Visit all nodes that are reachable from a start node. The node will be visited in DFS order, starting from the
start
node and following the order returned by thesuccessors
function.