pub struct GomoryHuTree {
pub tree: Graph,
pub flows: Vec<f64>,
}Expand description
A Gomory–Hu tree, see Graph::gomory_hu_tree.
Fields§
§tree: GraphThe tree: an undirected graph on the same vertices as the input graph,
with n - 1 edges (edge i - 1 joins vertex i to its tree parent).
flows: Vec<f64>The flow value annotating each tree edge, indexed by tree edge id.
Implementations§
Source§impl GomoryHuTree
impl GomoryHuTree
Sourcepub fn flow_between(&self, u: VertexId, v: VertexId) -> Option<f64>
pub fn flow_between(&self, u: VertexId, v: VertexId) -> Option<f64>
The maximum flow (equivalently, minimum cut) value between u and v
in the original graph, read off the tree as the minimum edge
annotation along the tree path from u to v.
Returns None when u == v or when either id is out of range.
Trait Implementations§
Source§impl Clone for GomoryHuTree
impl Clone for GomoryHuTree
Source§fn clone(&self) -> GomoryHuTree
fn clone(&self) -> GomoryHuTree
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GomoryHuTree
impl Debug for GomoryHuTree
Source§impl PartialEq for GomoryHuTree
impl PartialEq for GomoryHuTree
Source§fn eq(&self, other: &GomoryHuTree) -> bool
fn eq(&self, other: &GomoryHuTree) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GomoryHuTree
Auto Trait Implementations§
impl !Sync for GomoryHuTree
impl Freeze for GomoryHuTree
impl RefUnwindSafe for GomoryHuTree
impl Send for GomoryHuTree
impl Unpin for GomoryHuTree
impl UnsafeUnpin for GomoryHuTree
impl UnwindSafe for GomoryHuTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more