Module pathfinding::directed::dfs

source ·
Expand description

Compute a path using the depth-first search algorithm.

Structs§

Functions§

  • Compute a path using the depth-first search algorithm. The path starts from start up to a node for which success returns true is computed and returned along with its total cost, in a Some. 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 the successors function.