Struct rs_graph::mcf::simplex::NetworkSimplex [−][src]
pub struct NetworkSimplex<'a, G, F> { /* fields omitted */ }Implementations
impl<'a, G, F> NetworkSimplex<'a, G, F> where
G: IndexDigraph<'a>,
F: NumCast + NumAssign + Signed + Ord + Copy + FromPrimitive, [src]
impl<'a, G, F> NetworkSimplex<'a, G, F> where
G: IndexDigraph<'a>,
F: NumCast + NumAssign + Signed + Ord + Copy + FromPrimitive, [src]pub fn num_iterations(&self) -> usize[src]
Trait Implementations
impl<'a, G, F> MinCostFlow<'a> for NetworkSimplex<'a, G, F> where
G: IndexDigraph<'a>,
F: Bounded + NumCast + NumAssign + Ord + Copy + FromPrimitive + Signed, [src]
impl<'a, G, F> MinCostFlow<'a> for NetworkSimplex<'a, G, F> where
G: IndexDigraph<'a>,
F: Bounded + NumCast + NumAssign + Ord + Copy + FromPrimitive + Signed, [src]type Graph = G
type Flow = F
fn new(g: &'a Self::Graph) -> Self[src]
fn as_graph(&self) -> &'a Self::Graph[src]
fn balance(&self, u: <Self::Graph as GraphType<'a>>::Node) -> Self::Flow[src]
fn set_balance(
&mut self,
u: <Self::Graph as GraphType<'a>>::Node,
balance: Self::Flow
)[src]
&mut self,
u: <Self::Graph as GraphType<'a>>::Node,
balance: Self::Flow
)
fn lower(&self, e: <Self::Graph as GraphType<'a>>::Edge) -> Self::Flow[src]
fn set_lower(&mut self, e: <Self::Graph as GraphType<'a>>::Edge, lb: Self::Flow)[src]
fn upper(&self, e: <Self::Graph as GraphType<'a>>::Edge) -> Self::Flow[src]
fn set_upper(&mut self, e: <Self::Graph as GraphType<'a>>::Edge, ub: Self::Flow)[src]
fn cost(&self, e: <Self::Graph as GraphType<'a>>::Edge) -> Self::Flow[src]
fn set_cost(
&mut self,
e: <Self::Graph as GraphType<'a>>::Edge,
cost: Self::Flow
)[src]
&mut self,
e: <Self::Graph as GraphType<'a>>::Edge,
cost: Self::Flow
)
fn value(&self) -> Self::Flow[src]
Return the value of the latest computed flow value.
fn flow(&self, a: <Self::Graph as GraphType<'a>>::Edge) -> Self::Flow[src]
The flow of an Edge.
fn flow_vec(&self) -> EdgeVec<'a, &'a Self::Graph, Self::Flow>[src]
The flow as vector.
fn solve(&mut self) -> SolutionState[src]
Solve the maxflow problem.
The method solves the max flow problem from the source nodes
src to the sink node snk with the given upper bounds on
the edges.
fn set_balances<F>(&mut self, balance: F) where
F: Fn(<Self::Graph as GraphType<'a>>::Node) -> Self::Flow, [src]
F: Fn(<Self::Graph as GraphType<'a>>::Node) -> Self::Flow,
fn set_lowers<F>(&mut self, lower: F) where
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow, [src]
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow,
fn set_uppers<F>(&mut self, upper: F) where
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow, [src]
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow,
fn set_costs<F>(&mut self, cost: F) where
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow, [src]
F: Fn(<Self::Graph as GraphType<'a>>::Edge) -> Self::Flow,
Auto Trait Implementations
impl<'a, G, F> RefUnwindSafe for NetworkSimplex<'a, G, F> where
F: RefUnwindSafe,
G: RefUnwindSafe,
impl<'a, G, F> RefUnwindSafe for NetworkSimplex<'a, G, F> where
F: RefUnwindSafe,
G: RefUnwindSafe, impl<'a, G, F> Send for NetworkSimplex<'a, G, F> where
F: Send,
G: Sync,
impl<'a, G, F> Send for NetworkSimplex<'a, G, F> where
F: Send,
G: Sync, impl<'a, G, F> Sync for NetworkSimplex<'a, G, F> where
F: Sync,
G: Sync,
impl<'a, G, F> Sync for NetworkSimplex<'a, G, F> where
F: Sync,
G: Sync, impl<'a, G, F> Unpin for NetworkSimplex<'a, G, F> where
F: Unpin,
impl<'a, G, F> Unpin for NetworkSimplex<'a, G, F> where
F: Unpin, impl<'a, G, F> UnwindSafe for NetworkSimplex<'a, G, F> where
F: UnwindSafe,
G: RefUnwindSafe,
impl<'a, G, F> UnwindSafe for NetworkSimplex<'a, G, F> where
F: UnwindSafe,
G: RefUnwindSafe,