pub trait MaxFlow {
type Cap;
// Required methods
fn new(n: usize) -> Self;
fn add_edge(&mut self, u: usize, v: usize, cap: Self::Cap);
fn max_flow(&mut self, s: usize, t: usize) -> Self::Cap;
fn get_edges(&self, i: usize) -> Vec<(usize, Self::Cap)>;
fn reset(&mut self);
}
Expand description
最大フロー問題を扱うトレイト。
Required Associated Types§
Required Methods§
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.