A collection of functions to generate random graphs with specified edge distribution.
Usage
play_poisson(num_vertices, lambda = 1, directed = FALSE, loops = FALSE)
rpois_network(n, num_vertices, lambda = 1, directed = FALSE, loops = FALSE)
play_exponential(num_vertices, rate = 1, directed = FALSE, loops = FALSE)
rexp_network(n, num_vertices, rate = 1, directed = FALSE, loops = FALSE)
play_binomial(
num_vertices,
size = 1,
prob = 0.5,
directed = FALSE,
loops = FALSE
)
rbinom_network(
n,
num_vertices,
size = 1,
prob = 0.5,
directed = FALSE,
loops = FALSE
)
Arguments
- num_vertices
Number of vertices.
- lambda
The mean parameter for the Poisson distribution (default: 1).
- directed
A boolean specifying whether to generate directed or undirected graphs. Defaults to
FALSE
.- loops
A boolean specifying whether loops are authorized. Defaults to
FALSE
.- n
Sample size.
- rate
The rate parameter for the exponential distribution (default: 1).
- size
The number of trials for the binomial distribution (default: 1).
- prob
The probability of success on each trial for the binomial distribution (default: 0.5).
Value
A object of class nvd
containing the sample of graphs.