sample_k_uniform_hypergraph: Random k-uniform and k-regular hypergraphs.

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

View source: R/sample_k_uniform.R

Description

Randomly generate a hypergraph in which each hyper-edge contains k vertices, or each vertex is incident to k hyper-edges.

Usage

1
2

Arguments

n

the order of the hypergraph.

m

the size of the hypergraph.

k

the order of each hyper-edge.

prob

a vector of length n containing the probabilities for the vertices. This is passed to sample.

Details

A k-uniform hypergraph is one for which each hyper-edge contains exactly k vertices. A k-regular hypergraph is one for which each vertex has degree k. These are implemented through calls to sample.

Value

a hypergraph.

Note

For both of these functions m, the number of hyper-edges, must be provided. This is unlike the corresponding functions for graphs – all simple graphs are 2-uniform, and there are constraints on the values of k for which a graph can be k-regular, since the graphs are constrained to be 2-regular, i.e. all rows of the incidence matrix must contain 2 ones.

Author(s)

David J. Marchette dmarchette@gmail.com.

See Also

sample.

Examples

1
2
3
4

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