Trait pathfinding::EdmondsKarp [] [src]

pub trait EdmondsKarp<C: Clone + Zero + Signed + PartialOrd + Bounded> {
    fn common(&self) -> &Common<C>;
fn common_mut(&mut self) -> &mut Common<C>;
fn residual_neighbours(&self, from: usize) -> Vec<(usize, C)>;
fn residual_capacity(&self, from: usize, to: usize) -> C;
fn flow(&self, from: usize, to: usize) -> C;
fn flows(&self) -> Vec<((usize, usize), C)>;
fn set_capacity(&mut self, from: usize, to: usize, capacity: C);
fn add_flow(&mut self, from: usize, to: usize, capacity: C);
fn reset_if_needed(&mut self); fn size(&self) -> usize { ... }
fn source(&self) -> usize { ... }
fn sink(&self) -> usize { ... }
fn total_capacity(&self) -> C { ... }
fn set_total_capacity(&mut self, capacity: C) { ... }
fn omit_detailed_flows(&mut self) { ... }
fn detailed_flows(&self) -> bool { ... }
fn augment(&mut self) -> EKFlows<usize, C> { ... } }

Representation of capacity and flow data.

Required Methods

Common data.

Mutable common data.

List of neighbours with positive residual capacity and this capacity.

Residual capacity between two nodes.

Flow between two nodes.

All flows between nodes.

Set capacity between two nodes. This might trigger a reset of the already computed flows.

Add a given flow between two nodes. This should not be used directly.

Reset the flows if needed.

Provided Methods

Number of nodes.

Source.

Sink.

Get total capacity.

Set total capacity.

Do not request the detailed flows as a result. The returned flows will be an empty vector.

Are detailed flows requested?

Compute the maximum flow.

Implementors