Trait rs_graph::maxflow::MaxFlow [] [src]

pub trait MaxFlow<'a> {
    type Graph: IndexGraph<'a>;
    type Flow: Num + Ord;
    fn new(g: &'a Self::Graph) -> Self;
fn as_graph(&self) -> &'a Self::Graph;
fn value(&self) -> Self::Flow;
fn flow(&self, a: <Self::Graph as Graph<'a>>::Edge) -> Self::Flow;
fn solve<'b>(
        &mut self,
        src: <Self::Graph as Graph<'a>>::Node,
        snk: <Self::Graph as Graph<'a>>::Node,
        upper: &EdgeSlice<'a, 'b, Self::Graph, Self::Flow>
    );
fn mincut(&self) -> Vec<<Self::Graph as Graph<'a>>::Node>; fn flow_vec(&self) -> EdgeVec<'a, Self::Graph, Self::Flow> { ... } }

Trait for max flow algorithms.

Associated Types

Type of the underlying graph.

Type of flows.

Required Methods

Create a new maxflow algorithm instance for a graph.

Return the underlying graph.

Return the value of the latest computed maximum flow.

The flow of an Edge.

Solve the maxflow problem.

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.

Return the mincut associated with the current flow.

Provided Methods

The flow as vector.

Implementors