harpoon.Analysis.GraphColoring
Class OptimisticGraphColorer.SimpleSelector

java.lang.Object
  extended by harpoon.Analysis.GraphColoring.OptimisticGraphColorer.NodeSelector
      extended by harpoon.Analysis.GraphColoring.OptimisticGraphColorer.SimpleSelector
Enclosing class:
OptimisticGraphColorer

public static class OptimisticGraphColorer.SimpleSelector
extends OptimisticGraphColorer.NodeSelector


Constructor Summary
protected OptimisticGraphColorer.SimpleSelector()
           
 
Method Summary
 boolean allowedToRemove(Object n, ColorableGraph g)
          Checks if node can be removed from graph to improve colorability.
 Object chooseNodeForHiding(ColorableGraph g)
          Returns a element of g.nodeSet(), in the intent that it be hidden in g.
 Object chooseNodeForRemoval(ColorableGraph g)
          Returns a element of g.nodeSet(), in the intent that it be removed from g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OptimisticGraphColorer.SimpleSelector

protected OptimisticGraphColorer.SimpleSelector()
Method Detail

allowedToRemove

public boolean allowedToRemove(Object n,
                               ColorableGraph g)
Description copied from class: OptimisticGraphColorer.NodeSelector
Checks if node can be removed from graph to improve colorability.
requires: n is in g
effects: returns True if n could ever be returned from chooseNodeForRemoval(g), False otherwise.

Specified by:
allowedToRemove in class OptimisticGraphColorer.NodeSelector

chooseNodeForRemoval

public Object chooseNodeForRemoval(ColorableGraph g)
Description copied from class: OptimisticGraphColorer.NodeSelector
Returns a element of g.nodeSet(), in the intent that it be removed from g.
requires: g.nodeSet() is not empty.
effects: returns some element of g.nodeSet().

Specified by:
chooseNodeForRemoval in class OptimisticGraphColorer.NodeSelector

chooseNodeForHiding

public Object chooseNodeForHiding(ColorableGraph g)
Description copied from class: OptimisticGraphColorer.NodeSelector
Returns a element of g.nodeSet(), in the intent that it be hidden in g.
requires: g.nodeSet() is not empty.
effects: returns some uncolored element of g.nodeSet(), or null if all the elements of g.nodeSet() are colored.

Specified by:
chooseNodeForHiding in class OptimisticGraphColorer.NodeSelector