Graph database¶
This is a module for providing common types of graphs.
- pyrigi.graphDB.CnSymmetricFourRegular(n=8)[source]¶
Return a \(C_n\)-symmetric 4-regular graph.
The value
n
must be even and at least 8.Definitions
- pyrigi.graphDB.CnSymmetricWithFixedVertex(n=8)[source]¶
Return a \(C_n\)-symmetric graph with a fixed vertex.
The value
n
must be even and at least 8.The returned graph satisfies the expected symmetry-adapted Laman count for rotation but is (generically) infinitesimally flexible.
Definitions
- pyrigi.graphDB.Complete(n=None, vertices=None)[source]¶
Return the complete graph on
n
vertices.The vertex labels can also be specified explicitly via the keyword
vertices
.- Parameters:
- Return type:
Examples
>>> print(Complete(5)) Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [0, 2], [0, 3], [0, 4], [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]] >>> print(Complete(5, [0, 1, 2, 3, 4])) Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [0, 2], [0, 3], [0, 4], [1, 2], [1, 3], [1, 4], [2, 3], [2, 4], [3, 4]] >>> print(Complete(vertices=['a', 'b', 'c', 'd'])) Graph with vertices ['a', 'b', 'c', 'd'] and edges [['a', 'b'], ['a', 'c'], ['a', 'd'], ['b', 'c'], ['b', 'd'], ['c', 'd']]
- pyrigi.graphDB.CompleteBipartite(n1, n2)[source]¶
Return the complete bipartite graph on
n1+n2
vertices.
- pyrigi.graphDB.CubeWithDiagonal()[source]¶
Return the graph given by the skeleton of the cube with a main diagonal.
- Return type:
- pyrigi.graphDB.Diamond()[source]¶
Return the complete graph on 4 vertices minus an edge.
- Return type:
- pyrigi.graphDB.Dodecahedral()[source]¶
Return the graph given by the skeleton of a dodecahedron.
- Return type:
- pyrigi.graphDB.DoubleBanana(dim=3, t=2)[source]¶
Return the
dim
-dimensional double banana graph.Definitions
- Parameters:
- Return type:
Examples
>>> print(DoubleBanana()) Graph with vertices [0, 1, 2, 3, 4, 5, 6, 7] and edges [[0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [2, 3], [2, 4], [3, 4], [5, 6], [5, 7], [6, 7]] >>> print(DoubleBanana(dim = 4)) Graph with vertices [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] and edges [[0, 2], [0, 3], [0, 4], [0, 5], [0, 6], [0, 7], [0, 8], [0, 9], [1, 2], [1, 3], [1, 4], [1, 5], [1, 6], [1, 7], [1, 8], [1, 9], [2, 3], [2, 4], [2, 5], [3, 4], [3, 5], [4, 5], [6, 7], [6, 8], [6, 9], [7, 8], [7, 9], [8, 9]]
- pyrigi.graphDB.Icosahedral()[source]¶
Return the graph given by the skeleton of an icosahedron.
- Return type:
- pyrigi.graphDB.K33plusEdge()[source]¶
Return the complete bipartite graph on 3+3 vertices with an extra edge.
- Return type:
- pyrigi.graphDB.K66MinusPerfectMatching()[source]¶
Return the complete bipartite graph minus a perfect matching.
A matching is formed by six non-incident edges.
- Return type:
- pyrigi.graphDB.Octahedral()[source]¶
Return the graph given by the skeleton of an octahedron.
- Return type:
- pyrigi.graphDB.ThreeConnectedR3Circuit()[source]¶
Return a 3-connected \(R_3\)-circuit.
The returned graph is hypothesized to be the smallest 3-connected \(R_3\)-circuit.
- Return type: