Function rs_graph::mcf::network_simplex[][src]

pub fn network_simplex<'a, G, F, Bs, Ls, Us, Cs>(
    g: &'a G,
    balances: Bs,
    lower: Ls,
    upper: Us,
    costs: Cs
) -> Option<(F, EdgeVec<'a, &'a G, F>)> where
    G: IndexDigraph<'a>,
    F: Num + NumAssign + NumCast + FromPrimitive + Ord + Signed + Bounded + Copy,
    Bs: Fn(G::Node) -> F,
    Ls: Fn(G::Edge) -> F,
    Us: Fn(G::Edge) -> F,
    Cs: Fn(G::Edge) -> F, 

Solve a min-cost-flow problem with a network simplex algorithm.

The function returns the objective value and the optimal flow.