Wolfram Language Paclet Repository
Community-contributed installable additions to the Wolfram Language
Hypergraph tools
Contributed by: Nikolay Murzin and Carlos Zapata Carratala and Pavel Hajek
The Hypergraph paclet processes hypergraphs as symbolic mathematical structures and produces effective visualizations. Hyperedges are encoded as vertex lists with a per-edge symmetry type ("Ordered", "Unordered", "Cyclic" or "Directed"), and on top of the core Hypergraph object the paclet provides interactive drawing, 2D and 3D rendering, canonicalization and isomorphism testing, matrix and tensor representations, exhaustive and random generation, and hypergraph rewriting rules in the style of Wolfram model systems.
To install this paclet in your Wolfram Language environment,
evaluate this code:
PacletInstall["WolframInstitute/Hypergraph"]
To load the code after installation, evaluate this code:
Needs["WolframInstitute`Hypergraph`"]
A hypergraph with a unary, a binary and a ternary edge:
| In[1]:= |
| Out[1]= | ![]() |
Every edge carries a symmetry type:
| In[2]:= |
| Out[2]= |
A random hypergraph with a mixed signature:
| In[3]:= |
| Out[3]= | ![]() |
Adding hypergraphs takes their union:
| In[4]:= |
| Out[4]= | ![]() |
The adjacency tensor of a hypergraph round-trips back to a hypergraph:
| In[5]:= | ![]() |
| Out[5]= | ![]() |
Enumerate all connected hypergraphs made of two binary edges:
| In[6]:= |
| Out[6]= | ![]() |
Apply a rewriting rule to a hypergraph:
| In[7]:= |
| Out[7]= | ![]() |
Wolfram Language Version 13.2