Package org.jgrapht.alg.color
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>
public class BrownBacktrackColoring<V,E> extends 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getChromaticNumber()
Returns the chromatic number of the input graphVertexColoringAlgorithm.Coloring<V>
getColoring()
Computes a vertex coloring.
-
-
-
Method Detail
-
getChromaticNumber
public int getChromaticNumber()
Returns the chromatic number of the input graph- Returns:
- chromatic number of the graph
-
getColoring
public VertexColoringAlgorithm.Coloring<V> getColoring()
Description copied from interface:VertexColoringAlgorithm
Computes a vertex coloring.- Specified by:
getColoring
in interfaceVertexColoringAlgorithm<V>
- Returns:
- a vertex coloring
-
-