Skip to main content

spfa_filtered

Function spfa_filtered 

Source
pub fn spfa_filtered<G, F>(
    graph: &G,
    source: G::Node,
    edge_cost: F,
) -> Result<Option<BellmanFord<G::Node>>>
where G: IndexGraphView, F: Fn(G::Edge) -> Option<i64>,
Expand description

Computes SPFA while omitting edges whose cost is None.

ยงErrors

Returns an error for arithmetic overflow or a reachable negative cycle.