Class RandomGreedyColoring<V,​E>

  • Type Parameters:
    V - the graph vertex type
    E - the graph edge type
    All Implemented Interfaces:
    VertexColoringAlgorithm<V>

    public class RandomGreedyColoring<V,​E>
    extends GreedyColoring<V,​E>
    The greedy coloring algorithm with a random vertex ordering.
    • Constructor Detail

      • RandomGreedyColoring

        public RandomGreedyColoring​(Graph<V,​E> graph)
        Construct a new coloring algorithm.
        Parameters:
        graph - the input graph
      • RandomGreedyColoring

        public RandomGreedyColoring​(Graph<V,​E> graph,
                                    Random rng)
        Construct a new coloring algorithm
        Parameters:
        graph - the input graph
        rng - the random number generator
    • Method Detail

      • getVertexOrdering

        protected Iterable<V> getVertexOrdering()
        Get the ordering of the vertices used by the algorithm.
        Overrides:
        getVertexOrdering in class GreedyColoring<V,​E>
        Returns:
        the ordering of the vertices used by the algorithm