org.jgrapht.alg.interfaces

## Interface VertexColoringAlgorithm.Coloring<V>

• Type Parameters:
V - the graph vertex type
All Known Implementing Classes:
VertexColoringAlgorithm.ColoringImpl
Enclosing interface:
VertexColoringAlgorithm<V>

public static interface VertexColoringAlgorithm.Coloring<V>
A coloring. The colors are between 0 and $n-1$ where $n$ is the number of vertices of the graph.
• ### Method Detail

• #### getNumberColors

int getNumberColors()
Get the number of colors.
Returns:
the number of colors
• #### getColors

Map<V,Integer> getColors()
Get the color map.
Returns:
the color map
• #### getColorClasses

List<Set<V>> getColorClasses()
Get the color classes. A subset of vertices assigned to the same color is called a color class; every such class forms an independent set. This method returns a partitioning of the vertices in the graph in disjoint color classes.
Returns:
a list of color classes