public class GraphColoring
extends java.lang.Object
Constructor and Description |
---|
GraphColoring()
Constructs an empty coloring.
|
GraphColoring(int numberOfColors)
Constructs an empty coloring with the specified number of empty color
classes.
|
Modifier and Type | Method and Description |
---|---|
void |
addColorClass(it.unimi.dsi.fastutil.ints.IntSet s)
Appends the specified color class to this coloring.
|
void |
addVertexToClass(int v,
int c)
Appends the specified vertex of the specified color class.
|
it.unimi.dsi.fastutil.ints.IntSet |
getColorClass(int color)
Returns the color class indexed by the specified nonnegative integer.
|
java.lang.String |
toString()
Returns a string representation of a graph coloring.
|
public GraphColoring()
public GraphColoring(int numberOfColors)
numberOfColors
- number of predefinite color classespublic void addColorClass(it.unimi.dsi.fastutil.ints.IntSet s)
s
- a set of verticespublic it.unimi.dsi.fastutil.ints.IntSet getColorClass(int color)
color
- index of the color class to returnpublic void addVertexToClass(int v, int c)
v
- a vertexc
- an index of a color classpublic java.lang.String toString()
toString
in class java.lang.Object