Description Usage Arguments Details Value Note Author(s) See Also Examples
View source: R/sample_k_uniform.R
Randomly generate a hypergraph in which each hyper-edge contains k vertices, or each vertex is incident to k hyper-edges.
1 2 | sample_k_uniform_hypergraph(n, m, k, prob)
sample_k_regular_hypergraph(n, m, k, prob)
|
n |
the order of the hypergraph. |
m |
the size of the hypergraph. |
k |
the order of each hyper-edge. |
prob |
a vector of length |
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
.
a hypergraph.
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.
David J. Marchette dmarchette@gmail.com.
1 2 3 4 | set.seed(77)
h <- sample_k_uniform_hypergraph(20,5,3)
set.seed(73)
k <- sample_k_regular_hypergraph(20,5,3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.