harpoon.Analysis.GraphColoring
Class SimpleGraphColorer
java.lang.Object
|
+--harpoon.Analysis.GraphColoring.GraphColorer
|
+--harpoon.Analysis.GraphColoring.SimpleGraphColorer
- public class SimpleGraphColorer
- extends GraphColorer
SimpleGraphColorer
uses the simple but effective graph
coloring strategy of progressively removing nodes with degree less
than K, (where K is the number of colors provided). This is a
conservative heuristic, as it guarantees that if the graph
post-removal is K-colorable, then the graph post-replacement will
also K-colorable; several improvements on this heuristic are
available.
Inspired by a 6.035
lecture.
- Version:
- $Id: SimpleGraphColorer.java,v 1.2 2002/02/25 20:57:17 cananian Exp $
- Author:
- Felix S. Klock II <pnkfelix@mit.edu>
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGraphColorer
public SimpleGraphColorer()
color
public final void color(ColorableGraph graph,
List colors)
throws UnableToColorGraph
- Colors
graph
.
- Specified by:
color
in class GraphColorer
UnableToColorGraph