sample_gnp_hypergraph {HyperG}R Documentation

Erdos-Renyi hypergraphs.

Description

Sample an Erdos-Renyi p hypergraph.

Usage

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

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

[Package HyperG version 1.0.0 Index]