java.lang.Object
org.jgrapht.alg.color.ColorRefinementAlgorithm<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
VertexColoringAlgorithm<V>
Color refinement algorithm that finds the coarsest stable coloring of a graph based on a given
alpha
coloring as described in the following
paper: C. Berkholz, P. Bonsma, and M.
Grohe. Tight lower and upper bounds for the complexity of canonical colour refinement. Theory of
Computing Systems, 60(4), p581--614, 2017.
The complexity of this algorithm is $O((|V| + |E|)log |V|)$.
- Author:
- Christoph GrĂ¼ne, Daniel Mock, Oliver Feith
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapht.alg.interfaces.VertexColoringAlgorithm
VertexColoringAlgorithm.Coloring<V>, VertexColoringAlgorithm.ColoringImpl<V>
-
Constructor Summary
ConstructorsConstructorDescriptionColorRefinementAlgorithm
(Graph<V, E> graph) Construct a new coloring algorithm.ColorRefinementAlgorithm
(Graph<V, E> graph, VertexColoringAlgorithm.Coloring<V> alpha) Construct a new coloring algorithm. -
Method Summary
Modifier and TypeMethodDescriptionCalculates a canonical surjective k-coloring of the given graph such that the classes of the coloring form the coarsest stable partition that refines alpha.
-
Constructor Details
-
ColorRefinementAlgorithm
Construct a new coloring algorithm.- Parameters:
graph
- the input graphalpha
- the coloring on the graph to be refined
-
ColorRefinementAlgorithm
Construct a new coloring algorithm.- Parameters:
graph
- the input graph
-
-
Method Details
-
getColoring
Calculates a canonical surjective k-coloring of the given graph such that the classes of the coloring form the coarsest stable partition that refines alpha.- Specified by:
getColoring
in interfaceVertexColoringAlgorithm<V>
- Returns:
- the calculated coloring
-