Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the hypergraph with a specified Kirchhoff tensor (Laplacian)
ResourceFunction["KirchhoffHypergraph"][ktens] gives the (ordered or orderless) hypergraph with Kirchhoff tensor ktens. |
| "OrderedHyperedges" | Automatic | whether to treat hyperedges as being ordered (directed) |
| Automatic | construct an orderless hypergraph if and only if the Kirchhoff tensor is symmetric across all indices |
| True | construct an ordered hypergraph |
| False | construct an orderless hypergraph |
When the Kirchhoff tensor is of rank 2, the output of ResourceFunction["KirchhoffHypergraph"] is identical to that of KirchhoffGraph.
Construct an ordered hypergraph automatically from an asymmetric Kirchhoff tensor:
| In[1]:= |
|
| Out[1]= |
|
Construct an orderless hypergraph automatically from a symmetric Kirchhoff tensor:
| In[2]:= |
|
| Out[2]= |
|
Treat the hypergraph as being ordered instead:
| In[3]:= |
|
| Out[3]= |
|
Construct an ordered hypergraph of arity 5 automatically from an asymmetric Kirchhoff tensor specified as a SparseArray:
| In[4]:= |
|
| Out[4]= |
|
KirchhoffHypergraph accepts both SparseArray and nested list specifications of Kirchhoff tensors:
| In[5]:= |
|
| Out[5]= |
|
| In[6]:= |
|
| Out[6]= |
|
KirchhoffHypergraph supports multihypergraphs, with off-diagonal Kirchhoff tensor entries representing hyperedge multiplicities:
| In[7]:= |
|
| Out[7]= |
|
When the rank of the Kirchhoff tensor is equal to 2, the output of KirchhoffHypergraph is identical to the output of KirchhoffGraph:
| In[8]:= |
|
| Out[8]= |
|
| In[9]:= |
|
| Out[9]= |
|
| In[10]:= |
|
| Out[10]= |
|
When the Kirchhoff tensor is symmetric across all indices, the hypergraph is automatically orderless:
| In[11]:= |
|
| Out[11]= |
|
| In[12]:= |
|
| Out[12]= |
|
| In[13]:= |
|
| Out[13]= |
|
When the Kirchhoff tensor is asymmetric across any pair of indices, the hypergraph is automatically ordered:
| In[14]:= |
|
| Out[14]= |
|
| In[15]:= |
|
| Out[15]= |
|
| In[16]:= |
|
| Out[16]= |
|
Kirchhoff tensors can be of arbitrary rank:
| In[17]:= |
|
| Out[17]= |
|
By default ("OrderedHyperedges"→Automatic), all hyperedges are treated as orderless (i.e. undirected) if the Kirchhoff tensor is symmetric across all indices:
| In[18]:= |
|
| Out[18]= |
|
Use "OrderedHyperedges"→True to treat hyperedges as ordered (i.e. directed):
| In[19]:= |
|
| Out[19]= |
|
Conversely, all hyperedges are treated as ordered (i.e. directed) if the Kirchhoff tensor is asymmetric across any pair of indices:
| In[20]:= |
|
| Out[20]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License