Module org.jgrapht.core
Package 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 Summary
Modifier and TypeMethodDescriptionGet the color classes.Get the color map.int
Get the number of colors.
-
Method Details
-
getNumberColors
int getNumberColors()Get the number of colors.- Returns:
- the number of colors
-
getColors
Get the color map.- Returns:
- the color map
-
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
-