Package org.graph4j.generators
Class RandomChordalGraphGenerator
java.lang.Object
org.graph4j.generators.AbstractGraphGenerator
org.graph4j.generators.RandomChordalGraphGenerator
Generates a random chordal graph. A chordal graph is a graph where
every cycle of four or more vertices has a chord. A chord is an edge
that connects two non-consecutive vertices within the cycle, but it's not
part of the cycle itself.
Reference: Oylum Seeker, Pinar Heggernes, Tinaz Ekim, and Z. Caner Taskin,
(2022). Generation of random chordal graphs using subtrees of a tree. RAIRO -
Operations Research. 56. 10.1051/ro/2022027.
- Author:
- Cristian Frăsinaru
- See Also:
-
Field Summary
Fields inherited from class org.graph4j.generators.AbstractGraphGenerator
vertices -
Constructor Summary
ConstructorsConstructorDescriptionRandomChordalGraphGenerator(int numVertices) Creates a generator for random chordal graphs with the specified number of vertices.RandomChordalGraphGenerator(int numVertices, int maxSubtreeSize) Creates a generator for random chordal graphs with the specified number of vertices, with the possibility to adjust the density of the generated graph. -
Method Summary
Methods inherited from class org.graph4j.generators.AbstractGraphGenerator
addRandomEdges
-
Constructor Details
-
RandomChordalGraphGenerator
public RandomChordalGraphGenerator(int numVertices) Creates a generator for random chordal graphs with the specified number of vertices.- Parameters:
numVertices- the number of vertices of the generated graph.
-
RandomChordalGraphGenerator
public RandomChordalGraphGenerator(int numVertices, int maxSubtreeSize) Creates a generator for random chordal graphs with the specified number of vertices, with the possibility to adjust the density of the generated graph. The smaller the value formaxSubtreeSize, the lower the density of the graph.- Parameters:
numVertices- the number of vertices of the generated graph.maxSubtreeSize- the maximum size of the subtrees that are used for the computation of the intersection graph.
-
-
Method Details
-
createGraph
Creates a random chordal graph.- Returns:
- a random chordal graph.
-