public static class GraphColoring.GreedyGraphColoring<N,E> extends GraphColoring<N,E>
GraphColoring.Color, GraphColoring.GreedyGraphColoring<N,E>colorToNodeMap, graph| Constructor and Description |
|---|
GraphColoring.GreedyGraphColoring(AdjacencyGraph<N,E> graph) |
GraphColoring.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, getPartitionSuperNodepublic GraphColoring.GreedyGraphColoring(AdjacencyGraph<N,E> graph)
public GraphColoring.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()
GraphColoringGraphColoring.Color objects using
Annotatable.setAnnotation(Annotation).color in class GraphColoring<N,E>