Package org.graph4j.coloring
Class DSaturGreedyColoring
java.lang.Object
org.graph4j.SimpleGraphAlgorithm
org.graph4j.coloring.GreedyColoringBase
org.graph4j.coloring.DSaturGreedyColoring
- All Implemented Interfaces:
ColoringAlgorithm
DSatur (Degree of Saturation) is an adaptive coloring algorithm in which the vertex ordering is not computed statically at the beginning. Once a new vertex has been colored, the algorithm determines which of the remaining uncolored vertices has the highest number of distinct colors in its neighborhood and colors this vertex next. This number is called the degree of saturation of a given vertex. DSatur produces exact results for bipartite, cycle, and wheel graphs. The complexity is O((n+m)lg n).
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.coloring.GreedyColoringBase
colors, numColors, usedFields inherited from class org.graph4j.SimpleGraphAlgorithm
graph -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.graph4j.coloring.GreedyColoringBase
findColoring, findColoring, markUsedColorMethods inherited from class org.graph4j.SimpleGraphAlgorithm
getGraphMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.graph4j.coloring.ColoringAlgorithm
getGraph, getHeuristicColoring, getLowerBound, getMaximalClique, isOptimalityEnsured, isSolvingComponents, isStoppingOnFailure, isValid
-
Constructor Details
-
DSaturGreedyColoring
-
-
Method Details
-
init
protected void init()- Overrides:
initin classGreedyColoringBase
-
hasUncoloredVertices
protected boolean hasUncoloredVertices()- Specified by:
hasUncoloredVerticesin classGreedyColoringBase
-
nextUncoloredVertex
protected int nextUncoloredVertex()- Specified by:
nextUncoloredVertexin classGreedyColoringBase
-
update
protected void update(int v) - Overrides:
updatein classGreedyColoringBase
-