[−][src]Struct algorithms_edu::algo::graph::network_flow::NetworkFlowAdjacencyList
Fields
source: usize
sink: usize
Implementations
impl NetworkFlowAdjacencyList
[src]
pub fn ford_fulkerson(&mut self) -> i32
[src]
impl NetworkFlowAdjacencyList
[src]
pub fn with_size(n: usize) -> Self
[src]
Initialize an empty adjacency list that can hold up to n nodes.
pub fn and_source_sink(self, source: usize, sink: usize) -> Self
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn add_edge(&mut self, from: usize, to: usize, capacity: i32)
[src]
pub fn add_edge_with_cost(
&mut self,
from: usize,
to: usize,
capacity: i32,
cost: i32
)
[src]
&mut self,
from: usize,
to: usize,
capacity: i32,
cost: i32
)
pub fn from_edges(size: usize, edges: &[(usize, usize, i32)]) -> Self
[src]
pub fn from_edges_with_cost(
size: usize,
edges: &[(usize, usize, i32, i32)]
) -> Self
[src]
size: usize,
edges: &[(usize, usize, i32, i32)]
) -> Self
pub fn edges(&self) -> impl Iterator<Item = (usize, &Rc<RefCell<Edge>>)>
[src]
pub fn edge_count(&self) -> usize
[src]
pub fn nodes(&self) -> impl Iterator<Item = (usize, &Vec<Rc<RefCell<Edge>>>)>
[src]
pub fn node_count(&self) -> usize
[src]
Trait Implementations
impl Debug for NetworkFlowAdjacencyList
[src]
impl Index<usize> for NetworkFlowAdjacencyList
[src]
type Output = Vec<Rc<RefCell<Edge>>>
The returned type after indexing.
pub fn index(&self, index: usize) -> &Self::Output
[src]
impl IndexMut<usize> for NetworkFlowAdjacencyList
[src]
Auto Trait Implementations
impl !RefUnwindSafe for NetworkFlowAdjacencyList
[src]
impl !Send for NetworkFlowAdjacencyList
[src]
impl !Sync for NetworkFlowAdjacencyList
[src]
impl Unpin for NetworkFlowAdjacencyList
[src]
impl !UnwindSafe for NetworkFlowAdjacencyList
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,