Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • 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
    • 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`
HypergraphRule
​
HypergraphRule
[input,output]
gives a hypergraph rewriting rule that replaces the hypergraph input with the hypergraph output.
​
​
HypergraphRule
[input,output,cond]
gives a rule that additionally requires the condition cond to hold for a match.
​
Details and Options
▪
HypergraphRule
[input,output]
coerces input and output to
Hypergraph
and displays the rule as an input -> output diagram.
▪
Applying the rule to a hypergraph as
rule[hg]
returns a list of match records, one
Association
per way the input side matches hg, with keys
"Hypergraph"
,
"MatchVertices"
,
"MatchEdges"
,
"MatchEdgePositions"
,
"NewVertices"
,
"NewEdges"
,
"DeletedVertices"
,
"RuleVertexMap"
,
"Bindings"
and
"EdgeArities"
.
▪
The
"Hypergraph"
key holds the rewritten hypergraph; vertices created by the rewrite get fresh names not used elsewhere in the hypergraph.
▪
rule["Input"]
and
rule["Output"]
give the two sides as
Hypergraph
objects;
rule["Condition"]
gives the held condition,
Hold[True]
when no condition was given.
▪
In
HypergraphRule
[input,output,cond]
, cond is only checked for vertices that the input hyperedges label with a shared symbol through
Hypergraph
's
VertexLabels
option; a plain vertex position with no such label is unconstrained.
▪
Rule application takes options from
HypergraphRuleApply
(see
Options[HypergraphRule]
for the full combined option list, which also includes every
Hypergraph
construction option applied to both sides).
option
default
effect
"CanonicalizeMethod"
Automatic
Full
deduplicates matches that differ only by a symmetry of the input hyperedges
"DistinctVertexLabels"
True
require distinctly labeled input vertices to bind to distinct hypergraph vertices
"DistinctEdgeLabels"
True
require distinctly labeled input hyperedges to bind to distinct hypergraph hyperedges
"SymmetryMethod"
Automatic
any other value ignores a matched hyperedge's own
"EdgeSymmetry"
tag instead of requiring it to agree with the input
"BindingsMethod"
Automatic
First
keeps only one assignment of unmatched input vertices instead of enumerating every permutation
"MatchesMethod"
Automatic
post-processing applied to the raw list of pattern matches before match records are built
​
Examples  
(11)
Basic Examples  
(1)
Make a rule that attaches a new hyperedge between two matched vertices:
In[1]:=
rule=
HypergraphRule

Hypergraph
[{{1,2}}],
Hypergraph
[{{1,2},{2,3}}]
Out[1]=
Applying the rule to a hypergraph gives one match record for every way the input side matches:
In[2]:=
matches=rule
Hypergraph
[{{a,b},{b,c}}];​​Length[matches]
Out[2]=
4
Scope  
(6)

Options  
(1)

Properties & Relations  
(2)

Possible Issues  
(1)

SeeAlso
Hypergraph
 
▪
HighlightRule
 
▪
EnumerateHypergraphRules
 
▪
RandomHypergraphRule
 
▪
HypergraphDraw
RelatedGuides
▪
HypergraphFunctionality
""

© 2026 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com