public static class GraphColoring.GreedyGraphColoring<N,E> extends GraphColoring<N,E>
GraphColoring.Color, GraphColoring.GreedyGraphColoring<N,E>
colorToNodeMap, graph
Constructor and Description |
---|
GreedyGraphColoring(AdjacencyGraph<N,E> graph) |
GreedyGraphColoring(AdjacencyGraph<N,E> graph,
Comparator<N> tieBreaker) |
Modifier and Type | Method and Description |
---|---|
int |
color()
Annotates the graph with
GraphColoring.Color objects using
Annotatable.setAnnotation(Annotation) . |
getGraph, getPartitionSuperNode
public GreedyGraphColoring(AdjacencyGraph<N,E> graph)
public GreedyGraphColoring(AdjacencyGraph<N,E> graph, Comparator<N> tieBreaker)
tieBreaker
- In case of a tie between two nodes of the same degree,
this comparator will determine which node should be colored first.public int color()
GraphColoring
GraphColoring.Color
objects using
Annotatable.setAnnotation(Annotation)
.color
in class GraphColoring<N,E>
Copyright © 2009–2023 Google. All rights reserved.