regina 7.3.1.1__cp38-cp38-macosx_11_0_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.
Potentially problematic release.
This version of regina might be problematic. Click here for more details.
- regina/__init__.py +203 -0
- regina/engine.cpython-38-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 +132 -0
- regina/sageRegina/testsuite/CMakeLists.txt +60 -0
- regina/sageRegina/testsuite/O2_1.rga +15 -0
- regina/sageRegina/testsuite/O2_1.tri +28 -0
- regina/sageRegina/testsuite/README.txt +20 -0
- regina/sageRegina/testsuite/alltypes.out +1551 -0
- regina/sageRegina/testsuite/alltypes.test +88 -0
- regina/sageRegina/testsuite/angles.out +102 -0
- regina/sageRegina/testsuite/angles.test +72 -0
- regina/sageRegina/testsuite/basic_callback.out +124 -0
- regina/sageRegina/testsuite/basic_sub.out +7 -0
- regina/sageRegina/testsuite/bool.out +6 -0
- regina/sageRegina/testsuite/bool.test +64 -0
- regina/sageRegina/testsuite/bytes.out +17 -0
- regina/sageRegina/testsuite/bytes.test +78 -0
- regina/sageRegina/testsuite/callbacks.out +515 -0
- regina/sageRegina/testsuite/callbacks.test +281 -0
- regina/sageRegina/testsuite/census.out +120 -0
- regina/sageRegina/testsuite/census.test +157 -0
- regina/sageRegina/testsuite/clone.out +18 -0
- regina/sageRegina/testsuite/clone.test +101 -0
- regina/sageRegina/testsuite/constructors.out +14 -0
- regina/sageRegina/testsuite/constructors.test +97 -0
- regina/sageRegina/testsuite/cube.orb +87 -0
- regina/sageRegina/testsuite/discs.out +3 -0
- regina/sageRegina/testsuite/discs.test +40 -0
- regina/sageRegina/testsuite/docstrings.filter +19 -0
- regina/sageRegina/testsuite/docstrings.out +808 -0
- regina/sageRegina/testsuite/docstrings.out.v3 +808 -0
- regina/sageRegina/testsuite/docstrings.test +57 -0
- regina/sageRegina/testsuite/dodec.orb +309 -0
- regina/sageRegina/testsuite/embeddings.out +23 -0
- regina/sageRegina/testsuite/embeddings.test +89 -0
- regina/sageRegina/testsuite/enumerate.out +62 -0
- regina/sageRegina/testsuite/enumerate.test +82 -0
- regina/sageRegina/testsuite/equality.out +112 -0
- regina/sageRegina/testsuite/equality.test +310 -0
- regina/sageRegina/testsuite/euler.out +15 -0
- regina/sageRegina/testsuite/euler.test +95 -0
- regina/sageRegina/testsuite/exception.out +7 -0
- regina/sageRegina/testsuite/exception.test +100 -0
- regina/sageRegina/testsuite/facenumbering.out +546 -0
- regina/sageRegina/testsuite/facenumbering.test +74 -0
- regina/sageRegina/testsuite/faces.out +40 -0
- regina/sageRegina/testsuite/faces.test +72 -0
- regina/sageRegina/testsuite/file.out +1229 -0
- regina/sageRegina/testsuite/file.test +70 -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/flype.out +37 -0
- regina/sageRegina/testsuite/flype.test +50 -0
- regina/sageRegina/testsuite/generic.out +116 -0
- regina/sageRegina/testsuite/generic.test +76 -0
- regina/sageRegina/testsuite/groups.out +70 -0
- regina/sageRegina/testsuite/groups.test +117 -0
- regina/sageRegina/testsuite/hypersurfaces.out +681 -0
- regina/sageRegina/testsuite/hypersurfaces.test +90 -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 +91 -0
- regina/sageRegina/testsuite/id.out +2 -0
- regina/sageRegina/testsuite/id.test +47 -0
- regina/sageRegina/testsuite/index.out +2 -0
- regina/sageRegina/testsuite/index.test +43 -0
- regina/sageRegina/testsuite/integer.out +74 -0
- regina/sageRegina/testsuite/integer.test +56 -0
- regina/sageRegina/testsuite/italian.orb +90 -0
- regina/sageRegina/testsuite/iterators.out +118 -0
- regina/sageRegina/testsuite/iterators.test +128 -0
- regina/sageRegina/testsuite/knotted-Y.orb +47 -0
- regina/sageRegina/testsuite/listener.out +43 -0
- regina/sageRegina/testsuite/listener.test +101 -0
- regina/sageRegina/testsuite/listview.out +416 -0
- regina/sageRegina/testsuite/listview.test +253 -0
- regina/sageRegina/testsuite/lookup.out +13 -0
- regina/sageRegina/testsuite/lookup.test +44 -0
- regina/sageRegina/testsuite/memory1.out +62 -0
- regina/sageRegina/testsuite/memory1.test +154 -0
- regina/sageRegina/testsuite/memory2.out +62 -0
- regina/sageRegina/testsuite/memory2.test +124 -0
- regina/sageRegina/testsuite/memory3.out +92 -0
- regina/sageRegina/testsuite/memory3.test +216 -0
- regina/sageRegina/testsuite/misc.out +7 -0
- regina/sageRegina/testsuite/misc.test +56 -0
- regina/sageRegina/testsuite/operators.out +129 -0
- regina/sageRegina/testsuite/operators.test +61 -0
- regina/sageRegina/testsuite/orb.out +441 -0
- regina/sageRegina/testsuite/orb.test +49 -0
- regina/sageRegina/testsuite/pdf.out +4 -0
- regina/sageRegina/testsuite/pdf.test +49 -0
- regina/sageRegina/testsuite/perm.out +55 -0
- regina/sageRegina/testsuite/perm.test +96 -0
- regina/sageRegina/testsuite/plantri.out +12 -0
- regina/sageRegina/testsuite/plantri.test +60 -0
- regina/sageRegina/testsuite/presentations.out +11 -0
- regina/sageRegina/testsuite/presentations.test +61 -0
- regina/sageRegina/testsuite/refs.out +51 -0
- regina/sageRegina/testsuite/refs.test +128 -0
- regina/sageRegina/testsuite/repr.out +951 -0
- regina/sageRegina/testsuite/repr.out.v3 +951 -0
- regina/sageRegina/testsuite/repr.test +548 -0
- regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
- regina/sageRegina/testsuite/safeheldtype_basic.test +113 -0
- regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
- regina/sageRegina/testsuite/safeheldtype_packet.test +181 -0
- regina/sageRegina/testsuite/sample.pdf +0 -0
- regina/sageRegina/testsuite/sets.out +7 -0
- regina/sageRegina/testsuite/sets.test +44 -0
- regina/sageRegina/testsuite/skeleton.out +308 -0
- regina/sageRegina/testsuite/skeleton.test +54 -0
- regina/sageRegina/testsuite/snappea.out +82 -0
- regina/sageRegina/testsuite/snappea.test +107 -0
- regina/sageRegina/testsuite/snapshot.out +15 -0
- regina/sageRegina/testsuite/snapshot.test +78 -0
- regina/sageRegina/testsuite/sort.out +57 -0
- regina/sageRegina/testsuite/sort.test +53 -0
- regina/sageRegina/testsuite/special.out +4 -0
- regina/sageRegina/testsuite/special.test +47 -0
- regina/sageRegina/testsuite/standardtri.out +12101 -0
- regina/sageRegina/testsuite/standardtri.test +455 -0
- regina/sageRegina/testsuite/surfaces.out +2133 -0
- regina/sageRegina/testsuite/surfaces.test +114 -0
- regina/sageRegina/testsuite/swapping.out +25 -0
- regina/sageRegina/testsuite/swapping.test +88 -0
- regina/sageRegina/testsuite/testall.in +176 -0
- regina/sageRegina/testsuite/testbasic.in +279 -0
- regina/sageRegina/testsuite/testcallback.in +150 -0
- regina/sageRegina/testsuite/testsub.in +150 -0
- regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
- regina/sageRegina/testsuite/tightencode.out +40 -0
- regina/sageRegina/testsuite/tightencode.test +108 -0
- regina/sageRegina/testsuite/treedecomp.out +135 -0
- regina/sageRegina/testsuite/treedecomp.test +66 -0
- regina/sageRegina/testsuite/treetraversal.out +52 -0
- regina/sageRegina/testsuite/treetraversal.test +190 -0
- regina/sageRegina/testsuite/trigeneral.out +1251 -0
- regina/sageRegina/testsuite/trigeneral.test +155 -0
- regina/sageRegina/testsuite/utf8.out +42 -0
- regina/sageRegina/testsuite/utf8.test +94 -0
- regina/sageRegina/version.py +5 -0
- regina/sageSetup.py +41 -0
- regina/test.py +6 -0
- regina-7.3.1.1.dist-info/METADATA +99 -0
- regina-7.3.1.1.dist-info/RECORD +160 -0
- regina-7.3.1.1.dist-info/WHEEL +5 -0
- regina-7.3.1.1.dist-info/top_level.txt +4 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# Regina - A Normal Surface Theory Calculator
|
|
2
|
+
# Python Test Suite Component
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2015-2023, Ben Burton
|
|
5
|
+
# For further details contact Ben Burton (bab@debian.org).
|
|
6
|
+
#
|
|
7
|
+
# Tests the use of pure Python functions as C++ callbacks.
|
|
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
|
|
30
|
+
# License along with this program; if not, write to the Free
|
|
31
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
32
|
+
# MA 02110-1301, USA.
|
|
33
|
+
|
|
34
|
+
########################################################################
|
|
35
|
+
# Callback actions that we pass to retriangulate() or rewrite():
|
|
36
|
+
########################################################################
|
|
37
|
+
|
|
38
|
+
def display(sig, tri):
|
|
39
|
+
# A callback that uses both sig and tri arguments.
|
|
40
|
+
print(' ' + sig, tri.size())
|
|
41
|
+
return False
|
|
42
|
+
|
|
43
|
+
sigs = None
|
|
44
|
+
def collect(sig, tri):
|
|
45
|
+
# A callback that uses a global variable.
|
|
46
|
+
global sigs
|
|
47
|
+
sigs.append(sig)
|
|
48
|
+
|
|
49
|
+
count = None
|
|
50
|
+
def stopAfter10(sig, tri):
|
|
51
|
+
# A callback that uses a global variable, and that also uses the
|
|
52
|
+
# return value to terminate the search.
|
|
53
|
+
global count
|
|
54
|
+
count = count + 1
|
|
55
|
+
return (count >= 10)
|
|
56
|
+
|
|
57
|
+
########################################################################
|
|
58
|
+
# Callback actions that we pass to enumerateCovers():
|
|
59
|
+
########################################################################
|
|
60
|
+
|
|
61
|
+
def displayCover(tri, type):
|
|
62
|
+
t = Triangulation3(tri)
|
|
63
|
+
t.intelligentSimplify()
|
|
64
|
+
print(' ' + str(type) + ': ' + t.homology().str())
|
|
65
|
+
|
|
66
|
+
########################################################################
|
|
67
|
+
# Callback actions that we pass to isomorphism searches:
|
|
68
|
+
########################################################################
|
|
69
|
+
|
|
70
|
+
isoCount = None
|
|
71
|
+
def stopAfter5Iso(iso):
|
|
72
|
+
# A callback that uses a global variable, and that also uses the
|
|
73
|
+
# return value to terminate the search.
|
|
74
|
+
global isoCount
|
|
75
|
+
isoCount = isoCount + 1
|
|
76
|
+
return (isoCount >= 5)
|
|
77
|
+
|
|
78
|
+
def displayIso(iso):
|
|
79
|
+
print(iso.detail())
|
|
80
|
+
return False
|
|
81
|
+
|
|
82
|
+
########################################################################
|
|
83
|
+
# Full tests that we can run on a triangulation or link:
|
|
84
|
+
########################################################################
|
|
85
|
+
|
|
86
|
+
def printBanner(name, test, height, threads):
|
|
87
|
+
print(name + ' -> ' + test + ', height = ' + str(height) + \
|
|
88
|
+
', threads = ' + str(threads))
|
|
89
|
+
|
|
90
|
+
def testDisplay(obj, name, height, threads):
|
|
91
|
+
printBanner(name, 'display', height, threads)
|
|
92
|
+
if obj.__class__ == Link:
|
|
93
|
+
obj.rewrite(height, threads, display)
|
|
94
|
+
else:
|
|
95
|
+
obj.retriangulate(height, threads, display)
|
|
96
|
+
|
|
97
|
+
def testStopAfter10(obj, name, height, threads):
|
|
98
|
+
printBanner(name, 'stop after 10', height, threads)
|
|
99
|
+
global count
|
|
100
|
+
count = 0
|
|
101
|
+
if obj.__class__ == Link:
|
|
102
|
+
ans = obj.rewrite(height, threads, stopAfter10)
|
|
103
|
+
else:
|
|
104
|
+
ans = obj.retriangulate(height, threads, stopAfter10)
|
|
105
|
+
if ans:
|
|
106
|
+
print(' search terminated early, count:', count)
|
|
107
|
+
else:
|
|
108
|
+
print(' search ran to completion, count:', count)
|
|
109
|
+
|
|
110
|
+
def testCollect(obj, name, height, threads):
|
|
111
|
+
printBanner(name, 'collect', height, threads)
|
|
112
|
+
global sigs
|
|
113
|
+
sigs = []
|
|
114
|
+
if obj.__class__ == Link:
|
|
115
|
+
ans = obj.rewrite(height, threads, collect)
|
|
116
|
+
else:
|
|
117
|
+
ans = obj.retriangulate(height, threads, collect)
|
|
118
|
+
sigs.sort()
|
|
119
|
+
for i in sigs:
|
|
120
|
+
print(' ' + i)
|
|
121
|
+
|
|
122
|
+
def testCovers(link, name, sheets):
|
|
123
|
+
print(name + ' -> all covers, sheets = ' + str(sheets))
|
|
124
|
+
tri = SnapPeaTriangulation(link.complement())
|
|
125
|
+
tri.enumerateCovers(sheets, SnapPeaTriangulation.all_covers, displayCover)
|
|
126
|
+
|
|
127
|
+
def testIso(inner, innerName, outer, outerName, countOnly = False):
|
|
128
|
+
comp = innerName + ' vs ' + outerName
|
|
129
|
+
if not countOnly:
|
|
130
|
+
print(comp + ' -> isomorphisms, display')
|
|
131
|
+
inner.findAllIsomorphisms(outer, displayIso)
|
|
132
|
+
print(comp + ' -> subcomplexes, display')
|
|
133
|
+
inner.findAllSubcomplexesIn(outer, displayIso)
|
|
134
|
+
|
|
135
|
+
global isoCount
|
|
136
|
+
print(comp + ' -> isomorphisms, stop after 5')
|
|
137
|
+
isoCount = 0
|
|
138
|
+
ans = inner.findAllIsomorphisms(outer, stopAfter5Iso)
|
|
139
|
+
if ans:
|
|
140
|
+
print(' search terminated early, count:', isoCount)
|
|
141
|
+
else:
|
|
142
|
+
print(' search ran to completion, count:', isoCount)
|
|
143
|
+
print(comp + ' -> subcomplexes, stop after 5')
|
|
144
|
+
|
|
145
|
+
isoCount = 0
|
|
146
|
+
ans = inner.findAllSubcomplexesIn(outer, stopAfter5Iso)
|
|
147
|
+
if ans:
|
|
148
|
+
print(' search terminated early, count:', isoCount)
|
|
149
|
+
else:
|
|
150
|
+
print(' search ran to completion, count:', isoCount)
|
|
151
|
+
|
|
152
|
+
########################################################################
|
|
153
|
+
# Individual test cases:
|
|
154
|
+
########################################################################
|
|
155
|
+
|
|
156
|
+
tri = Example3.poincare()
|
|
157
|
+
testDisplay(tri, 'Poincare homology sphere', 1, 1)
|
|
158
|
+
testDisplay(tri, 'Poincare homology sphere', 1, 2)
|
|
159
|
+
testStopAfter10(tri, 'Poincare homology sphere', 1, 1)
|
|
160
|
+
testStopAfter10(tri, 'Poincare homology sphere', 1, 2)
|
|
161
|
+
testCollect(tri, 'Poincare homology sphere', 1, 1)
|
|
162
|
+
testCollect(tri, 'Poincare homology sphere', 1, 2)
|
|
163
|
+
testIso(tri, 'Poincare homology sphere', tri, 'Poincare homology sphere', True)
|
|
164
|
+
print()
|
|
165
|
+
|
|
166
|
+
tri = Example3.weeks()
|
|
167
|
+
testDisplay(tri, 'Weeks manifold', 0, 1)
|
|
168
|
+
testDisplay(tri, 'Weeks manifold', 0, 2)
|
|
169
|
+
testStopAfter10(tri, 'Weeks manifold', 1, 1)
|
|
170
|
+
testStopAfter10(tri, 'Weeks manifold', 1, 2)
|
|
171
|
+
testCollect(tri, 'Weeks manifold', 0, 1)
|
|
172
|
+
testCollect(tri, 'Weeks manifold', 0, 2)
|
|
173
|
+
testIso(tri, 'Weeks manifold', tri, 'Weeks manifold')
|
|
174
|
+
print()
|
|
175
|
+
|
|
176
|
+
tri = Example4.cappellShaneson()
|
|
177
|
+
testDisplay(tri, 'Cappell-Shaneson knot complement', 0, 1)
|
|
178
|
+
testDisplay(tri, 'Cappell-Shaneson knot complement', 0, 2)
|
|
179
|
+
testStopAfter10(tri, 'Cappell-Shaneson knot complement', 2, 1)
|
|
180
|
+
testStopAfter10(tri, 'Cappell-Shaneson knot complement', 2, 2)
|
|
181
|
+
testCollect(tri, 'Cappell-Shaneson knot complement', 2, 1)
|
|
182
|
+
testCollect(tri, 'Cappell-Shaneson knot complement', 2, 2)
|
|
183
|
+
testIso(tri, 'Cappell-Shaneson knot complement', tri, 'Cappell-Shaneson knot complement')
|
|
184
|
+
print()
|
|
185
|
+
|
|
186
|
+
inner = Example3.lst(1,2)
|
|
187
|
+
outer = Example3.lens(8,3)
|
|
188
|
+
testIso(inner, 'LST(1,2,3)', outer, 'L(8,3)')
|
|
189
|
+
print()
|
|
190
|
+
|
|
191
|
+
link = ExampleLink.trefoil()
|
|
192
|
+
testDisplay(link, 'Trefoil', 0, 1)
|
|
193
|
+
testDisplay(link, 'Trefoil', 0, 2)
|
|
194
|
+
print()
|
|
195
|
+
|
|
196
|
+
link = ExampleLink.figureEight()
|
|
197
|
+
testStopAfter10(link, 'Figure eight knot', 1, 1)
|
|
198
|
+
testStopAfter10(link, 'Figure eight knot', 1, 2)
|
|
199
|
+
testCollect(link, 'Figure eight knot', 1, 1)
|
|
200
|
+
testCollect(link, 'Figure eight knot', 1, 2)
|
|
201
|
+
print()
|
|
202
|
+
|
|
203
|
+
link = ExampleLink.monster()
|
|
204
|
+
testStopAfter10(link, 'Monster unknot', 1, 1)
|
|
205
|
+
testStopAfter10(link, 'Monster unknot', 1, 2)
|
|
206
|
+
print()
|
|
207
|
+
|
|
208
|
+
link = ExampleLink.trefoil()
|
|
209
|
+
testCovers(link, 'Trefoil', 2)
|
|
210
|
+
testCovers(link, 'Trefoil', 3)
|
|
211
|
+
testCovers(link, 'Trefoil', 4)
|
|
212
|
+
testCovers(link, 'Trefoil', 5)
|
|
213
|
+
print()
|
|
214
|
+
|
|
215
|
+
########################################################################
|
|
216
|
+
# Test facet pairing enumeration:
|
|
217
|
+
########################################################################
|
|
218
|
+
|
|
219
|
+
def displayPairing(f, autos):
|
|
220
|
+
print(' ' + f.str(), ' -> automorphisms: ', len(autos))
|
|
221
|
+
|
|
222
|
+
print('Enumerating facet pairings:')
|
|
223
|
+
FacetPairing3.findAllPairings(3, BoolSet(False), 0, displayPairing)
|
|
224
|
+
FacetPairing5.findAllPairings(2, BoolSet(False), 0, displayPairing)
|
|
225
|
+
print()
|
|
226
|
+
|
|
227
|
+
########################################################################
|
|
228
|
+
# Test splitting surface signature enumeration:
|
|
229
|
+
########################################################################
|
|
230
|
+
|
|
231
|
+
def displaySig(s, autos):
|
|
232
|
+
print(' ' + s.str(), ' -> automorphisms: ', len(autos))
|
|
233
|
+
|
|
234
|
+
print('Enumerating splitting surface signatures:')
|
|
235
|
+
dummy = SigCensus.formCensus(3, displaySig)
|
|
236
|
+
print()
|
|
237
|
+
|
|
238
|
+
########################################################################
|
|
239
|
+
# Test enumeration of knots:
|
|
240
|
+
########################################################################
|
|
241
|
+
|
|
242
|
+
def displayKnot(k):
|
|
243
|
+
print(' ' + k.brief())
|
|
244
|
+
|
|
245
|
+
print('Enumerating knots:')
|
|
246
|
+
g = ModelLinkGraph.fromPlantri('bcdd,aeec,abfd,acfa,bffb,ceed')
|
|
247
|
+
g.generateMinimalLinks(displayKnot)
|
|
248
|
+
print()
|
|
249
|
+
|
|
250
|
+
########################################################################
|
|
251
|
+
# Test location of saturated regions:
|
|
252
|
+
########################################################################
|
|
253
|
+
|
|
254
|
+
def displayRegion(r):
|
|
255
|
+
print(r.detail())
|
|
256
|
+
s = SatRegion(r) # this is a non-trivial copy constructor
|
|
257
|
+
if r.detail() != s.detail():
|
|
258
|
+
print('ERROR - Does not match:\n' + s.detail())
|
|
259
|
+
|
|
260
|
+
print('Finding regions:')
|
|
261
|
+
t = Triangulation3.rehydrate('jofdiaabcceffhiiiedkgiilpsw')
|
|
262
|
+
dummy = SatRegion.find(t, False, displayRegion)
|
|
263
|
+
print()
|
|
264
|
+
|
|
265
|
+
########################################################################
|
|
266
|
+
# Test the non-callback version of SnapPeaTriangulation::enumerateCovers():
|
|
267
|
+
########################################################################
|
|
268
|
+
|
|
269
|
+
# Now that triangulations are not packets, we cannot use packet listeners
|
|
270
|
+
# to verify the lifetimes of the covers that are returned. For now just
|
|
271
|
+
# test that the routine seems to do the right thing.
|
|
272
|
+
|
|
273
|
+
print('Enumerating covers:')
|
|
274
|
+
c = [ (a[0].isoSig(), a[1]) for a in \
|
|
275
|
+
ExampleSnapPea.whiteheadLink().enumerateCovers(3, \
|
|
276
|
+
SnapPeaTriangulation.CoverEnumerationType.all_covers) ]
|
|
277
|
+
c.sort()
|
|
278
|
+
for i in c:
|
|
279
|
+
print(' ' + i[0], i[1])
|
|
280
|
+
|
|
281
|
+
print()
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
0:1 0:0 1:0 | 0:2 1:2 1:1
|
|
2
|
+
cMabdd
|
|
3
|
+
cMabcc
|
|
4
|
+
cMabcd
|
|
5
|
+
1:0 1:1 1:2 | 0:0 0:1 0:2
|
|
6
|
+
cPbbaa
|
|
7
|
+
cPbbac
|
|
8
|
+
cPbbbe
|
|
9
|
+
cPbbde
|
|
10
|
+
|
|
11
|
+
0:1 0:0 1:0 | 0:2 1:2 1:1
|
|
12
|
+
cMabdd
|
|
13
|
+
cMabcc
|
|
14
|
+
cMabcd
|
|
15
|
+
1:0 1:1 1:2 | 0:0 0:1 0:2
|
|
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bbb4aaaaa4a
|
|
100
|
+
cPkbbbb-a-a-aUa
|
|
101
|
+
|
|
102
|
+
0:1 0:0 0:3 0:2 1:0 | 0:4 1:2 1:1 1:4 1:3
|
|
103
|
+
cAkaabb2aoa2aoa
|
|
104
|
+
cAkaabb+aoaqbga
|
|
105
|
+
cAkaabb+aoa+aoa
|
|
106
|
+
cAkaabb+a+a+a+a
|
|
107
|
+
cAkaabb+aKa+aKa
|
|
108
|
+
0:1 0:0 1:0 1:1 1:2 | 0:2 0:3 0:4 1:4 1:3
|
|
109
|
+
cMkabbb2a-ataqb
|
|
110
|
+
cMkabbb2aHaua2a
|
|
111
|
+
cMkabbb2a4aaaca
|
|
112
|
+
cMkabbb+aaa0bPb
|
|
113
|
+
cMkabbb2aaaaa2a
|
|
114
|
+
cMkabbb+aAa3blb
|
|
115
|
+
cMkabbb+aaaaa+a
|
|
116
|
+
1:0 1:1 1:2 1:3 1:4 | 0:0 0:1 0:2 0:3 0:4
|
|
117
|
+
cPkbbbbaaaaaaaa
|
|
118
|
+
cPkbbbb4aaaaa4a
|
|
119
|
+
cPkbbbb-a-a-aUa
|
|
120
|
+
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# Regina - A Normal Surface Theory Calculator
|
|
2
|
+
# Python Test Suite Component
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2007-2023, Ben Burton
|
|
5
|
+
# For further details contact Ben Burton (bab@debian.org).
|
|
6
|
+
#
|
|
7
|
+
# Tests the census generation code.
|
|
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
|
|
30
|
+
# License along with this program; if not, write to the Free
|
|
31
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
32
|
+
# MA 02110-1301, USA.
|
|
33
|
+
|
|
34
|
+
s = None
|
|
35
|
+
partial = None
|
|
36
|
+
|
|
37
|
+
#######################################################################
|
|
38
|
+
|
|
39
|
+
def foundGluings2(g):
|
|
40
|
+
print(g.triangulate().isoSig())
|
|
41
|
+
|
|
42
|
+
def auto2(p, isos):
|
|
43
|
+
print(p.str())
|
|
44
|
+
GluingPermSearcher2.findAllPerms(p, isos, False, foundGluings2)
|
|
45
|
+
|
|
46
|
+
def best2(p, isos):
|
|
47
|
+
print(p.str())
|
|
48
|
+
b = GluingPermSearcher2.bestSearcher(p, isos, False)
|
|
49
|
+
b.runSearch(foundGluings2)
|
|
50
|
+
|
|
51
|
+
FacetPairing2.findAllPairings(2, False, 0, auto2)
|
|
52
|
+
print()
|
|
53
|
+
FacetPairing2.findAllPairings(2, False, 0, best2)
|
|
54
|
+
print()
|
|
55
|
+
|
|
56
|
+
def foundPartial2(g):
|
|
57
|
+
if s.isComplete():
|
|
58
|
+
print('Depth too large: found complete set')
|
|
59
|
+
partial.append(s.taggedData())
|
|
60
|
+
|
|
61
|
+
def partial2(p, isos):
|
|
62
|
+
global s, partial
|
|
63
|
+
print(p.str())
|
|
64
|
+
|
|
65
|
+
partial = []
|
|
66
|
+
s = GluingPermSearcher2(p, isos, False)
|
|
67
|
+
s.partialSearch(2, foundPartial2)
|
|
68
|
+
for i in partial:
|
|
69
|
+
s = GluingPermSearcher2.fromTaggedData(i)
|
|
70
|
+
s.runSearch(foundGluings2)
|
|
71
|
+
|
|
72
|
+
FacetPairing2.findAllPairings(2, False, 0, partial2)
|
|
73
|
+
print()
|
|
74
|
+
|
|
75
|
+
#######################################################################
|
|
76
|
+
|
|
77
|
+
def foundGluings3(g):
|
|
78
|
+
t = g.triangulate()
|
|
79
|
+
# Note: intelligentSimplify might reduce vertices but keep the
|
|
80
|
+
# same number of tetrahedra.
|
|
81
|
+
if not t.intelligentSimplify():
|
|
82
|
+
print(t.isoSig())
|
|
83
|
+
|
|
84
|
+
def auto3(p, isos):
|
|
85
|
+
print(p.str())
|
|
86
|
+
GluingPermSearcher3.findAllPerms(p, isos, True, True, PURGE_NON_MINIMAL, \
|
|
87
|
+
foundGluings3)
|
|
88
|
+
|
|
89
|
+
def best3(p, isos):
|
|
90
|
+
print(p.str())
|
|
91
|
+
b = GluingPermSearcher3.bestSearcher(p, isos, True, True, PURGE_NON_MINIMAL)
|
|
92
|
+
b.runSearch(foundGluings3)
|
|
93
|
+
|
|
94
|
+
FacetPairing3.findAllPairings(2, False, 0, auto3)
|
|
95
|
+
print()
|
|
96
|
+
FacetPairing3.findAllPairings(2, False, 0, best3)
|
|
97
|
+
print()
|
|
98
|
+
|
|
99
|
+
def foundPartial3(g):
|
|
100
|
+
if s.isComplete():
|
|
101
|
+
print('Depth too large: found complete set')
|
|
102
|
+
partial.append(s.taggedData())
|
|
103
|
+
|
|
104
|
+
def partial3(p, isos):
|
|
105
|
+
global s, partial
|
|
106
|
+
print(p.str())
|
|
107
|
+
|
|
108
|
+
partial = []
|
|
109
|
+
s = CompactSearcher(p, isos, True, PURGE_NON_MINIMAL)
|
|
110
|
+
s.partialSearch(2, foundPartial3)
|
|
111
|
+
for i in partial:
|
|
112
|
+
s = GluingPermSearcher3.fromTaggedData(i)
|
|
113
|
+
s.runSearch(foundGluings3)
|
|
114
|
+
|
|
115
|
+
FacetPairing3.findAllPairings(2, False, 0, partial3)
|
|
116
|
+
print()
|
|
117
|
+
|
|
118
|
+
#######################################################################
|
|
119
|
+
|
|
120
|
+
def foundGluings4(g):
|
|
121
|
+
print(g.triangulate().isoSig())
|
|
122
|
+
|
|
123
|
+
def auto4(p, isos):
|
|
124
|
+
print(p.str())
|
|
125
|
+
GluingPermSearcher4.findAllPerms(p, isos, True, True, foundGluings4)
|
|
126
|
+
|
|
127
|
+
def best4(p, isos):
|
|
128
|
+
print(p.str())
|
|
129
|
+
b = GluingPermSearcher4.bestSearcher(p, isos, True, True)
|
|
130
|
+
b.runSearch(foundGluings4)
|
|
131
|
+
|
|
132
|
+
FacetPairing4.findAllPairings(2, False, 0, auto4)
|
|
133
|
+
print()
|
|
134
|
+
FacetPairing4.findAllPairings(2, False, 0, best4)
|
|
135
|
+
print()
|
|
136
|
+
|
|
137
|
+
def foundPartial4(g):
|
|
138
|
+
if s.isComplete():
|
|
139
|
+
print('Depth too large: found complete set')
|
|
140
|
+
partial.append(s.taggedData())
|
|
141
|
+
|
|
142
|
+
def partial4(p, isos):
|
|
143
|
+
global s, partial
|
|
144
|
+
print(p.str())
|
|
145
|
+
|
|
146
|
+
partial = []
|
|
147
|
+
s = GluingPermSearcher4(p, isos, True, True)
|
|
148
|
+
s.partialSearch(2, foundPartial4)
|
|
149
|
+
for i in partial:
|
|
150
|
+
s = GluingPermSearcher4.fromTaggedData(i)
|
|
151
|
+
s.runSearch(foundGluings4)
|
|
152
|
+
|
|
153
|
+
FacetPairing4.findAllPairings(2, False, 0, partial4)
|
|
154
|
+
print()
|
|
155
|
+
|
|
156
|
+
#######################################################################
|
|
157
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Regina - A Normal Surface Theory Calculator
|
|
2
|
+
# Python Test Suite Component
|
|
3
|
+
#
|
|
4
|
+
# Copyright (c) 2015-2023, Ben Burton
|
|
5
|
+
# For further details contact Ben Burton (bab@debian.org).
|
|
6
|
+
#
|
|
7
|
+
# Tests the behaviour of the packet cloning functions.
|
|
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
|
|
30
|
+
# License along with this program; if not, write to the Free
|
|
31
|
+
# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
|
|
32
|
+
# MA 02110-1301, USA.
|
|
33
|
+
|
|
34
|
+
root = Container()
|
|
35
|
+
|
|
36
|
+
# Note: Since Regina 7.0, when cloning a packet tree, the cloned surface
|
|
37
|
+
# lists point to the *original* triangulations.
|
|
38
|
+
|
|
39
|
+
# 3-D surface test:
|
|
40
|
+
|
|
41
|
+
tri = PacketOfTriangulation3(Example3.poincare())
|
|
42
|
+
list = PacketOfNormalSurfaces(tri, NS_STANDARD)
|
|
43
|
+
tri.append(list)
|
|
44
|
+
root.append(tri)
|
|
45
|
+
|
|
46
|
+
tri2 = tri.cloneAsSibling(True)
|
|
47
|
+
list2 = tri2.firstChild()
|
|
48
|
+
|
|
49
|
+
s = list.surface(0)
|
|
50
|
+
s2 = list2.surface(0)
|
|
51
|
+
|
|
52
|
+
print(tri.samePacket(list.triangulation().packet()))
|
|
53
|
+
print(tri.samePacket(list2.triangulation().packet()))
|
|
54
|
+
print(not tri2.samePacket(list2.triangulation().packet()))
|
|
55
|
+
|
|
56
|
+
print(tri.samePacket(s.triangulation().packet()))
|
|
57
|
+
print(tri.samePacket(s2.triangulation().packet()))
|
|
58
|
+
print(not tri2.samePacket(s2.triangulation().packet()))
|
|
59
|
+
|
|
60
|
+
# 4-D hypersurface test:
|
|
61
|
+
|
|
62
|
+
tri = PacketOfTriangulation4(Example4.s3xs1())
|
|
63
|
+
list = PacketOfNormalHypersurfaces(tri, HS_STANDARD)
|
|
64
|
+
tri.append(list)
|
|
65
|
+
root.append(tri)
|
|
66
|
+
|
|
67
|
+
tri2 = tri.cloneAsSibling(True)
|
|
68
|
+
list2 = tri2.firstChild()
|
|
69
|
+
|
|
70
|
+
s = list.hypersurface(0)
|
|
71
|
+
s2 = list2.hypersurface(0)
|
|
72
|
+
|
|
73
|
+
print(tri.samePacket(list.triangulation().packet()))
|
|
74
|
+
print(tri.samePacket(list2.triangulation().packet()))
|
|
75
|
+
print(not tri2.samePacket(list2.triangulation().packet()))
|
|
76
|
+
|
|
77
|
+
print(tri.samePacket(s.triangulation().packet()))
|
|
78
|
+
print(tri.samePacket(s2.triangulation().packet()))
|
|
79
|
+
print(not tri2.samePacket(s2.triangulation().packet()))
|
|
80
|
+
|
|
81
|
+
# Angle structure test:
|
|
82
|
+
|
|
83
|
+
tri = PacketOfTriangulation3(Example3.whiteheadLink())
|
|
84
|
+
list = PacketOfAngleStructures(tri)
|
|
85
|
+
tri.append(list)
|
|
86
|
+
root.append(tri)
|
|
87
|
+
|
|
88
|
+
tri2 = tri.cloneAsSibling(True)
|
|
89
|
+
list2 = tri2.firstChild()
|
|
90
|
+
|
|
91
|
+
s = list.structure(0)
|
|
92
|
+
s2 = list2.structure(0)
|
|
93
|
+
|
|
94
|
+
print(tri.samePacket(list.triangulation().packet()))
|
|
95
|
+
print(tri.samePacket(list2.triangulation().packet()))
|
|
96
|
+
print(not tri2.samePacket(list2.triangulation().packet()))
|
|
97
|
+
|
|
98
|
+
print(tri.samePacket(s.triangulation().packet()))
|
|
99
|
+
print(tri.samePacket(s2.triangulation().packet()))
|
|
100
|
+
print(not tri2.samePacket(s2.triangulation().packet()))
|
|
101
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
0 a
|
|
2
|
+
2 cPcbbbiht
|
|
3
|
+
2 cPcbbbiht
|
|
4
|
+
4 eLPkbdcddhgggb
|
|
5
|
+
4 eLPkbdcddhgggb
|
|
6
|
+
2 cPcbbbiht
|
|
7
|
+
2 cPcbbbiht
|
|
8
|
+
2 cPcbbbiht
|
|
9
|
+
Could not construct
|
|
10
|
+
2 cPcbbbiht
|
|
11
|
+
Invalid constructor arguments
|
|
12
|
+
Invalid constructor arguments
|
|
13
|
+
Could not construct
|
|
14
|
+
Invalid constructor arguments
|