Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
Hypergraph
Guides
Hypergraph Functionality
Tech Notes
Hypergraph Rewriting
Symbols
AdjacencyHypergraph
AdjacencyTensor
CanonicalHypergraph
CanonicalHypergraphRule
ConnectedHypergraphQ
CyclicEdge
EdgeListTagged
EdgeMultiplicity
EdgeSymmetry
EnumerateHypergraphRules
EnumerateHypergraphs
EnumerateOrderedHypergraphs
EnumerateWolframModelRules
HighlightRule
HyperedgeList
Hyperedge
Hyperedges
HyperedgesQ
Hypergraph3D
HypergraphArityReduce
HypergraphDraw
HypergraphEmbedding
HypergraphHadamardProduct
HypergraphIncidenceMatrix
HypergraphIncidence
HypergraphInsertionBracketDegree
HypergraphInsertionBracket
HypergraphInsertion
HypergraphLargeQ
Hypergraph
HypergraphQ
HypergraphRuleDraw
HypergraphRule
HypergraphRuleQ
HypergraphToGraph
HypergraphTransitionMatrix
HypergraphUnion
HypermatrixGraph
Hypermatrix
HypermatrixQ
IncidenceHypergraph
IsomorphicHypergraphQ
KoszulSign
LinkedHypergraph
OrderedHypergraphToGraph
RandomAllHypergraph
RandomConnectedHypergraph
RandomHypergraph
RandomHypergraphRule
SetHypergraphSummaryThresholds
SimpleHypergraph
SimpleHypergraphPlot3D
SimpleHypergraphPlot
SimpleHypergraphQ
ToLabeledEdges
ToLabeledPatternEdges
ToOrderedHypergraph
ToPatternRules
WolframInstitute`Hypergraph`
H
y
p
e
r
m
a
t
r
i
x
H
y
p
e
r
m
a
t
r
i
x
[
h
g
]
g
i
v
e
s
t
h
e
h
y
p
e
r
m
a
t
r
i
x
o
f
t
h
e
h
y
p
e
r
g
r
a
p
h
h
g
,
a
g
r
a
d
e
d
c
o
l
l
e
c
t
i
o
n
o
f
a
d
j
a
c
e
n
c
y
a
r
r
a
y
s
w
i
t
h
o
n
e
r
a
n
k
-
𝑘
a
r
r
a
y
p
e
r
g
r
o
u
p
o
f
a
r
i
t
y
-
𝑘
h
y
p
e
r
e
d
g
e
s
.
H
y
p
e
r
m
a
t
r
i
x
[
v
e
r
t
i
c
e
s
,
e
d
g
e
s
,
s
y
m
m
e
t
r
i
e
s
]
g
i
v
e
s
t
h
e
h
y
p
e
r
m
a
t
r
i
x
o
f
t
h
e
h
y
p
e
r
g
r
a
p
h
w
i
t
h
t
h
e
g
i
v
e
n
v
e
r
t
i
c
e
s
,
e
d
g
e
s
a
n
d
p
e
r
-
e
d
g
e
s
y
m
m
e
t
r
i
e
s
.
D
e
t
a
i
l
s
a
n
d
O
p
t
i
o
n
s
▪
H
y
p
e
r
m
a
t
r
i
x
returns a
H
y
p
e
r
m
a
t
r
i
x
object, which displays as a summary box showing the dimensions of its component arrays;
H
y
p
e
r
m
a
t
r
i
x
Q
tests for a valid
H
y
p
e
r
m
a
t
r
i
x
object.
▪
Hyperedges are grouped by their arity and edge symmetry: each group of arity-
𝑘
hyperedges becomes a
S
p
a
r
s
e
A
r
r
a
y
of rank
𝑘
whose dimensions all equal the number of vertices
𝑛
, keyed by the pair of
𝑘
and the symmetry, given as a list of
C
y
c
l
e
s
permutations.
▪
Array entries count hyperedge multiplicities, with indices referring to positions in
V
e
r
t
e
x
L
i
s
t
[
hg
].
▪
Arity-0 hyperedges are stored as their count instead of an array.
▪
Unlike
A
d
j
a
c
e
n
c
y
T
e
n
s
o
r
, which embeds all hyperedges in a single padded tensor of the maximal rank, a hypermatrix keeps one unpadded array per arity and symmetry.
▪
In
H
y
p
e
r
m
a
t
r
i
x
[
v
e
r
t
i
c
e
s
,
e
d
g
e
s
,
s
y
m
m
e
t
r
i
e
s
]
,
symmetries
is a list of the same length as
edges
whose elements are lists of
C
y
c
l
e
s
generators, one per edge; tagged edges
edge
->
tag
are accepted, with the tag ignored.
▪
For a hypermatrix
hm
,
h
m
[
"
A
r
r
a
y
s
"
]
gives the list of component arrays,
h
m
[
"
D
i
m
e
n
s
i
o
n
s
"
]
their dimensions, and
h
m
[
"
A
s
s
o
c
i
a
t
i
o
n
"
]
an association from the arity-symmetry keys to the arrays.
▪
In
T
r
a
d
i
t
i
o
n
a
l
F
o
r
m
, a hypermatrix displays its component arrays explicitly.
▪
H
y
p
e
r
m
a
t
r
i
x
G
r
a
p
h
reconstructs a hypergraph from its hypermatrix.
Examples
(
7
)
Basic Examples
(
1
)
Compute the hypermatrix of a hypergraph with two binary hyperedges and one ternary hyperedge:
I
n
[
1
]
:
=
h
m
=
H
y
p
e
r
m
a
t
r
i
x
H
y
p
e
r
g
r
a
p
h
[
{
{
1
,
2
}
,
{
2
,
3
}
,
{
1
,
2
,
3
}
}
]
O
u
t
[
1
]
=
H
y
p
e
r
m
a
t
r
i
x
There is one component array per hyperedge arity:
I
n
[
2
]
:
=
h
m
[
"
D
i
m
e
n
s
i
o
n
s
"
]
O
u
t
[
2
]
=
{
{
3
,
3
}
,
{
3
,
3
,
3
}
}
The binary hyperedges are collected in a matrix, displayed with
M
a
t
r
i
x
F
o
r
m
:
I
n
[
3
]
:
=
M
a
t
r
i
x
F
o
r
m
@
F
i
r
s
t
@
h
m
[
"
A
r
r
a
y
s
"
]
O
u
t
[
3
]
=
0
1
0
0
0
1
0
0
0
S
c
o
p
e
(
4
)
P
r
o
p
e
r
t
i
e
s
&
R
e
l
a
t
i
o
n
s
(
2
)
S
e
e
A
l
s
o
H
y
p
e
r
m
a
t
r
i
x
G
r
a
p
h
▪
A
d
j
a
c
e
n
c
y
T
e
n
s
o
r
▪
H
y
p
e
r
g
r
a
p
h
I
n
c
i
d
e
n
c
e
M
a
t
r
i
x
▪
H
y
p
e
r
g
r
a
p
h
R
e
l
a
t
e
d
G
u
i
d
e
s
▪
H
y
p
e
r
g
r
a
p
h
F
u
n
c
t
i
o
n
a
l
i
t
y
"
"