Skip to content

@graphty/algorithms / index / MaxFlowOptions

Interface: MaxFlowOptions ​

Defined in: indexed/flow.ts:21

Options of maxFlow and minSTCut.

Properties ​

algorithm? ​

readonly optional algorithm?: "edmonds-karp" | "ford-fulkerson"

Defined in: indexed/flow.ts:29

How augmenting paths are found: "edmonds-karp" (breadth-first, shortest paths first, O(V E^2)) or "ford-fulkerson" (depth-first, O(E f)). Default "edmonds-karp" for maxFlow and "ford-fulkerson" for minSTCut. Both give the same source side and the same flow value up to floating-point rounding; the per-edge flows can differ where the maximum flow is not unique.


weights? ​

readonly optional weights?: NumericVector

Defined in: indexed/flow.ts:35

Per-arc capacity override, arcCount long -- the facade passes expandEdges(s, shadow.data) for exact f64 capacities. Without it the snapshot's arc weights are the capacities, and an unweighted snapshot gives every edge capacity 1.