sample_gnp_hypergraph: Erdos-Renyi hypergraphs.

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/sample_er_hypergraph.R

Description

Sample an Erdos-Renyi p hypergraph.

Usage

1
sample_gnp_hypergraph(n, m, p, lambda)

Arguments

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.

Details

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.

Value

a hypergraph.

Author(s)

David J. Marchette dmarchette@gmail.com

See Also

rbinom, rpois.

Examples

1
2
	set.seed(672)
   h <- sample_gnp_hypergraph(n=100,p=.1)

HyperG documentation built on March 4, 2021, 5:06 p.m.