pub struct MaxFlow {
pub value: f64,
pub flow: Vec<f64>,
pub cut: Vec<u32>,
pub partition: Vec<u32>,
pub partition2: Vec<u32>,
}Expand description
Output of max_flow: scalar value, per-edge flow vector, cut
edge ids, and source-side / sink-side vertex partitions.
Mirrors the output parameters of igraph_maxflow in
references/igraph/src/flow/flow.c (value, flow, cut,
partition, partition2).
Fields§
§value: f64The maximum total flow from source to target.
flow: Vec<f64>Per-edge flow values in edge-id order (flow.len() == ecount()).
For directed graphs each entry is non-negative. For undirected
graphs the sign indicates direction: positive means flow in the
stored edge direction (source → target), negative means reverse.
cut: Vec<u32>Edge ids of the minimum cut (saturated edges crossing the source/sink partition boundary).
partition: Vec<u32>Source-side partition (vertices reachable from source in the
residual network). Contains source. Sorted ascending.
partition2: Vec<u32>Sink-side partition (complement of partition). Contains
target. Sorted ascending.