generate_random_chordal_graph {graphicalExtremes}R Documentation

Generate random graphs

Description

Generate random graphs with different structures. These do not follow well-defined distributions and are mostly meant for quickly generating test models.

Usage

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)

Arguments

d

Number of vertices in the graph

cMin

Minimal size of cliques/blocks (last one might be smaller if necessary)

cMax

Maximal size of cliques/blocks

sMin

Minimal size of separators

sMax

Maximal size of separators

block_graph

Force ⁠sMin == sMax == 1⁠ to produce a block graph

...

Ignored, only allowed for compatibility

m

Number of edges in the graph (specify this or p)

p

Probability of each edge being in the graph (specify this or m)

maxTries

Maximum number of tries to produce a connected Erdoes-Renyi graph

Details

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).

Value

An [igraph::graph] object

See Also

Other example generation functions: generate_random_Gamma(), generate_random_graphical_Gamma(), generate_random_integer_Gamma(), generate_random_model(), generate_random_spd_matrix()


[Package graphicalExtremes version 0.3.2 Index]