HypergraphQ | HypergraphSymmetry
Hypergraph[...] represents a hypergraph object:
In[] := Hypergraph[{{1, 1, 2}}]Hypergraph follows the footsteps of Graph, in that the
Hypergraph symbol acts both as a constructor and as an object.
The second argument of Hypergraph specifies the global symmetry of its hyperedges.
In[] := Hypergraph[{{1, 1, 2}}, "Cyclic"]If left unspecified, the default symmetry is "Ordered":
In[] := Hypergraph[{{1, 1, 2}}] === Hypergraph[{{1, 1, 2}}, "Ordered"]
Out[] = TrueHypergraph objects are atomic raw objects:
In[] := AtomQ[Hypergraph[{{1, 1, 1}}]]
Out[] = TrueGiven their atomic nature, parts of a Hypergraph object
cannot be extracted:
In[] := Hypergraph[{{1, 1, 1}}][[1]]For this reason, the following accesor functions are supported:
In[] := hg = Hypergraph[{{1, 1, 2}, {2, 5, 4, 3}, {3, 6}}, "Unordered"];-
EdgeList- the list of (hyper)edges in the hypergraph:In[] := EdgeList[hg] Out[] = {{1, 1, 2}, {2, 5, 4, 3}, {3, 6}}
-
VertexList- the list of vertices and in the hypergraph:In[] := VertexList[hg] Out[] = {1, 2, 5, 4, 3, 6}
-
HypergraphSymmetry- the hypergraph symmetry:In[]:= HypergraphSymmetry[hg] Out[]= "Unordered"
HypergraphQ[hg] returns True if hg is a valid Hypergraph object and False otherwise:
In[] := HypergraphQ[Hypergraph[{{1, 1, 2}}]]
Out[] = TrueIn[] := Quiet @ HypergraphQ[Hypergraph[1]]
Out[] = FalseA (global) hypergraph symmetry specifies the type of permutation under which each hyperedge of the hypergraph is considered invariant.
- Ordered:
- Unordered:
- Cyclic:


