java.lang.Object
org.jgrapht.alg.color.GreedyColoring<V,E>
org.jgrapht.alg.color.LargestDegreeFirstColoring<V,E>
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
VertexColoringAlgorithm<V>
The largest degree first greedy coloring algorithm.
This is the greedy coloring algorithm which orders the vertices by non-increasing degree. See the following paper for details.
- D. J. A. Welsh and M. B. Powell. An upper bound for the chromatic number of a graph and its application to timetabling problems. The Computer Journal, 10(1):85--86, 1967.
- Author:
- Dimitrios Michail
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jgrapht.alg.interfaces.VertexColoringAlgorithm
VertexColoringAlgorithm.Coloring<V>, VertexColoringAlgorithm.ColoringImpl<V>
-
Field Summary
Fields inherited from class org.jgrapht.alg.color.GreedyColoring
graph, SELF_LOOPS_NOT_ALLOWED
-
Constructor Summary
ConstructorsConstructorDescriptionLargestDegreeFirstColoring
(Graph<V, E> graph) Construct a new coloring algorithm. -
Method Summary
Modifier and TypeMethodDescriptionGet the ordering of the vertices used by the algorithm.Methods inherited from class org.jgrapht.alg.color.GreedyColoring
getColoring
-
Constructor Details
-
LargestDegreeFirstColoring
Construct a new coloring algorithm.- Parameters:
graph
- the input graph
-
-
Method Details
-
getVertexOrdering
Get the ordering of the vertices used by the algorithm.- Overrides:
getVertexOrdering
in classGreedyColoring<V,
E> - Returns:
- the ordering of the vertices used by the algorithm
-