Interface MinimumCutGlobal
-
public interface MinimumCutGlobalGlobal Minimum Cut algorithm without terminal vertices.Given a graph \(G=(V,E)\), a cut is a partition of \(V\) into two sets \(C, \bar{C} = V \setminus C\). Given a weight function, the weight of a cut \((C,\bar{C})\) is the weight sum of all edges \((u,v)\) such that \(u\) is in \(C\) and \(v\) is in \(\bar{C}\). There are two variants of the problem to find a minimum weight cut: (1) With terminal vertices, and (2) without terminal vertices. In the variant with terminal vertices, we are given two special vertices
source (S)andsink (T)and we need to find the minimum cut \((C,\bar{C})\) such that thesourceis in \(C\) and thesinkis in \(\bar{C}\). In the variant without terminal vertices we need to find the global cut, and \(C,\bar{C}\) simply must not be empty.Algorithms implementing this interface compute the global minimum cut without terminal vertices.
- Author:
- Barak Ugav
- See Also:
- Wikipedia
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceMinimumCutGlobal.BuilderA builder forMinimumCutGlobalobjects.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description CutcomputeMinimumCut(Graph g, WeightFunction w)Compute the global minimum cut in a graph.static MinimumCutGlobal.BuildernewBuilder()Create a new global minimum cut algorithm builder.
-
-
-
Method Detail
-
computeMinimumCut
Cut computeMinimumCut(Graph g, WeightFunction w)
Compute the global minimum cut in a graph.Given a graph \(G=(V,E)\), a cut is a partition of \(V\) into twos sets \(C, \bar{C} = V \setminus C\). The return value of this function is the set \(C\), and \(\bar{C}\) can be computed easily by the caller if needed.
- Parameters:
g- a graphw- an edge weight function- Returns:
- the cut that was computed
- Throws:
IllegalArgumentException- if the graph has less than two vertices
-
newBuilder
static MinimumCutGlobal.Builder newBuilder()
Create a new global minimum cut algorithm builder.This is the recommended way to instantiate a new
MinimumCutGlobalobject.- Returns:
- a new builder that can build
MinimumCutGlobalobjects
-
-