Generates a 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_connected_graph(
d,
m = NULL,
p = 2/(d + 1),
maxTries = 1000,
...
)
An [igraph::graph
] object
Number of vertices in the graph
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 Eroes-Renyi graph
Ignored, only allowed for compatibility
Other Example generations:
generate_random_Gamma()
,
generate_random_cactus()
,
generate_random_chordal_graph()
,
generate_random_graphical_Gamma()
,
generate_random_integer_Gamma()
,
generate_random_model()
,
generate_random_spd_matrix()
,
generate_random_tree()