Class VertexColoringAlgorithm.ColoringImpl<V>

    • Constructor Summary

      Constructors 
      Constructor Description
      ColoringImpl​(java.util.Map<V,​java.lang.Integer> colors, int numberColors)
      Construct a new vertex coloring.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.List<java.util.Set<V>> getColorClasses()
      Get the color classes.
      java.util.Map<V,​java.lang.Integer> getColors()
      Get the color map.
      int getNumberColors()
      Get the number of colors.
      java.lang.String toString()
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ColoringImpl

        public ColoringImpl​(java.util.Map<V,​java.lang.Integer> colors,
                            int numberColors)
        Construct a new vertex coloring.
        Parameters:
        colors - the color map
        numberColors - the total number of colors used
    • Method Detail

      • getColorClasses

        public java.util.List<java.util.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.
        Specified by:
        getColorClasses in interface VertexColoringAlgorithm.Coloring<V>
        Returns:
        a list of color classes
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object