pub fn spfa<G, F>(
graph: &G,
source: G::Node,
edge_cost: F,
) -> Result<Option<BellmanFord<G::Node>>>Expand description
Computes signed single-source paths with the queue-based SPFA algorithm.
ยงErrors
Returns an error for arithmetic overflow or a reachable negative cycle.