pub struct MinCostFlowProblem {
pub network: FlowNetwork,
pub supplies: Vec<i64>,
}Expand description
Problem definition for min cost flow
Fields§
§network: FlowNetworkThe flow network
supplies: Vec<i64>Supply at each node (positive = supply, negative = demand)
Implementations§
Source§impl MinCostFlowProblem
impl MinCostFlowProblem
Sourcepub fn new(network: FlowNetwork, supplies: Vec<i64>) -> Result<Self>
pub fn new(network: FlowNetwork, supplies: Vec<i64>) -> Result<Self>
Create a min cost flow problem
Sourcepub fn source_sink(
network: FlowNetwork,
source: usize,
sink: usize,
flow_demand: i64,
) -> Result<Self>
pub fn source_sink( network: FlowNetwork, source: usize, sink: usize, flow_demand: i64, ) -> Result<Self>
Create a simple source-sink min cost flow problem
Trait Implementations§
Source§impl Clone for MinCostFlowProblem
impl Clone for MinCostFlowProblem
Source§fn clone(&self) -> MinCostFlowProblem
fn clone(&self) -> MinCostFlowProblem
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 Freeze for MinCostFlowProblem
impl RefUnwindSafe for MinCostFlowProblem
impl Send for MinCostFlowProblem
impl Sync for MinCostFlowProblem
impl Unpin for MinCostFlowProblem
impl UnsafeUnpin for MinCostFlowProblem
impl UnwindSafe for MinCostFlowProblem
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