Skip to main content

push_relabel

Function push_relabel 

Source
pub fn push_relabel<G, F>(
    graph: &G,
    source: G::Node,
    sink: G::Node,
    edge_capacity: F,
) -> Result<Option<MaxFlow<G::Node, G::Edge>>>
where G: IndexGraphView, F: FnMut(G::Edge) -> u64,
Expand description

Computes maximum flow with a deterministic FIFO push-relabel algorithm.

ยงErrors

Returns an error when the maximum flow exceeds u64::MAX.