[][src]Struct algorithms_edu::algo::graph::network_flow::NetworkFlowAdjacencyList

pub struct NetworkFlowAdjacencyList {
    pub source: usize,
    pub sink: usize,
    // some fields omitted
}

Fields

source: usizesink: 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]

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]

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.

impl IndexMut<usize> for NetworkFlowAdjacencyList[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,