Class BrownBacktrackColoring<V,E>
java.lang.Object
org.jgrapht.alg.color.BrownBacktrackColoring<V,E>
- Type Parameters:
V- the graph vertex typeE- the graph edge type
- All Implemented Interfaces:
VertexColoringAlgorithm<V>
Brown graph coloring algorithm.
- Author:
- Michael Behrisch
-
Nested Class Summary
Nested classes/interfaces inherited from interface VertexColoringAlgorithm
VertexColoringAlgorithm.Coloring<V>, VertexColoringAlgorithm.ColoringImpl<V> -
Constructor Summary
ConstructorsConstructorDescriptionBrownBacktrackColoring(Graph<V, E> graph) Construct a new Brown backtracking algorithm. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the chromatic number of the input graphComputes a vertex coloring.
-
Constructor Details
-
BrownBacktrackColoring
-
-
Method Details
-
getChromaticNumber
public int getChromaticNumber()Returns the chromatic number of the input graph- Returns:
- chromatic number of the graph
-
getColoring
Description copied from interface:VertexColoringAlgorithmComputes a vertex coloring.- Specified by:
getColoringin interfaceVertexColoringAlgorithm<V>- Returns:
- a vertex coloring
-