maxFlow method
DinicMaxFlow<V>
maxFlow({
- num edgeCapacity(
- V source,
- V target
- StorageStrategy<
V> ? vertexStrategy,
Returns an object that can compute the maximum flow between different vertices of this graph using the Dinic max flow algorithm.
edgeCapacity
is a function function that returns the positive maximum capacity between two vertices. If no function is provided, the numeric edge value or a constant weight of 1 is used.
Implementation
DinicMaxFlow<V> maxFlow({
num Function(V source, V target)? edgeCapacity,
StorageStrategy<V>? vertexStrategy,
}) => DinicMaxFlow<V>(
seedVertices: vertices,
successorsOf: successorsOf,
edgeCapacity: edgeCapacity ?? _getDefaultEdgeValueOr(1),
vertexStrategy: vertexStrategy ?? this.vertexStrategy,
);