minCut method
StoerWagnerMinCut<V, E>
minCut({
- num edgeWeight(
- V source,
- V target
- StorageStrategy<
V> ? vertexStrategy,
Returns an object that computes the min-cut using the Stoer-Wagner algorithm.
edgeWeight
is a function function that returns the positive weight between two edges. If no function is provided, the numeric edge value or a constant weight of 1 is used.
Implementation
StoerWagnerMinCut<V, E> minCut({
num Function(V source, V target)? edgeWeight,
StorageStrategy<V>? vertexStrategy,
}) =>
StoerWagnerMinCut<V, E>(
graph: this,
edgeWeight: edgeWeight ?? _getDefaultEdgeValueOr(1),
vertexStrategy: vertexStrategy ?? this.vertexStrategy,
);