Skip to main content

dijkstra

Function dijkstra 

Source
pub fn dijkstra(graph: &Subgraph, start: &str) -> BTreeMap<String, f64>
Expand description

Dijkstra’s algorithm for shortest path distances (§5.4).

Returns node id -> shortest distance from start, including start at 0.0. Unreachable nodes are absent rather than present at infinity.