aryagraph.algorithms.flow.FlowResult#

class aryagraph.algorithms.flow.FlowResult(value: Any, flow: dict)[source]#

Bases: object

A maximum flow: its value and flow[u][v] on every edge (0 where unused).

For an undirected edge both flow[u][v] and flow[v][u] exist and at most one is positive. Opposite arcs u → v / v → u of a directed graph never both carry flow (it is netted out).