Struct mcmf::Path [−][src]
Represents a path from the source to the sink in a solution to the minimum cost maximum flow problem.
Fields
flows: Vec<Flow<T>>
Methods
impl<T> Path<T> where
T: Clone + Ord,
[src]
impl<T> Path<T> where
T: Clone + Ord,
pub fn vertices(&self) -> Vec<&Vertex<T>>
[src]
pub fn vertices(&self) -> Vec<&Vertex<T>>
A list of all the vertices in the path.
Always begins with Vertex::Source
and ends with Vertex::Sink
.
pub fn edges(&self) -> Vec<&Flow<T>>
[src]
pub fn edges(&self) -> Vec<&Flow<T>>
A list of all the edges in the path.
pub fn cost(&self) -> i32
[src]
pub fn cost(&self) -> i32
Returns the total cost of the path.
path.cost()
is always a multiple of path.amount()
.
pub fn amount(&self) -> u32
[src]
pub fn amount(&self) -> u32
Returns the amount of flow in the path.
pub fn len(&self) -> usize
[src]
pub fn len(&self) -> usize
Returns the number of edges in the path.