Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Convert a hypergraph to a graph with the same distance matrix
ResourceFunction["HypergraphToGraph"][hg] converts the ordered hypergraph hg to a directed graph with the same distance matrix. |
Convert a simple hypergraph to a graph:
In[1]:= |
|
Out[1]= |
|
Find the edge list of the resulting graph:
In[2]:= |
|
Out[2]= |
|
Define a more complex hypergraph:
In[3]:= |
|
Find the equivalent graph:
In[4]:= |
|
Out[4]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License