|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.GraphColoring.GraphColorer
harpoon.Analysis.GraphColoring.UnboundedGraphColorer
public class UnboundedGraphColorer
UnboundedGraphColorer
uses the graph coloring strategy
provided by another GraphColorer
to search for a near
minimum number of colors required. It generates colors dynamically
using a ColorFactory
.
Constructor Summary | |
---|---|
UnboundedGraphColorer(GraphColorer colorer,
ColorFactory cf)
Creates a UnboundedGraphColorer . |
Method Summary | |
---|---|
void |
color(ColorableGraph graph,
List colors)
Attempts to color graph . |
void |
findColoring(ColorableGraph graph)
Finds a coloring for graph . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UnboundedGraphColorer(GraphColorer colorer, ColorFactory cf)
UnboundedGraphColorer
.
colorer
for its coloring strategy
and cf
to produce the set of colors used in
the coloring.
Method Detail |
---|
public void findColoring(ColorableGraph graph)
graph
.
graph
, this
graph
,
producing Color
s as needed from the
ColorFactory
associated with
this
. Once an appopriate set is found,
colors graph
accordingly.
public final void color(ColorableGraph graph, List colors) throws UnableToColorGraph
GraphColorer
graph
.
graph
graph
using the set of Color
s 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.
color
in class GraphColorer
UnableToColorGraph
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |