Class GreedyColoring<V,​E>

    • Constructor Detail

      • GreedyColoring

        public GreedyColoring​(Graph<V,​E> g)
        Create a new greedy coloring algorithm
        Parameters:
        g - the graph
      • GreedyColoring

        public GreedyColoring​(Graph<V,​E> g,
                              int method)
        Create a new greedy coloring algorithm
        Parameters:
        g - the graph
        method - the method to use
    • Method Detail

      • color

        int color​(int[] order)
      • smallestDegreeLastOrder

        int[] smallestDegreeLastOrder()
      • largestSaturationFirstOrder

        int[] largestSaturationFirstOrder()
      • getLowerBound

        public java.lang.Integer getLowerBound​(java.util.Map<V,​java.lang.Object> optionalData)
        Description copied from interface: ApproximationAlgorithm
        Get the result.
        Specified by:
        getLowerBound in interface ApproximationAlgorithm<V,​E>
        Parameters:
        optionalData - optional data
        Returns:
        the result
      • getUpperBound

        public java.lang.Integer getUpperBound​(java.util.Map<V,​java.lang.Object> optionalData)
        Description copied from interface: ApproximationAlgorithm
        Get the result.
        Specified by:
        getUpperBound in interface ApproximationAlgorithm<V,​E>
        Parameters:
        optionalData - optional data
        Returns:
        the result
      • isExact

        public boolean isExact()
        Description copied from interface: ApproximationAlgorithm
        Checks if the algorithm is an exact algorithm.
        Specified by:
        isExact in interface ApproximationAlgorithm<V,​E>
        Returns:
        true if the algorithm is exact, false otherwise