A collection of functions to generate random graphs with specified edge distribution.
rpois_network(n, num_vertices, lambda = 1)rexp_network(n, num_vertices, rate = 1)
rbinom_network(n, num_vertices, size = 1, prob = 0.5)
rsbm(n, num_vertices, pref_matrix, block_sizes)
A object of class nvd
containing the sample of graphs.
Sample size.
Number of vertices.
The mean parameter for the Poisson distribution (default: 1).
The rate parameter for the exponential distribution (default: 1).
The number of trials for the binomial distribution (default: 1).
The probability of success on each trial for the binomial distribution (default: 0.5).
The matrix giving the Bernoulli rates. This is a KxK
matrix, where K is the number of groups. The probability of creating an
edge between vertices from groups i and j is given by element (i,j). For
undirected graphs, this matrix must be symmetric. See
sample_sbm
.
Numeric vector giving the number of vertices in each
group. The sum of the vector must match the number of vertices. See
sample_sbm
.