Skip to main content

dijkstra

Function dijkstra 

Source
pub fn dijkstra(graph: &Graph, source: usize) -> Vec<f64>
Expand description

Dijkstra single-source shortest distances. Returns a vector of length n_nodes; unreachable nodes are f64::INFINITY.