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