Struct rs_graph::maxflow::edmondskarp::EdmondsKarp
[−]
[src]
pub struct EdmondsKarp<'a, G, F> where
G: 'a + IndexNetwork<'a>, { /* fields omitted */ }
The dinic max-flow algorithm.
Trait Implementations
impl<'a, G, F> MaxFlow<'a> for EdmondsKarp<'a, G, F> where
G: IndexNetwork<'a>,
F: NumAssign + Ord + Copy,
[src]
G: IndexNetwork<'a>,
F: NumAssign + Ord + Copy,
type Graph = G
Type of the underlying graph.
type Flow = F
Type of flows.
fn new(g: &'a G) -> Self
[src]
Create a new maxflow algorithm instance for a graph.
fn as_graph(&self) -> &'a Self::Graph
[src]
Return the underlying graph.
fn value(&self) -> F
[src]
Return the value of the latest computed maximum flow.
fn flow(&self, e: G::Edge) -> F
[src]
The flow of an Edge.
fn solve<'b>(
&mut self,
src: G::Node,
snk: G::Node,
upper: &EdgeSlice<'a, 'b, G, F>
)
[src]
&mut self,
src: G::Node,
snk: G::Node,
upper: &EdgeSlice<'a, 'b, G, F>
)
Solve the maxflow problem. Read more
fn mincut(&self) -> Vec<G::Node>
[src]
Return the mincut associated with the current flow.
fn flow_vec(&self) -> EdgeVec<'a, Self::Graph, Self::Flow>
[src]
The flow as vector.