pub struct MinCostFlowGraph<T> { /* private fields */ }
Implementations§
Source§impl<T> MinCostFlowGraph<T>where
T: Integral + Neg<Output = T>,
impl<T> MinCostFlowGraph<T>where
T: Integral + Neg<Output = T>,
pub fn new(n: usize) -> Self
pub fn get_edge(&self, i: usize) -> MinCostFlowEdge<T>
pub fn edges(&self) -> Vec<MinCostFlowEdge<T>>
pub fn add_edge(&mut self, from: usize, to: usize, cap: T, cost: T) -> usize
Sourcepub fn flow(&mut self, source: usize, sink: usize, flow_limit: T) -> (T, T)
pub fn flow(&mut self, source: usize, sink: usize, flow_limit: T) -> (T, T)
Returns (maximum flow, cost)
pub fn slope( &mut self, source: usize, sink: usize, flow_limit: T, ) -> Vec<(T, T)>
Trait Implementations§
Source§impl<T: Clone> Clone for MinCostFlowGraph<T>
impl<T: Clone> Clone for MinCostFlowGraph<T>
Source§fn clone(&self) -> MinCostFlowGraph<T>
fn clone(&self) -> MinCostFlowGraph<T>
Returns a duplicate 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 moreAuto Trait Implementations§
impl<T> Freeze for MinCostFlowGraph<T>
impl<T> RefUnwindSafe for MinCostFlowGraph<T>where
T: RefUnwindSafe,
impl<T> Send for MinCostFlowGraph<T>where
T: Send,
impl<T> Sync for MinCostFlowGraph<T>where
T: Sync,
impl<T> Unpin for MinCostFlowGraph<T>where
T: Unpin,
impl<T> UnwindSafe for MinCostFlowGraph<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more