harpoon.Analysis.GraphColoring
Class GraphColorer

java.lang.Object
  extended by harpoon.Analysis.GraphColoring.GraphColorer
Direct Known Subclasses:
OptimisticGraphColorer, SimpleGraphColorer, UnboundedGraphColorer

public abstract class GraphColorer
extends Object

GraphColorer is a class for describing a graph coloring algorithm.

Version:
$Id: GraphColorer.java,v 1.2 2002/02/25 20:57:17 cananian Exp $
Author:
Felix S. Klock II <pnkfelix@mit.edu>

Constructor Summary
GraphColorer()
          Creates a GraphColorer.
 
Method Summary
abstract  void color(ColorableGraph graph, List colors)
          Attempts to color graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphColorer

public GraphColorer()
Creates a GraphColorer.

Method Detail

color

public abstract void color(ColorableGraph graph,
                           List colors)
                    throws UnableToColorGraph
Attempts to color graph.
requires:
  1. colors is a List of Colors.
  2. graph does not have any hidden nodes.

modifies: graph
effects: Attempts to color graph using the set of Colors given in colors. If successful, every node in graph will be present in graph's Node -> Color mapping, with no two interfering nodes sharing the same color.

Throws:
UncolorableGraph - A coloring cannot be found for graph. graph may be left with some hidden nodes and an non-empty Node -> Color mapping, but can be returned to its original state with a call to graph.resetGraph().
UnableToColorGraph