Generate random graphs with different structures. These do not follow well-defined distributions and are mostly meant for quickly generating test models.
generate_random_chordal_graph(
d,
cMin = 2,
cMax = 6,
sMin = 1,
sMax = 4,
block_graph = FALSE,
...
)generate_random_connected_graph(
d,
m = NULL,
p = 2/(d + 1),
maxTries = 1000,
...
)
generate_random_tree(d)
generate_random_cactus(d, cMin = 2, cMax = 6)
An [igraph::graph] object
Number of vertices in the graph
Minimal size of cliques/blocks (last one might be smaller if necessary)
Maximal size of cliques/blocks
Minimal size of separators
Maximal size of separators
Force sMin == sMax == 1 to produce a block graph
Ignored, only allowed for compatibility
Number of edges in the graph (specify this or p)
Probability of each edge being in the graph (specify this or m)
Maximum number of tries to produce a connected Erdoes-Renyi graph
generate_random_chordal_graph generates a random chordal graph by starting with a (small) complete graph
and then adding new cliques until the specified size is reached.
The sizes of cliques and separators can be specified.
generate_random_connected_graph first tries to generate an Erdoes-Renyi graph, if that fails, falls back
to producing a tree and adding random edges to that tree.
generate_random_cactus generates a random cactus graph (mostly useful for benchmarking).
Other example generation functions:
generate_random_Gamma(),
generate_random_graphical_Gamma(),
generate_random_integer_Gamma(),
generate_random_model(),
generate_random_spd_matrix()