Snappy comes with a large library of manifolds, which can be accessed individually through the Manifold and Triangulation constructors but can also be iterated through using the objects described on this page.
SnapPy’s iterators support several flexible methods for accessing manifolds. They can be sliced (i.e. restricted to subranges) either by index or by volume. Calling the iterator with keyword arguments such as num_tets=1, betti=2 or num_cusps=3 returns an iterator which is filtered by the specified conditions. In addition these iterators can determine whether they contain a given manifold. They support python’s “A in B” syntax, and also provide an identify method which will return a copy of the census manifold which is isometric to the manifold passed as an argument.
Iterator for all orientable cusped hyperbolic manifolds that can be triangulated with at most 8 ideal tetrahedra.
>>> for M in OrientableCuspedCensus[3:6]: print(M, M.volume())
...
m007(0,0) 2.568970600937
m009(0,0) 2.666744783449
m010(0,0) 2.666744783449
>>> for M in OrientableCuspedCensus[-3:]: print(M, M.volume())
...
t12843(0,0)(0,0) 8.11953285128
t12844(0,0)(0,0) 8.11953285128
t12845(0,0)(0,0) 8.11953285128
>>> for M in OrientableCuspedCensus[4.10:4.12]: print(M, M.volume())
...
m217(0,0) 4.10795309664
m218(0,0) 4.10942659227
m219(0,0) 4.11285289849
m220(0,0) 4.116968736386
m221(0,0) 4.116968736386
s124(0,0) 4.111331004570
s125(0,0) 4.11370643634
>>> for M in OrientableCuspedCensus(num_cusps=2)[:3]:
... print(M, M.volume(), M.num_cusps())
...
m125(0,0)(0,0) 3.663862376709 2
m129(0,0)(0,0) 3.66386237671 2
m202(0,0)(0,0) 4.05976642564 2
>>> M = Manifold('m129')
>>> M in LinkExteriors
True
>>> LinkExteriors.identify(M)
5^2_1(0,0)(0,0)
Iterator for 11,031 closed hyperbolic manifolds from the census by Hodgson and Weeks.
>>> len(OrientableClosedCensus)
11031
>>> len(OrientableClosedCensus(betti=2))
1
>>> for M in OrientableClosedCensus(betti=2):
... print(M, M.homology())
...
v1539(5,1) Z + Z
Iterator for all of the knot exteriors in the SnapPea Census, as tabulated by Callahan, Dean, Weeks, Champanerkar, Kofman and Patterson. These are the knot exteriors which can be triangulated by at most 7 ideal tetrahedra.
>>> for M in CensusKnots[3.4:3.5]:
... print(M, M.volume(), LinkExteriors.identify(M))
...
K4_3(0,0) 3.474247761313 False
K5_1(0,0) 3.41791483724 False
K5_2(0,0) 3.42720524627 8_1(0,0)
K5_3(0,0) 3.486660146295 9_2(0,0)
Iterator for all knots with at most 11 crossings and links with at most 10 crossings, using the Rolfsen notation. The triangulations were computed by Joe Christy.
>>> for K in LinkExteriors(num_cusps=3)[-3:]:
... print(K, K.volume())
...
10^3_72(0,0)(0,0)(0,0) 14.35768902569
10^3_73(0,0)(0,0)(0,0) 15.86374430965
10^3_74(0,0)(0,0)(0,0) 15.5509143828
>>> M = Manifold('8_4')
>>> OrientableCuspedCensus.identify(M)
s862(0,0)
By default, the ‘identify’ returns the first isometric manifold it finds; if the optional ‘extends_to_link’ flag is set, it insists that meridians are taken to meridians.
>>> M = Manifold('7^2_8')
>>> LinkExteriors.identify(M)
5^2_1(0,0)(0,0)
>>> LinkExteriors.identify(M, extends_to_link=True)
7^2_8(0,0)(0,0)
Iterator for all orientable cusped hyperbolic manifolds that can be triangulated with at most 5 ideal tetrahedra.
>>> for M in NonorientableCuspedCensus(betti=2)[:3]:
... print(M, M.homology())
...
m124(0,0)(0,0)(0,0) Z/2 + Z + Z
m128(0,0)(0,0) Z + Z
m131(0,0) Z + Z
Iterator for 17 nonorientable closed hyperbolic manifolds from the census by Hodgson and Weeks.
>>> for M in NonorientableClosedCensus[:3]: print(M, M.volume())
...
m018(1,0) 2.029883212819
m177(1,0) 2.5689706009
m153(1,0) 2.666744783449
As instances of subclasses of ManifoldTable, the objects above support the following methods.
Iterator for cusped manifolds in an sqlite3 table of manifolds.
Initialize with the table name. The table schema is required to include a text field called ‘name’ and a blob field called ‘triangulation’. The blob holds the result of M._to_bytes() or M._to_string(), optionally preceded by a change of basis matrix for the peripheral curves. The structure of the blob is determined by its first byte.
Both mapping from the manifold name, and lookup by index are supported. Slicing can be done either by numerical index or by volume.
The __contains__ method is supported, so M in T returns True if M is isometric to a manifold in the table T. The method T.identify(M) will return the matching manifold from the table.
Return a list of up to limit manifolds stored in this table, satisfying the where clause, and ordered by the order_by clause. If limit is None, all matching manifolds are returned. The where clause is a required parameter.
Look for a manifold in this table which is isometric to the argument.
Return the matching manifold, if there is one which SnapPea declares to be isometric.
Return False if no manfold in the table has the same hash.
Return None in all other cases (for now).
If the flag “extends_to_link” is True, requires that the isometry sends meridians to meridians.
Return the list of column names for this manifold table.
Return all manifolds in the census which have the same hash value.
Because of the large size of their datasets, the classes below can only iterate through slices by index, and do not provide the identification methods.
Iterator/Sequence for Alternating knot exteriors from the Hoste-Thistlethwaite tables. Goes through 16 crossings.
Iterator/Sequence for nonAlternating knot exteriors from the Hoste-Thistlethwaite tables. Goes through 16 crossings.
Morwen Thistlethwaite’s table of links with at most 14 crossings (about 180k links). For instance, to look at first few 2-component links do:
>>> C = MorwenLinks(2)
>>> for M in C[:3]:
... print M, M.volume()
...
DT[ebbccdaeb](0,0)(0,0) 3.66386237671
DT[fbbdceafbd](0,0)(0,0) 5.33348956690
DT[fbccdefacb](0,0)(0,0) 4.05976642564
To look at those with 3 components and 11 crossings do:
>>> C = MorwenLinks(3, 11)
>>> len(C) # How many such links are there?
329