aonyx/graph/dijkstra
Values
pub fn find_path(
graph: Graph(a, b, c),
start: a,
goal: a,
) -> Option(List(a))
Uses Dijkstra’s algorithm to exhaustively search for the shortest path from start to goal in the graph. If a path can be found, it is guaranteed to be the shortest one. The returned list represents the path in order from the start node to the goal node, or None when no path can be found.