Class RandomOreGraphGenerator

java.lang.Object
org.graph4j.generators.AbstractGraphGenerator
org.graph4j.generators.RandomOreGraphGenerator

public class RandomOreGraphGenerator extends AbstractGraphGenerator
Generates a random simple undirected graph that satisfies Ore's condition: deg(v) + deg(u) >= |V(G)|, for every pair of distinct non-adjacent vertices v and u. These graphs are Hamiltonian.
Author:
Cristian Frăsinaru
  • Constructor Details

    • RandomOreGraphGenerator

      public RandomOreGraphGenerator(int numVertices)
    • RandomOreGraphGenerator

      public RandomOreGraphGenerator(int firstVertex, int lastVertex)
  • Method Details

    • createGraph

      public Graph createGraph()
      Returns:
      a graph satisfying Ore's property.