regina 7.4.1__cp314-cp314-macosx_10_13_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- regina/.dylibs/libgmp.10.dylib +0 -0
- regina/.dylibs/libgmpxx.4.dylib +0 -0
- regina/__init__.py +192 -0
- regina/engine.cpython-314-darwin.so +0 -0
- regina/plainCompleter.py +221 -0
- regina/pyCensus/__init__.py +14 -0
- regina/pyCensus/christy-knots-links.tdb +0 -0
- regina/pyCensus/closed-hyp-census-full.tdb +0 -0
- regina/pyCensus/closed-nor-census-11.tdb +0 -0
- regina/pyCensus/closed-or-census-11.tdb +0 -0
- regina/pyCensus/cusped-hyp-nor-census-9.tdb +0 -0
- regina/pyCensus/cusped-hyp-or-census-9.tdb +0 -0
- regina/sageRegina/__init__.py +2 -0
- regina/sageRegina/config.py +9 -0
- regina/sageRegina/test.py +131 -0
- regina/sageRegina/testsuite/CMakeLists.txt +64 -0
- regina/sageRegina/testsuite/O2_1.rga +15 -0
- regina/sageRegina/testsuite/O2_1.tri +28 -0
- regina/sageRegina/testsuite/README.txt +21 -0
- regina/sageRegina/testsuite/alltypes-exc.out +698 -0
- regina/sageRegina/testsuite/alltypes-exc.test +92 -0
- regina/sageRegina/testsuite/alltypes-noexc.out +698 -0
- regina/sageRegina/testsuite/alltypes-noexc.test +85 -0
- regina/sageRegina/testsuite/alltypes.out +698 -0
- regina/sageRegina/testsuite/alltypes.test +85 -0
- regina/sageRegina/testsuite/angles.out +102 -0
- regina/sageRegina/testsuite/angles.test +70 -0
- regina/sageRegina/testsuite/arrow.out +86 -0
- regina/sageRegina/testsuite/arrow.test +224 -0
- regina/sageRegina/testsuite/base64.out +2 -0
- regina/sageRegina/testsuite/base64.test +37 -0
- regina/sageRegina/testsuite/basic_callback.out +124 -0
- regina/sageRegina/testsuite/basic_sub.out +7 -0
- regina/sageRegina/testsuite/binom.out +14 -0
- regina/sageRegina/testsuite/binom.test +69 -0
- regina/sageRegina/testsuite/bool.out +6 -0
- regina/sageRegina/testsuite/bool.test +62 -0
- regina/sageRegina/testsuite/bytes.out +17 -0
- regina/sageRegina/testsuite/bytes.test +76 -0
- regina/sageRegina/testsuite/callbacks.out +515 -0
- regina/sageRegina/testsuite/callbacks.test +279 -0
- regina/sageRegina/testsuite/census.out +120 -0
- regina/sageRegina/testsuite/census.test +156 -0
- regina/sageRegina/testsuite/clone.out +18 -0
- regina/sageRegina/testsuite/clone.test +99 -0
- regina/sageRegina/testsuite/comparison.out +41 -0
- regina/sageRegina/testsuite/comparison.test +47 -0
- regina/sageRegina/testsuite/construction.out +120 -0
- regina/sageRegina/testsuite/construction.test +63 -0
- regina/sageRegina/testsuite/constructors.out +14 -0
- regina/sageRegina/testsuite/constructors.test +95 -0
- regina/sageRegina/testsuite/cube.orb +87 -0
- regina/sageRegina/testsuite/discs.out +3 -0
- regina/sageRegina/testsuite/discs.test +38 -0
- regina/sageRegina/testsuite/docstrings.filter +22 -0
- regina/sageRegina/testsuite/docstrings.out +802 -0
- regina/sageRegina/testsuite/docstrings.out.v2 +799 -0
- regina/sageRegina/testsuite/docstrings.test +55 -0
- regina/sageRegina/testsuite/dodec.orb +309 -0
- regina/sageRegina/testsuite/embeddings.out +23 -0
- regina/sageRegina/testsuite/embeddings.test +87 -0
- regina/sageRegina/testsuite/enumerate.out +62 -0
- regina/sageRegina/testsuite/enumerate.test +80 -0
- regina/sageRegina/testsuite/equality.out +112 -0
- regina/sageRegina/testsuite/equality.test +308 -0
- regina/sageRegina/testsuite/euler.out +15 -0
- regina/sageRegina/testsuite/euler.test +93 -0
- regina/sageRegina/testsuite/exception.out +7 -0
- regina/sageRegina/testsuite/exception.test +98 -0
- regina/sageRegina/testsuite/facenumbering.out +546 -0
- regina/sageRegina/testsuite/facenumbering.test +72 -0
- regina/sageRegina/testsuite/faces.out +40 -0
- regina/sageRegina/testsuite/faces.test +70 -0
- regina/sageRegina/testsuite/file.out +1229 -0
- regina/sageRegina/testsuite/file.test +68 -0
- regina/sageRegina/testsuite/file1.rga +0 -0
- regina/sageRegina/testsuite/file2.rga +0 -0
- regina/sageRegina/testsuite/file3.rga +119 -0
- regina/sageRegina/testsuite/flags.out +38 -0
- regina/sageRegina/testsuite/flags.out.v2 +38 -0
- regina/sageRegina/testsuite/flags.test +81 -0
- regina/sageRegina/testsuite/flype.out +37 -0
- regina/sageRegina/testsuite/flype.test +48 -0
- regina/sageRegina/testsuite/generic.out +116 -0
- regina/sageRegina/testsuite/generic.test +74 -0
- regina/sageRegina/testsuite/groups.out +70 -0
- regina/sageRegina/testsuite/groups.test +115 -0
- regina/sageRegina/testsuite/hash.out +66 -0
- regina/sageRegina/testsuite/hash.test +84 -0
- regina/sageRegina/testsuite/hypersurfaces.out +681 -0
- regina/sageRegina/testsuite/hypersurfaces.test +89 -0
- regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
- regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
- regina/sageRegina/testsuite/i18n.out +6 -0
- regina/sageRegina/testsuite/i18n.test +89 -0
- regina/sageRegina/testsuite/id.out +2 -0
- regina/sageRegina/testsuite/id.test +45 -0
- regina/sageRegina/testsuite/index.out +2 -0
- regina/sageRegina/testsuite/index.test +41 -0
- regina/sageRegina/testsuite/integer.out +74 -0
- regina/sageRegina/testsuite/integer.test +54 -0
- regina/sageRegina/testsuite/italian.orb +90 -0
- regina/sageRegina/testsuite/iterators.out +118 -0
- regina/sageRegina/testsuite/iterators.test +126 -0
- regina/sageRegina/testsuite/knotted-Y.orb +47 -0
- regina/sageRegina/testsuite/listener.out +43 -0
- regina/sageRegina/testsuite/listener.test +99 -0
- regina/sageRegina/testsuite/listview.out +416 -0
- regina/sageRegina/testsuite/listview.test +251 -0
- regina/sageRegina/testsuite/lookup.out +13 -0
- regina/sageRegina/testsuite/lookup.test +42 -0
- regina/sageRegina/testsuite/lst.out +844 -0
- regina/sageRegina/testsuite/lst.test +195 -0
- regina/sageRegina/testsuite/memory1.out +62 -0
- regina/sageRegina/testsuite/memory1.test +152 -0
- regina/sageRegina/testsuite/memory2.out +62 -0
- regina/sageRegina/testsuite/memory2.test +122 -0
- regina/sageRegina/testsuite/memory3.out +92 -0
- regina/sageRegina/testsuite/memory3.test +214 -0
- regina/sageRegina/testsuite/misc.out +7 -0
- regina/sageRegina/testsuite/misc.test +54 -0
- regina/sageRegina/testsuite/operators.out +129 -0
- regina/sageRegina/testsuite/operators.test +59 -0
- regina/sageRegina/testsuite/orb.out +441 -0
- regina/sageRegina/testsuite/orb.test +47 -0
- regina/sageRegina/testsuite/pdf.out +4 -0
- regina/sageRegina/testsuite/pdf.test +47 -0
- regina/sageRegina/testsuite/perm.out +36 -0
- regina/sageRegina/testsuite/perm.test +74 -0
- regina/sageRegina/testsuite/plantri.out +12 -0
- regina/sageRegina/testsuite/plantri.test +58 -0
- regina/sageRegina/testsuite/poincare.tri +55 -0
- regina/sageRegina/testsuite/presentations.out +11 -0
- regina/sageRegina/testsuite/presentations.test +59 -0
- regina/sageRegina/testsuite/refs.out +51 -0
- regina/sageRegina/testsuite/refs.test +126 -0
- regina/sageRegina/testsuite/repr.out +951 -0
- regina/sageRegina/testsuite/repr.out.v2 +951 -0
- regina/sageRegina/testsuite/repr.test +546 -0
- regina/sageRegina/testsuite/runbasic.in +75 -0
- regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
- regina/sageRegina/testsuite/safeheldtype_basic.test +111 -0
- regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
- regina/sageRegina/testsuite/safeheldtype_packet.test +179 -0
- regina/sageRegina/testsuite/sample.pdf +0 -0
- regina/sageRegina/testsuite/sets.out +7 -0
- regina/sageRegina/testsuite/sets.test +42 -0
- regina/sageRegina/testsuite/skeleton.out +308 -0
- regina/sageRegina/testsuite/skeleton.test +52 -0
- regina/sageRegina/testsuite/snappea.out +90 -0
- regina/sageRegina/testsuite/snappea.test +133 -0
- regina/sageRegina/testsuite/snapshot.out +15 -0
- regina/sageRegina/testsuite/snapshot.test +76 -0
- regina/sageRegina/testsuite/sort.out +78 -0
- regina/sageRegina/testsuite/sort.test +58 -0
- regina/sageRegina/testsuite/special.out +4 -0
- regina/sageRegina/testsuite/special.test +45 -0
- regina/sageRegina/testsuite/standardtri.out +12101 -0
- regina/sageRegina/testsuite/standardtri.test +453 -0
- regina/sageRegina/testsuite/surfaces.out +2133 -0
- regina/sageRegina/testsuite/surfaces.test +112 -0
- regina/sageRegina/testsuite/swapping.out +25 -0
- regina/sageRegina/testsuite/swapping.test +86 -0
- regina/sageRegina/testsuite/testall.in +174 -0
- regina/sageRegina/testsuite/testbasic.in +277 -0
- regina/sageRegina/testsuite/testcallback.in +148 -0
- regina/sageRegina/testsuite/testsub.in +148 -0
- regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
- regina/sageRegina/testsuite/tightencode.out +40 -0
- regina/sageRegina/testsuite/tightencode.test +106 -0
- regina/sageRegina/testsuite/treedecomp.out +135 -0
- regina/sageRegina/testsuite/treedecomp.test +64 -0
- regina/sageRegina/testsuite/treetraversal.out +52 -0
- regina/sageRegina/testsuite/treetraversal.test +188 -0
- regina/sageRegina/testsuite/trigeneral.out +1251 -0
- regina/sageRegina/testsuite/trigeneral.test +153 -0
- regina/sageRegina/testsuite/utf8.out +42 -0
- regina/sageRegina/testsuite/utf8.test +92 -0
- regina/sageRegina/testsuite/whitehead.tri +47 -0
- regina/sageRegina/version.py +5 -0
- regina/sageSetup.py +41 -0
- regina/test.py +6 -0
- regina-7.4.1.dist-info/METADATA +109 -0
- regina-7.4.1.dist-info/RECORD +186 -0
- regina-7.4.1.dist-info/WHEEL +6 -0
- regina-7.4.1.dist-info/top_level.txt +4 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
------------------------
|
|
2
|
+
New marked abelian group
|
|
3
|
+
------------------------
|
|
4
|
+
|
|
5
|
+
Group: Z + Z_6 (Z^3 -> Z^5 -> Z^1)
|
|
6
|
+
Free generators:
|
|
7
|
+
0: ( -1 0 0 0 1 )
|
|
8
|
+
Torsion generators:
|
|
9
|
+
0: ( 3 -1 -1 0 -1 )
|
|
10
|
+
|
|
11
|
+
------------------------
|
|
12
|
+
New marked abelian group
|
|
13
|
+
------------------------
|
|
14
|
+
|
|
15
|
+
Group: 2 Z + 2 Z_2 (Z^2 -> Z^5 -> Z^1)
|
|
16
|
+
Free generators:
|
|
17
|
+
0: ( -1 0 0 1 0 )
|
|
18
|
+
1: ( -1 0 0 0 1 )
|
|
19
|
+
Torsion generators:
|
|
20
|
+
0: ( -1 1 0 0 0 )
|
|
21
|
+
1: ( -3 0 1 1 1 )
|
|
22
|
+
|
|
23
|
+
----------------
|
|
24
|
+
New homomorphism
|
|
25
|
+
----------------
|
|
26
|
+
|
|
27
|
+
Hom: 2 Z + 2 Z_2 (Z^2 -> Z^5 -> Z^1) --> Z + Z_6 (Z^3 -> Z^5 -> Z^1)
|
|
28
|
+
Kernel: Z + Z_2
|
|
29
|
+
Cokernel: Z_5
|
|
30
|
+
Image: Z + Z_6
|
|
31
|
+
Reduced Matrix (torsion coordinates appear first):
|
|
32
|
+
0 3 0 2
|
|
33
|
+
0 0 5 0
|
|
34
|
+
|
|
35
|
+
----------------
|
|
36
|
+
New homomorphism
|
|
37
|
+
----------------
|
|
38
|
+
|
|
39
|
+
Hom: 2 Z + 2 Z_2 (Z^2 -> Z^5 -> Z^1) --> Z + Z_6 (Z^3 -> Z^5 -> Z^1)
|
|
40
|
+
Kernel: Z + Z_2
|
|
41
|
+
Cokernel: Z_15
|
|
42
|
+
Image: Z + Z_2
|
|
43
|
+
Reduced Matrix (torsion coordinates appear first):
|
|
44
|
+
0 3 0 0
|
|
45
|
+
0 0 10 15
|
|
46
|
+
|
|
47
|
+
----------------
|
|
48
|
+
New homomorphism
|
|
49
|
+
----------------
|
|
50
|
+
|
|
51
|
+
Hom: 2 Z + 2 Z_2 (Z^2 -> Z^5 -> Z^1) --> Z + Z_6 (Z^3 -> Z^5 -> Z^1)
|
|
52
|
+
Kernel: 2 Z + Z_2
|
|
53
|
+
Cokernel: Z
|
|
54
|
+
Image: Z_6
|
|
55
|
+
Reduced Matrix (torsion coordinates appear first):
|
|
56
|
+
3 3 2 4
|
|
57
|
+
0 0 0 0
|
|
58
|
+
|
|
59
|
+
------------------------------------
|
|
60
|
+
Miscellaneous vector representations
|
|
61
|
+
------------------------------------
|
|
62
|
+
|
|
63
|
+
Not in kernel
|
|
64
|
+
( 0 6 )
|
|
65
|
+
( 2 6 )
|
|
66
|
+
( 4 6 )
|
|
67
|
+
( 0 6 )
|
|
68
|
+
Not in kernel
|
|
69
|
+
( 1 1 4 2 )
|
|
70
|
+
( 0 1 4 2 )
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Regina - A Normal Surface Theory Calculator
|
|
2
|
+
# Python Test Suite Component
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2007-2025, Ben Burton
|
|
5
|
+
# For further details contact Ben Burton (bab@debian.org).
|
|
6
|
+
#
|
|
7
|
+
# Provides various tests for marked abelian groups.
|
|
8
|
+
#
|
|
9
|
+
# This file is a single component of Regina's python test suite. To run
|
|
10
|
+
# the python test suite, move to the main python directory in the source
|
|
11
|
+
# tree and run "make check".
|
|
12
|
+
#
|
|
13
|
+
# This program is free software; you can redistribute it and/or
|
|
14
|
+
# modify it under the terms of the GNU General Public License as
|
|
15
|
+
# published by the Free Software Foundation; either version 2 of the
|
|
16
|
+
#
|
|
17
|
+
# As an exception, when this program is distributed through (i) the
|
|
18
|
+
# App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
|
|
19
|
+
# (iii) Google Play by Google Inc., then that store may impose any
|
|
20
|
+
# digital rights management, device limits and/or redistribution
|
|
21
|
+
# restrictions that are required by its terms of service.
|
|
22
|
+
# License, or (at your option) any later version.
|
|
23
|
+
#
|
|
24
|
+
# This program is distributed in the hope that it will be useful, but
|
|
25
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
27
|
+
# General Public License for more details.
|
|
28
|
+
#
|
|
29
|
+
# You should have received a copy of the GNU General Public License
|
|
30
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
31
|
+
|
|
32
|
+
def makeMatrix(values):
|
|
33
|
+
m = regina.MatrixInt(values)
|
|
34
|
+
return m
|
|
35
|
+
|
|
36
|
+
def makeGroup(valuesM, valuesN):
|
|
37
|
+
return regina.MarkedAbelianGroup(
|
|
38
|
+
makeMatrix(valuesM),
|
|
39
|
+
makeMatrix(valuesN))
|
|
40
|
+
|
|
41
|
+
def makeHom(domain, codomain, values):
|
|
42
|
+
return regina.HomMarkedAbelianGroup(
|
|
43
|
+
domain, codomain, makeMatrix(values))
|
|
44
|
+
|
|
45
|
+
def groupStats(g):
|
|
46
|
+
print("------------------------")
|
|
47
|
+
print("New marked abelian group")
|
|
48
|
+
print("------------------------")
|
|
49
|
+
print()
|
|
50
|
+
print('Group:', g)
|
|
51
|
+
|
|
52
|
+
print('Free generators:')
|
|
53
|
+
for i in range(g.rank()):
|
|
54
|
+
print(str(i) + ':', g.freeRep(i))
|
|
55
|
+
print('Torsion generators:')
|
|
56
|
+
for i in range(g.countInvariantFactors()):
|
|
57
|
+
print(str(i) + ':', g.torsionRep(i))
|
|
58
|
+
|
|
59
|
+
# Nothing else to say.
|
|
60
|
+
print()
|
|
61
|
+
|
|
62
|
+
def homStats(h):
|
|
63
|
+
print("----------------")
|
|
64
|
+
print("New homomorphism")
|
|
65
|
+
print("----------------")
|
|
66
|
+
print()
|
|
67
|
+
print(h.detail())
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
# Z + Z_6:
|
|
71
|
+
g1 = makeGroup([[1,1,1,1,1]],
|
|
72
|
+
[[2,2,6], [-2,0,0], [0,-1,-3], [0,-1,0], [0,0,-3]])
|
|
73
|
+
groupStats(g1)
|
|
74
|
+
|
|
75
|
+
# 2 Z + 2 Z_2:
|
|
76
|
+
g2 = makeGroup([[1,1,1,1,1]],
|
|
77
|
+
[[2,-6], [-2,0], [0,2], [0,2], [0,2]])
|
|
78
|
+
groupStats(g2)
|
|
79
|
+
|
|
80
|
+
# Hom: g2 -> g1, kernel Z + Z_2, cokernel Z_5:
|
|
81
|
+
homStats(makeHom(g2, g1,
|
|
82
|
+
[[5,5,11,0,7], [0,0,1,0,2], [0,0,-1,0,-2], [0,0,0,0,0], [0,0,-6,5,-2]]))
|
|
83
|
+
|
|
84
|
+
# Hom: g2 -> g1, kernel Z + Z_2, cokernel Z_15:
|
|
85
|
+
homStats(makeHom(g2, g1,
|
|
86
|
+
[[10,10,38,0,-5], [0,0,3,0,0], [0,0,-3,0,0], [0,0,0,0,0], [0,0,-28,10,15]]))
|
|
87
|
+
|
|
88
|
+
# Hom: g2 -> g1, kernel 2 Z + Z_2, cokernel Z:
|
|
89
|
+
homStats(makeHom(g2, g1,
|
|
90
|
+
[[-3,0,0,-1,1], [-3,0,0,-1,1], [3,0,0,1,-1], [0,0,0,0,0], [3,0,0,1,-1]]))
|
|
91
|
+
|
|
92
|
+
# Some playing with snfRep():
|
|
93
|
+
print("------------------------------------")
|
|
94
|
+
print("Miscellaneous vector representations")
|
|
95
|
+
print("------------------------------------")
|
|
96
|
+
print()
|
|
97
|
+
|
|
98
|
+
try:
|
|
99
|
+
print(g1.snfRep([-6,0,0,0,5]))
|
|
100
|
+
except InvalidArgument as e:
|
|
101
|
+
print('Not in kernel')
|
|
102
|
+
|
|
103
|
+
print(g1.snfRep([-6,0,0,0,6]))
|
|
104
|
+
print(g1.snfRep([-4,2,-2,0,4]))
|
|
105
|
+
print(g1.snfRep([-8,-2,2,0,8]))
|
|
106
|
+
print(g1.snfRep([0,6,-6,0,0]))
|
|
107
|
+
|
|
108
|
+
try:
|
|
109
|
+
print(g2.snfRep([0,-3,-1,3,0]))
|
|
110
|
+
except InvalidArgument as e:
|
|
111
|
+
print('Not in kernel')
|
|
112
|
+
|
|
113
|
+
print(g2.snfRep([0,-3,-1,3,1]))
|
|
114
|
+
print(g2.snfRep([-3,0,-1,3,1]))
|
|
115
|
+
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
sample string
|
|
2
|
+
10
|
|
3
|
+
Closed non-orientable 2-D triangulation, f = ( 1 3 2 )
|
|
4
|
+
11
|
|
5
|
+
Closed orientable 3-D triangulation, f = ( 1 6 10 5 )
|
|
6
|
+
12
|
|
7
|
+
Closed orientable 4-D triangulation, f = ( 24 27 108 135 54 )
|
|
8
|
+
13
|
|
9
|
+
Possibly closed orientable 5-D triangulation, f = ( 7 21 35 35 21 7 )
|
|
10
|
+
14
|
|
11
|
+
3-crossing knot: +++ ( ^0 _1 ^2 _0 ^1 _2 )
|
|
12
|
+
15
|
|
13
|
+
10
|
|
14
|
+
16
|
|
15
|
+
120
|
|
16
|
+
17
|
|
17
|
+
3120
|
|
18
|
+
18
|
|
19
|
+
31204
|
|
20
|
+
19
|
|
21
|
+
315204
|
|
22
|
+
20
|
|
23
|
+
3152064
|
|
24
|
+
21
|
|
25
|
+
31052064
|
|
26
|
+
22
|
|
27
|
+
3 Z + Z_3 + Z_6 + Z_24
|
|
28
|
+
23
|
|
29
|
+
5
|
|
30
|
+
24
|
|
31
|
+
8
|
|
32
|
+
25
|
|
33
|
+
inf
|
|
34
|
+
26
|
|
35
|
+
( 3 -2 0 6 )
|
|
36
|
+
27
|
|
37
|
+
( 3 inf -2 0 6 )
|
|
38
|
+
28
|
|
39
|
+
x - 6 + 5 x^-2
|
|
40
|
+
29
|
|
41
|
+
x^3 y^-2 + 4 x
|
|
42
|
+
30
|
|
43
|
+
0:2 1:1 0:0 | 1:2 0:1 1:0
|
|
44
|
+
31
|
|
45
|
+
1:0 2:0 3:0 4:0 | 0:0 2:1 4:1 3:1 | 0:1 1:1 3:3 4:2 | 0:2 1:3 4:3 2:2 | 0:3 1:2 2:3 3:2
|
|
46
|
+
32
|
|
47
|
+
0:3 1:4 1:0 0:0 1:2 | 0:2 1:3 0:4 1:1 0:1
|
|
48
|
+
33
|
|
49
|
+
1:0 2:0 3:0 4:0 5:0 6:0 | 0:0 2:1 3:1 4:1 5:1 6:1 | 0:1 1:1 3:2 4:2 5:2 6:2 | 0:2 1:2 2:2 4:3 5:3 6:3 | 0:3 1:3 2:3 3:3 5:4 6:4 | 0:4 1:4 2:4 3:4 4:4 6:5 | 0:5 1:5 2:5 3:5 4:5 5:5
|
|
50
|
+
34
|
|
51
|
+
4:1
|
|
52
|
+
35
|
|
53
|
+
8:0
|
|
54
|
+
36
|
|
55
|
+
8:3
|
|
56
|
+
37
|
|
57
|
+
8:5
|
|
58
|
+
38
|
|
59
|
+
0 -> 0 (012), 1 -> 1 (012), 2 -> 2 (012)
|
|
60
|
+
39
|
|
61
|
+
0 -> 0 (0123), 1 -> 1 (0123), 2 -> 2 (0123), 3 -> 3 (0123), 4 -> 4 (0123)
|
|
62
|
+
40
|
|
63
|
+
0 -> 0 (01234), 1 -> 1 (01234)
|
|
64
|
+
41
|
|
65
|
+
0 -> 0 (012345), 1 -> 1 (012345), 2 -> 2 (012345), 3 -> 3 (012345)
|
|
66
|
+
42
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Regina - A Normal Surface Theory Calculator
|
|
2
|
+
# Python Test Suite Component
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2015-2025, Ben Burton
|
|
5
|
+
# For further details contact Ben Burton (bab@debian.org).
|
|
6
|
+
#
|
|
7
|
+
# Tests hashable classes.
|
|
8
|
+
#
|
|
9
|
+
# This file is a single component of Regina's python test suite. To run
|
|
10
|
+
# the python test suite, move to the main python directory in the source
|
|
11
|
+
# tree and run "make check".
|
|
12
|
+
#
|
|
13
|
+
# This program is free software; you can redistribute it and/or
|
|
14
|
+
# modify it under the terms of the GNU General Public License as
|
|
15
|
+
# published by the Free Software Foundation; either version 2 of the
|
|
16
|
+
# License, or (at your option) any later version.
|
|
17
|
+
#
|
|
18
|
+
# As an exception, when this program is distributed through (i) the
|
|
19
|
+
# App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
|
|
20
|
+
# (iii) Google Play by Google Inc., then that store may impose any
|
|
21
|
+
# digital rights management, device limits and/or redistribution
|
|
22
|
+
# restrictions that are required by its terms of service.
|
|
23
|
+
#
|
|
24
|
+
# This program is distributed in the hope that it will be useful, but
|
|
25
|
+
# WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
27
|
+
# General Public License for more details.
|
|
28
|
+
#
|
|
29
|
+
# You should have received a copy of the GNU General Public License
|
|
30
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
31
|
+
|
|
32
|
+
d = { 8: -1, 'foo': -2 }
|
|
33
|
+
counter = 10
|
|
34
|
+
|
|
35
|
+
def test(obj):
|
|
36
|
+
global counter
|
|
37
|
+
try:
|
|
38
|
+
print(obj)
|
|
39
|
+
d[obj] = counter
|
|
40
|
+
counter = counter + 1
|
|
41
|
+
except:
|
|
42
|
+
print('Cannot hash and insert:', obj)
|
|
43
|
+
|
|
44
|
+
try:
|
|
45
|
+
c = type(obj)
|
|
46
|
+
print(d[c(obj)])
|
|
47
|
+
except:
|
|
48
|
+
print('Cannot hash and lookup:', obj)
|
|
49
|
+
|
|
50
|
+
test('sample string')
|
|
51
|
+
test(Example2.kb())
|
|
52
|
+
test(Example3.poincare())
|
|
53
|
+
test(Example4.k3())
|
|
54
|
+
test(Example5.simplicialSphere())
|
|
55
|
+
test(ExampleLink.trefoil())
|
|
56
|
+
test(Perm2(1,0))
|
|
57
|
+
test(Perm3(1,2,0))
|
|
58
|
+
test(Perm4(3,1,2,0))
|
|
59
|
+
test(Perm5(3,1,2,0,4))
|
|
60
|
+
test(Perm6(3,1,5,2,0,4))
|
|
61
|
+
test(Perm7(3,1,5,2,0,6,4))
|
|
62
|
+
test(Perm8([3,1,8,5,2,0,6,4]))
|
|
63
|
+
test(AbelianGroup(3, [3,6,24]))
|
|
64
|
+
test(Integer(5))
|
|
65
|
+
test(LargeInteger(8))
|
|
66
|
+
test(LargeInteger.infinity)
|
|
67
|
+
test(VectorInt([3,-2,0,6]))
|
|
68
|
+
test(VectorLarge([3,'inf',-2,0,6]))
|
|
69
|
+
test(Laurent(-2, [5,0,-6,1]))
|
|
70
|
+
test(Laurent2([(3,-2,1), (1,0,4)]))
|
|
71
|
+
test(Example2.kb().pairing())
|
|
72
|
+
test(Example3.poincare().pairing())
|
|
73
|
+
test(Example4.cappellShaneson().pairing())
|
|
74
|
+
test(Example5.simplicialSphere().pairing())
|
|
75
|
+
test(FacetSpec2(4,1))
|
|
76
|
+
test(FacetSpec3(8,0))
|
|
77
|
+
test(FacetSpec4(8,3))
|
|
78
|
+
test(FacetSpec5(8,5))
|
|
79
|
+
|
|
80
|
+
# TODO: Replace these with better (non-trivial but deterministic) examples.
|
|
81
|
+
test(Isomorphism2.identity(3))
|
|
82
|
+
test(Isomorphism3.identity(5))
|
|
83
|
+
test(Isomorphism4.identity(2))
|
|
84
|
+
test(Isomorphism5.identity(4))
|