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§
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 Methods§
fn from_generic_edge_list<E: EdgeWithData>(
input_edges: &[E],
source: NodeID,
target: NodeID,
function: impl Fn(&E) -> ResidualEdgeData,
) -> Selfwhere
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.