Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate a random hypergraph
ResourceFunction["RandomHypergraph"][{n,{e,a}}] generates a random hypergraph with e hyperedges of arity a and at most n nodes. | |
ResourceFunction["RandomHypergraph"][{n,{{e1,a1},{e2,a2},…}}] generates a random hypergraph with ei hyperedges of arity ai. |
Generate a hypergraph with 10 nodes and 5 binary hyperedges:
In[1]:= |
|
Out[1]= |
|
Generate a hypergraph with 5 binary hyperedges and 4 ternary hyperedges:
In[2]:= |
|
Out[2]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License