pub fn bellman_ford(
g: &Graph,
source: usize,
) -> Result<ShortestPaths, ErrorsJSL>Expand description
The Bellman-Ford algorithm, O(V E), allowing negative weights. Returns an error if a
negative cycle is reachable from the source (shortest paths are then undefined).