Function rs_graph::maxflow::solve

source ·
pub fn solve<'a, G, F, Us, M>(
    g: &'a G,
    src: G::Node,
    snk: G::Node,
    upper: Us
) -> (F, IndexEdgeVec<'a, G, F>, Vec<G::Node>)where
    G: IndexGraph<'a>,
    F: Num + Ord + Copy,
    Us: EdgeMap<'a, G, F>,
    M: MaxFlow<'a, Graph = G, Flow = F>,
Expand description

Solve the maxflow problem using the specified algorithm.

The method solves the max flow problem from the source nodes src to the sink node snk with the given upper bounds on the edges.

The function returns the flow value, the flow on each edge and the minimal cut containing the source.