Trait MaxFlow

Source
pub trait MaxFlow {
    // Required methods
    fn run(&mut self);
    fn run_with_upper_bound(&mut self, bound: Arc<AtomicI32>);
    fn max_flow(&self) -> Result<i32, String>;
    fn assignment(&self, source: NodeID) -> Result<BitVec, String>;
    fn from_edge_list(
        edges: Vec<InputEdge<ResidualEdgeData>>,
        source: NodeID,
        sink: NodeID,
    ) -> Self;

    // Provided method
    fn from_generic_edge_list<E: EdgeWithData>(
        input_edges: &[E],
        source: NodeID,
        target: NodeID,
        function: impl Fn(&E) -> ResidualEdgeData,
    ) -> Self
       where Self: Sized { ... }
}

Required Methods§

Source

fn run(&mut self)

Source

fn run_with_upper_bound(&mut self, bound: Arc<AtomicI32>)

Source

fn max_flow(&self) -> Result<i32, String>

Source

fn assignment(&self, source: NodeID) -> Result<BitVec, String>

Source

fn from_edge_list( edges: Vec<InputEdge<ResidualEdgeData>>, source: NodeID, sink: NodeID, ) -> Self

Provided Methods§

Source

fn from_generic_edge_list<E: EdgeWithData>( input_edges: &[E], source: NodeID, target: NodeID, function: impl Fn(&E) -> ResidualEdgeData, ) -> Self
where Self: Sized,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§