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>
public class BrownBacktrackColoring<V,E> extends java.lang.Object implements VertexColoringAlgorithm<V>
Brown graph coloring algorithm.
- Author:
- Michael Behrisch
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapht.alg.interfaces.VertexColoringAlgorithm
VertexColoringAlgorithm.Coloring<V>, VertexColoringAlgorithm.ColoringImpl<V>
-
Constructor Summary
Constructors Constructor Description BrownBacktrackColoring(Graph<V,E> graph)
Construct a new Brown backtracking algorithm. -
Method Summary
Modifier and Type Method Description int
getChromaticNumber()
Returns the chromatic number of the input graphVertexColoringAlgorithm.Coloring<V>
getColoring()
Computes a vertex coloring.
-
Constructor Details
-
BrownBacktrackColoring
Construct a new Brown backtracking algorithm.- Parameters:
graph
- the input graph
-
-
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:VertexColoringAlgorithm
Computes a vertex coloring.- Specified by:
getColoring
in interfaceVertexColoringAlgorithm<V>
- Returns:
- a vertex coloring
-