Dinic class

Constructors

Dinic(int n)

Properties

hashCode int
The hash code for this object.
no setterinherited
it List<int>
getter/setter pair
level List<int>
getter/setter pair
n int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEdge(int u, int v, int cap) → void
addUndirectedEdge(int u, int v, int cap) → void
Convenience: add an undirected edge (capacity on both directions).
flowDecomposition(int s, int t) List<Map<String, dynamic>>
After a maxFlow run, decompose the resulting flow into simple s->t paths with positive flow. Returns list of maps { 'path': List
maxFlow(int s, int t) int
maxFlowScaling(int s, int t) int
Dinic with capacity scaling: can be faster on graphs with large capacities.
minCut(int s) Set<int>
After maxFlow, returns vertices reachable from s in residual graph.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited