Struct pathfinding::directed::edmonds_karp::SparseCapacity
source · pub struct SparseCapacity<C> { /* private fields */ }
Expand description
Sparse capacity and flow data.
Trait Implementations§
source§impl<C: Clone> Clone for SparseCapacity<C>
impl<C: Clone> Clone for SparseCapacity<C>
source§fn clone(&self) -> SparseCapacity<C>
fn clone(&self) -> SparseCapacity<C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: Debug> Debug for SparseCapacity<C>
impl<C: Debug> Debug for SparseCapacity<C>
source§impl<C: Copy + Zero + Signed + Eq + Ord + Bounded> EdmondsKarp<C> for SparseCapacity<C>
impl<C: Copy + Zero + Signed + Eq + Ord + Bounded> EdmondsKarp<C> for SparseCapacity<C>
source§fn new(size: usize, source: usize, sink: usize) -> SparseCapacity<C>
fn new(size: usize, source: usize, sink: usize) -> SparseCapacity<C>
Create a new empty structure. Read more
source§fn from_matrix(
source: usize,
sink: usize,
capacities: Matrix<C>
) -> SparseCapacity<C>
fn from_matrix(
source: usize,
sink: usize,
capacities: Matrix<C>
) -> SparseCapacity<C>
Create a new populated structure. Read more
source§fn common_mut(&mut self) -> &mut Common<C>
fn common_mut(&mut self) -> &mut Common<C>
Mutable common data.
source§fn residual_successors(&self, from: usize) -> Vec<(usize, C)>
fn residual_successors(&self, from: usize) -> Vec<(usize, C)>
List of successors with positive residual capacity and this capacity.
source§fn residual_capacity(&self, from: usize, to: usize) -> C
fn residual_capacity(&self, from: usize, to: usize) -> C
Residual capacity between two nodes.
source§fn add_flow(&mut self, from: usize, to: usize, capacity: C)
fn add_flow(&mut self, from: usize, to: usize, capacity: C)
Add a given flow between two nodes. This should not be used
directly. Read more
source§fn add_residual_capacity(&mut self, from: usize, to: usize, capacity: C)
fn add_residual_capacity(&mut self, from: usize, to: usize, capacity: C)
Add some residual capacity.
source§fn from_vec(source: usize, sink: usize, capacities: Vec<C>) -> Selfwhere
Self: Sized,
fn from_vec(source: usize, sink: usize, capacities: Vec<C>) -> Selfwhere
Self: Sized,
Create a new populated structure. Read more
source§fn set_capacity(&mut self, from: usize, to: usize, capacity: C)
fn set_capacity(&mut self, from: usize, to: usize, capacity: C)
Set capacity between two nodes.
source§fn total_capacity(&self) -> C
fn total_capacity(&self) -> C
Get total capacity.
source§fn set_total_capacity(&mut self, capacity: C)
fn set_total_capacity(&mut self, capacity: C)
Set total capacity.
source§fn omit_detailed_flows(&mut self)
fn omit_detailed_flows(&mut self)
Do not request the detailed flows as a result. The returned
flows will be an empty vector. Read more
source§fn detailed_flows(&self) -> bool
fn detailed_flows(&self) -> bool
Are detailed flows requested?
source§fn cancel_flow(&mut self, from: usize, to: usize, capacity: C)
fn cancel_flow(&mut self, from: usize, to: usize, capacity: C)
Internal: cancel a flow capacity between two nodes.