Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/sample_er_hypergraph.R
Sample an Erdos-Renyi p hypergraph.
1 | sample_gnp_hypergraph(n, m, p, lambda)
|
n |
number of nodes. |
m,lambda |
controls the number of hyper-edges. If m is not given, the number is drawn from a Poisson(lambda), or, a Poisson(n*p) if lambda is not given. |
p |
Hyper-edge probability. |
This generates an ER hypergraph by using rbinom
to generate a random mxn
matrix of Bernoulli random variables and
treating this
matrix as the incidence matrix for the hypergraph.
If m
is not given, and lambda
is, then m is drawn from a
Poisson distribution with parameter lambda
. If neither is given,
the number of hyper-edges is drawn from a Poisson distribution with
parameter n*p
.
a hypergraph.
David J. Marchette dmarchette@gmail.com
1 2 | set.seed(672)
h <- sample_gnp_hypergraph(n=100,p=.1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.