Skip to main content

bellman_ford

Function bellman_ford 

Source
pub fn bellman_ford<N, E>(
    graph: &Graph<N, E>,
    start: NodeId,
) -> HashMap<NodeId, f32>
Expand description

Bellman-Ford: single-source shortest paths, handles negative weights. Returns distances from start to all reachable nodes.