Package org.graph4j.coloring
Class RandomGreedyColoring
java.lang.Object
org.graph4j.SimpleGraphAlgorithm
org.graph4j.coloring.GreedyColoringBase
org.graph4j.coloring.GreedyColoring
org.graph4j.coloring.RandomGreedyColoring
- All Implemented Interfaces:
ColoringAlgorithm
The order in which vertices are colored is chosen randomly each time the
method findColoring is invoked.
- Author:
- Cristian Frăsinaru
-
Field Summary
Fields inherited from class org.graph4j.coloring.GreedyColoring
pos, vertexOrderingFields inherited from class org.graph4j.coloring.GreedyColoringBase
colors, numColors, usedFields inherited from class org.graph4j.SimpleGraphAlgorithm
graph -
Constructor Summary
ConstructorsConstructorDescriptionRandomGreedyColoring(Graph graph) The vertices will be colored in a randomly chosen order. -
Method Summary
Methods inherited from class org.graph4j.coloring.GreedyColoring
hasUncoloredVertices, nextUncoloredVertexMethods inherited from class org.graph4j.coloring.GreedyColoringBase
findColoring, findColoring, markUsedColor, updateMethods 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
-
RandomGreedyColoring
The vertices will be colored in a randomly chosen order.- Parameters:
graph- the input graph;
-
-
Method Details
-
init
protected void init()- Overrides:
initin classGreedyColoring
-