Skip to main content

bellman_ford

Function bellman_ford 

Source
pub fn bellman_ford<N>(
    graph: &Graph<N, i64>,
    source: usize,
) -> Result<(PathResult<i64>, bool), GraphError>
Expand description

Bellman-Ford over i64 weights. Returns the result and whether a negative-weight cycle is reachable from the source.