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.

Files changed (160) hide show
  1. regina/__init__.py +203 -0
  2. regina/engine.cpython-38-darwin.so +0 -0
  3. regina/plainCompleter.py +221 -0
  4. regina/pyCensus/__init__.py +14 -0
  5. regina/pyCensus/christy-knots-links.tdb +0 -0
  6. regina/pyCensus/closed-hyp-census-full.tdb +0 -0
  7. regina/pyCensus/closed-nor-census-11.tdb +0 -0
  8. regina/pyCensus/closed-or-census-11.tdb +0 -0
  9. regina/pyCensus/cusped-hyp-nor-census-9.tdb +0 -0
  10. regina/pyCensus/cusped-hyp-or-census-9.tdb +0 -0
  11. regina/sageRegina/__init__.py +2 -0
  12. regina/sageRegina/config.py +9 -0
  13. regina/sageRegina/test.py +132 -0
  14. regina/sageRegina/testsuite/CMakeLists.txt +60 -0
  15. regina/sageRegina/testsuite/O2_1.rga +15 -0
  16. regina/sageRegina/testsuite/O2_1.tri +28 -0
  17. regina/sageRegina/testsuite/README.txt +20 -0
  18. regina/sageRegina/testsuite/alltypes.out +1551 -0
  19. regina/sageRegina/testsuite/alltypes.test +88 -0
  20. regina/sageRegina/testsuite/angles.out +102 -0
  21. regina/sageRegina/testsuite/angles.test +72 -0
  22. regina/sageRegina/testsuite/basic_callback.out +124 -0
  23. regina/sageRegina/testsuite/basic_sub.out +7 -0
  24. regina/sageRegina/testsuite/bool.out +6 -0
  25. regina/sageRegina/testsuite/bool.test +64 -0
  26. regina/sageRegina/testsuite/bytes.out +17 -0
  27. regina/sageRegina/testsuite/bytes.test +78 -0
  28. regina/sageRegina/testsuite/callbacks.out +515 -0
  29. regina/sageRegina/testsuite/callbacks.test +281 -0
  30. regina/sageRegina/testsuite/census.out +120 -0
  31. regina/sageRegina/testsuite/census.test +157 -0
  32. regina/sageRegina/testsuite/clone.out +18 -0
  33. regina/sageRegina/testsuite/clone.test +101 -0
  34. regina/sageRegina/testsuite/constructors.out +14 -0
  35. regina/sageRegina/testsuite/constructors.test +97 -0
  36. regina/sageRegina/testsuite/cube.orb +87 -0
  37. regina/sageRegina/testsuite/discs.out +3 -0
  38. regina/sageRegina/testsuite/discs.test +40 -0
  39. regina/sageRegina/testsuite/docstrings.filter +19 -0
  40. regina/sageRegina/testsuite/docstrings.out +808 -0
  41. regina/sageRegina/testsuite/docstrings.out.v3 +808 -0
  42. regina/sageRegina/testsuite/docstrings.test +57 -0
  43. regina/sageRegina/testsuite/dodec.orb +309 -0
  44. regina/sageRegina/testsuite/embeddings.out +23 -0
  45. regina/sageRegina/testsuite/embeddings.test +89 -0
  46. regina/sageRegina/testsuite/enumerate.out +62 -0
  47. regina/sageRegina/testsuite/enumerate.test +82 -0
  48. regina/sageRegina/testsuite/equality.out +112 -0
  49. regina/sageRegina/testsuite/equality.test +310 -0
  50. regina/sageRegina/testsuite/euler.out +15 -0
  51. regina/sageRegina/testsuite/euler.test +95 -0
  52. regina/sageRegina/testsuite/exception.out +7 -0
  53. regina/sageRegina/testsuite/exception.test +100 -0
  54. regina/sageRegina/testsuite/facenumbering.out +546 -0
  55. regina/sageRegina/testsuite/facenumbering.test +74 -0
  56. regina/sageRegina/testsuite/faces.out +40 -0
  57. regina/sageRegina/testsuite/faces.test +72 -0
  58. regina/sageRegina/testsuite/file.out +1229 -0
  59. regina/sageRegina/testsuite/file.test +70 -0
  60. regina/sageRegina/testsuite/file1.rga +0 -0
  61. regina/sageRegina/testsuite/file2.rga +0 -0
  62. regina/sageRegina/testsuite/file3.rga +119 -0
  63. regina/sageRegina/testsuite/flype.out +37 -0
  64. regina/sageRegina/testsuite/flype.test +50 -0
  65. regina/sageRegina/testsuite/generic.out +116 -0
  66. regina/sageRegina/testsuite/generic.test +76 -0
  67. regina/sageRegina/testsuite/groups.out +70 -0
  68. regina/sageRegina/testsuite/groups.test +117 -0
  69. regina/sageRegina/testsuite/hypersurfaces.out +681 -0
  70. regina/sageRegina/testsuite/hypersurfaces.test +90 -0
  71. regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
  72. regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
  73. regina/sageRegina/testsuite/i18n.out +6 -0
  74. regina/sageRegina/testsuite/i18n.test +91 -0
  75. regina/sageRegina/testsuite/id.out +2 -0
  76. regina/sageRegina/testsuite/id.test +47 -0
  77. regina/sageRegina/testsuite/index.out +2 -0
  78. regina/sageRegina/testsuite/index.test +43 -0
  79. regina/sageRegina/testsuite/integer.out +74 -0
  80. regina/sageRegina/testsuite/integer.test +56 -0
  81. regina/sageRegina/testsuite/italian.orb +90 -0
  82. regina/sageRegina/testsuite/iterators.out +118 -0
  83. regina/sageRegina/testsuite/iterators.test +128 -0
  84. regina/sageRegina/testsuite/knotted-Y.orb +47 -0
  85. regina/sageRegina/testsuite/listener.out +43 -0
  86. regina/sageRegina/testsuite/listener.test +101 -0
  87. regina/sageRegina/testsuite/listview.out +416 -0
  88. regina/sageRegina/testsuite/listview.test +253 -0
  89. regina/sageRegina/testsuite/lookup.out +13 -0
  90. regina/sageRegina/testsuite/lookup.test +44 -0
  91. regina/sageRegina/testsuite/memory1.out +62 -0
  92. regina/sageRegina/testsuite/memory1.test +154 -0
  93. regina/sageRegina/testsuite/memory2.out +62 -0
  94. regina/sageRegina/testsuite/memory2.test +124 -0
  95. regina/sageRegina/testsuite/memory3.out +92 -0
  96. regina/sageRegina/testsuite/memory3.test +216 -0
  97. regina/sageRegina/testsuite/misc.out +7 -0
  98. regina/sageRegina/testsuite/misc.test +56 -0
  99. regina/sageRegina/testsuite/operators.out +129 -0
  100. regina/sageRegina/testsuite/operators.test +61 -0
  101. regina/sageRegina/testsuite/orb.out +441 -0
  102. regina/sageRegina/testsuite/orb.test +49 -0
  103. regina/sageRegina/testsuite/pdf.out +4 -0
  104. regina/sageRegina/testsuite/pdf.test +49 -0
  105. regina/sageRegina/testsuite/perm.out +55 -0
  106. regina/sageRegina/testsuite/perm.test +96 -0
  107. regina/sageRegina/testsuite/plantri.out +12 -0
  108. regina/sageRegina/testsuite/plantri.test +60 -0
  109. regina/sageRegina/testsuite/presentations.out +11 -0
  110. regina/sageRegina/testsuite/presentations.test +61 -0
  111. regina/sageRegina/testsuite/refs.out +51 -0
  112. regina/sageRegina/testsuite/refs.test +128 -0
  113. regina/sageRegina/testsuite/repr.out +951 -0
  114. regina/sageRegina/testsuite/repr.out.v3 +951 -0
  115. regina/sageRegina/testsuite/repr.test +548 -0
  116. regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
  117. regina/sageRegina/testsuite/safeheldtype_basic.test +113 -0
  118. regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
  119. regina/sageRegina/testsuite/safeheldtype_packet.test +181 -0
  120. regina/sageRegina/testsuite/sample.pdf +0 -0
  121. regina/sageRegina/testsuite/sets.out +7 -0
  122. regina/sageRegina/testsuite/sets.test +44 -0
  123. regina/sageRegina/testsuite/skeleton.out +308 -0
  124. regina/sageRegina/testsuite/skeleton.test +54 -0
  125. regina/sageRegina/testsuite/snappea.out +82 -0
  126. regina/sageRegina/testsuite/snappea.test +107 -0
  127. regina/sageRegina/testsuite/snapshot.out +15 -0
  128. regina/sageRegina/testsuite/snapshot.test +78 -0
  129. regina/sageRegina/testsuite/sort.out +57 -0
  130. regina/sageRegina/testsuite/sort.test +53 -0
  131. regina/sageRegina/testsuite/special.out +4 -0
  132. regina/sageRegina/testsuite/special.test +47 -0
  133. regina/sageRegina/testsuite/standardtri.out +12101 -0
  134. regina/sageRegina/testsuite/standardtri.test +455 -0
  135. regina/sageRegina/testsuite/surfaces.out +2133 -0
  136. regina/sageRegina/testsuite/surfaces.test +114 -0
  137. regina/sageRegina/testsuite/swapping.out +25 -0
  138. regina/sageRegina/testsuite/swapping.test +88 -0
  139. regina/sageRegina/testsuite/testall.in +176 -0
  140. regina/sageRegina/testsuite/testbasic.in +279 -0
  141. regina/sageRegina/testsuite/testcallback.in +150 -0
  142. regina/sageRegina/testsuite/testsub.in +150 -0
  143. regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
  144. regina/sageRegina/testsuite/tightencode.out +40 -0
  145. regina/sageRegina/testsuite/tightencode.test +108 -0
  146. regina/sageRegina/testsuite/treedecomp.out +135 -0
  147. regina/sageRegina/testsuite/treedecomp.test +66 -0
  148. regina/sageRegina/testsuite/treetraversal.out +52 -0
  149. regina/sageRegina/testsuite/treetraversal.test +190 -0
  150. regina/sageRegina/testsuite/trigeneral.out +1251 -0
  151. regina/sageRegina/testsuite/trigeneral.test +155 -0
  152. regina/sageRegina/testsuite/utf8.out +42 -0
  153. regina/sageRegina/testsuite/utf8.test +94 -0
  154. regina/sageRegina/version.py +5 -0
  155. regina/sageSetup.py +41 -0
  156. regina/test.py +6 -0
  157. regina-7.3.1.1.dist-info/METADATA +99 -0
  158. regina-7.3.1.1.dist-info/RECORD +160 -0
  159. regina-7.3.1.1.dist-info/WHEEL +5 -0
  160. regina-7.3.1.1.dist-info/top_level.txt +4 -0
@@ -0,0 +1,548 @@
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 Python repr() output for some of Regina's 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
+ #
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
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
+ # Fetch the python/testsuite path in the source tree, since we will need
35
+ # to access external files.
36
+ import sys
37
+ if (len(sys.argv) > 1):
38
+ testpath = sys.argv[1]
39
+ else:
40
+ testpath = '.'
41
+
42
+ def dump(x):
43
+ if isinstance(x, list):
44
+ if len(x) > 0:
45
+ print('list of ' + x[0].__class__.__name__)
46
+ for i in x:
47
+ print(' ' + str(i))
48
+ else:
49
+ print('empty list')
50
+ else:
51
+ print(x.__class__.__qualname__)
52
+ print(str(x))
53
+ print(repr(x))
54
+ print()
55
+
56
+ # ----------------------------------------------------------------------
57
+ # maths/
58
+ # ----------------------------------------------------------------------
59
+
60
+ dump(Integer(-5))
61
+ dump(LargeInteger(9))
62
+ dump(LargeInteger.infinity)
63
+ dump(Rational(3,8))
64
+ dump(Perm2(0,1))
65
+ dump(Perm3(1,2))
66
+ dump(Perm4(1,3))
67
+ dump(Perm5(2,3))
68
+ dump(Perm6(2,3))
69
+ dump(Perm7(2,3))
70
+ dump(Perm8(2,3))
71
+ dump(Perm15(2,3))
72
+ dump(VectorInt([1,0,-2]))
73
+ dump(VectorLarge([1,0,LargeInteger.infinity,-2]))
74
+
75
+ m = Matrix2(1,2,3,4)
76
+ dump(m)
77
+ dump(m[1])
78
+
79
+ dump(MatrixBool([[True, False], [False, True]]))
80
+ dump(makeMatchingEquations(Example3.figureEight(), NS_QUAD))
81
+
82
+ t = Example3.poincare()
83
+ dump(t.turaevViro(5))
84
+ dump(t.turaevViro(5).polynomial())
85
+
86
+ l = ExampleLink.figureEight()
87
+ dump(l.jones())
88
+ dump(l.homfly())
89
+
90
+ # ----------------------------------------------------------------------
91
+ # Flags and other enumerate/flag-like types
92
+ # ----------------------------------------------------------------------
93
+
94
+ dump(HS_VERTEX)
95
+ dump(HS_VERTEX_DD)
96
+ dump(NS_VERTEX)
97
+ dump(NS_VERTEX_DD)
98
+ dump(AS_ALG_DD)
99
+ dump(PURGE_NON_MINIMAL)
100
+ dump(surfaceExportName)
101
+
102
+ dump(HyperList(HS_VERTEX))
103
+ dump(HyperAlg(HS_VERTEX_DD))
104
+ dump(NormalList(NS_VERTEX))
105
+ dump(NormalAlg(NS_VERTEX_DD))
106
+ dump(AngleAlg(AS_ALG_DD))
107
+ dump(PURGE_NON_MINIMAL | PURGE_NON_PRIME)
108
+ dump(surfaceExportName | surfaceExportEuler)
109
+
110
+ dump(NormalEncoding(NS_QUAD))
111
+ dump(HyperEncoding(HS_STANDARD))
112
+ dump(LPSystem(NS_QUAD))
113
+
114
+ # ----------------------------------------------------------------------
115
+ # algebra/
116
+ # ----------------------------------------------------------------------
117
+
118
+ dump(Example3.weberSeifert().homology())
119
+ dump(Example3.weberSeifert().markedHomology())
120
+ dump(Example3.weberSeifert().markedHomology().torsionInclusion())
121
+
122
+ g = Example3.poincare().fundamentalGroup()
123
+ dump(g)
124
+ dump(g.relation(0))
125
+ dump(g.relation(0).term(2))
126
+
127
+ g = GroupPresentation(3, ['aC', 'aBCb'])
128
+ dump(g)
129
+ dump(g.intelligentSimplify())
130
+ dump(g)
131
+
132
+ # ----------------------------------------------------------------------
133
+ # utilities/
134
+ # ----------------------------------------------------------------------
135
+
136
+ b = Bitmask(5)
137
+ b.set(3, True)
138
+ dump(b)
139
+
140
+ b = Bitmask8()
141
+ b.set(3, True)
142
+ dump(b)
143
+
144
+ q = Qitmask8()
145
+ q.set(3, 2)
146
+ dump(q)
147
+
148
+ dump(BoolSet(True))
149
+ dump(TrieSet())
150
+
151
+ # ----------------------------------------------------------------------
152
+ # surface/, hypersurface/ and angle/
153
+ # ----------------------------------------------------------------------
154
+
155
+ dump(DiscType(7,3))
156
+ dump(DiscSpec(1,3,2))
157
+ dump(PrismSpec(5,1))
158
+
159
+ s = NormalSurfaces(Example3.s2xs1(), NS_QUAD)
160
+ dump(s)
161
+ dump(s.surface(0))
162
+ s = NormalHypersurfaces(Example4.s3xs1(), HS_PRISM)
163
+ dump(s)
164
+ dump(s.hypersurface(0))
165
+ s = AngleStructures(Example3.figureEight())
166
+ dump(s)
167
+ dump(s.structure(0))
168
+
169
+ dump(SurfaceFilterCombination())
170
+ f = SurfaceFilterProperties(); f.setEulerChars([0,1]); f.setOrientability(True)
171
+ dump(f)
172
+
173
+ t = Example3.poincare()
174
+ st = NormalSurfaces(t, NS_QUAD)
175
+ dt = DiscSetSurface(st.surface(0))
176
+ dump(dt)
177
+ dump(dt.tetDiscs(0))
178
+
179
+ # ----------------------------------------------------------------------
180
+ # link/
181
+ # ----------------------------------------------------------------------
182
+
183
+ g = ModelLinkGraph.fromPlantri('bcdd,aeec,abfd,acfa,bffb,ceed')
184
+ dump(g)
185
+ dump(g.node(0))
186
+ dump(g.node(0).arc(2))
187
+ dump(g.cells())
188
+
189
+ dump(Link())
190
+ dump(Link(1))
191
+ dump(ExampleLink.whitehead())
192
+ dump(PacketOfLink(ExampleLink.whitehead()))
193
+
194
+ l = Link(1)
195
+ dump(l.component(0))
196
+ l = ExampleLink.figureEight()
197
+ dump(l.component(0))
198
+ dump(l.crossing(0))
199
+
200
+ l = Tangle(3,2)
201
+ dump(l)
202
+ dump(l.crossing(0))
203
+
204
+ # ----------------------------------------------------------------------
205
+ # snappea/
206
+ # ----------------------------------------------------------------------
207
+
208
+ s = ExampleSnapPea.whiteheadLink()
209
+ dump(s)
210
+ s.fill(5,-2,0)
211
+ dump(s)
212
+ dump(PacketOfSnapPeaTriangulation(s))
213
+ dump(s.cusp(0))
214
+ dump(s.cusp(1))
215
+
216
+ # ----------------------------------------------------------------------
217
+ # triangulation/
218
+ # ----------------------------------------------------------------------
219
+
220
+ dump(FacetSpec3(6,2))
221
+ dump(FacePair(1,3))
222
+ dump(FacetPairing3(Example3.figureEight()))
223
+ dump(FacetPairing4(Example4.s3xs1()))
224
+
225
+ dump(Example2.mobius())
226
+ dump(Example3.poincare())
227
+ dump(PacketOfTriangulation3(Example3.poincare()))
228
+ dump(Example4.cappellShaneson())
229
+ dump(Example5.sphere())
230
+
231
+ t = Example2.annulus()
232
+ dump(t.vertex(0))
233
+ dump(t.vertex(0).front())
234
+ dump(t.edge(0))
235
+ dump(t.edge(0).front())
236
+ dump(t.triangle(0))
237
+ dump(t.component(0))
238
+ dump(t.boundaryComponent(0))
239
+
240
+ t = Example3.poincare()
241
+ dump(t.vertex(0))
242
+ dump(t.vertex(0).front())
243
+ dump(t.edge(0))
244
+ dump(t.edge(0).front())
245
+ dump(t.triangle(0))
246
+ dump(t.triangle(0).front())
247
+ dump(t.tetrahedron(0))
248
+ dump(t.component(0))
249
+
250
+ t = Example4.cappellShaneson()
251
+ dump(t.vertex(0))
252
+ dump(t.vertex(0).front())
253
+ dump(t.edge(0))
254
+ dump(t.edge(0).front())
255
+ dump(t.edges())
256
+ dump(t.triangle(0))
257
+ dump(t.triangle(0).front())
258
+ dump(t.tetrahedron(0))
259
+ dump(t.tetrahedron(0).front())
260
+ dump(t.pentachoron(0))
261
+ dump(t.component(0))
262
+ dump(t.boundaryComponent(0))
263
+
264
+ t = Example5.sphere()
265
+ dump(t.vertex(0))
266
+ dump(t.vertex(0).front())
267
+ dump(t.edge(0))
268
+ dump(t.edge(0).front())
269
+ dump(t.triangle(0))
270
+ dump(t.triangle(0).front())
271
+ dump(t.tetrahedron(0))
272
+ dump(t.tetrahedron(0).front())
273
+ dump(t.pentachoron(0))
274
+ dump(t.pentachoron(0).front())
275
+ dump(t.simplex(0))
276
+ dump(t.component(0))
277
+ t.insertTriangulation(Example5.ballBundle())
278
+ dump(t.component(1))
279
+ dump(t.boundaryComponent(0))
280
+
281
+ i = Isomorphism3(2)
282
+ i.setSimpImage(0, 1)
283
+ i.setSimpImage(1, 0)
284
+ i.setFacetPerm(0, Perm4(1,2,3,0))
285
+ i.setFacetPerm(1, Perm4(0,2))
286
+ dump(i)
287
+
288
+ h = HomologicalData(Example3.lst(3,4))
289
+ dump(h)
290
+ dump(h.bdryHomologyMap(1))
291
+ dump(h)
292
+
293
+ # ----------------------------------------------------------------------
294
+ # manifold/
295
+ # ----------------------------------------------------------------------
296
+
297
+ dump(SFSFibre(5,-2))
298
+
299
+ sfsDisc = SFSpace(SFSpace.o2, 0, 1)
300
+ sfsDisc.insertFibre(3,1)
301
+ sfsDisc.insertFibre(4,-3)
302
+ sfsAnnulus = SFSpace(SFSpace.o2, 0, 2)
303
+ sfsAnnulus.insertFibre(2,1)
304
+ sfsAnnulus.insertFibre(5,7)
305
+
306
+ dump(LensSpace(7,2))
307
+ dump(sfsDisc)
308
+ dump(SimpleSurfaceBundle(SimpleSurfaceBundle.RP2xS1))
309
+ dump(SnapPeaCensusManifold('x', 101))
310
+ dump(Handlebody(2))
311
+ dump(TorusBundle(0,1,1,0))
312
+ dump(GraphLoop(sfsAnnulus, Matrix2(0,1,-1,2)))
313
+ dump(GraphPair(sfsDisc, sfsDisc, Matrix2(0,1,-1,2)))
314
+ dump(GraphTriple(sfsDisc, sfsAnnulus, sfsDisc, Matrix2(0,1,-1,2), Matrix2(-1,2,-3,5)))
315
+
316
+ dump(SFSAlt.altSet(sfsDisc));
317
+ dump(SFSAlt.altSet(sfsAnnulus));
318
+
319
+ # ----------------------------------------------------------------------
320
+ # subcomplex/
321
+ # ----------------------------------------------------------------------
322
+
323
+ dump(StandardTriangulation.recognise(Example3.figureEight()))
324
+
325
+ dump(TxIDiagonalCore(6,1))
326
+ dump(TxIParallelCore())
327
+
328
+ t = Triangulation3()
329
+ (a,b) = t.newSimplices(2)
330
+ a.join(0, a, Perm4(0,1))
331
+ b.join(0, b, Perm4(0,1))
332
+ a.join(2, b, Perm4(2,3))
333
+ a.join(3, b, Perm4(2,3))
334
+ dump(SnappedBall.recognise(b))
335
+ dump(SnappedTwoSphere.recognise(a, b))
336
+
337
+ t = Triangulation3()
338
+ (a,b,c,d) = t.newSimplices(4)
339
+ for i in [1,2,3]:
340
+ c.join(i, d, Perm4())
341
+ a.join(i, b, Perm4())
342
+ a.join(0, c, Perm4())
343
+ b.join(0, d, Perm4())
344
+ dump(PillowTwoSphere.recognise(a.triangle(0), b.triangle(0)))
345
+
346
+ dump(SatCube.model())
347
+
348
+ t = Example3.sfsOverSphere(3,4,5,1,2,-1)
349
+ s = BlockedSFS.recognise(t)
350
+ dump(s)
351
+ dump(s.region())
352
+ dump(s.region().block(0))
353
+ dump(s.region().block(0).block())
354
+ dump(s.region().block(0).block().annulus(0))
355
+
356
+ dump(BlockedSFSLoop.recognise(Triangulation3('kLLLLPQkcddfjgihjijpkrkaspoadj')))
357
+ dump(BlockedSFSPair.recognise(Triangulation3('hLAvQkbccefggglpksulwb')))
358
+ dump(BlockedSFSTriple.recognise(Triangulation3('kLALALMkbccfefihijjlpkusuueotr')))
359
+ dump(PluggedTorusBundle.recognise(Triangulation3('kLLvAPQkbdfehgjiijjdwuurwmmaxn')))
360
+ dump(TrivialTri.recognise(Triangulation3('cPcbbbaai').component(0)))
361
+ dump(LayeredLoop.recognise(Triangulation3('cPcbbbqxh').component(0)))
362
+ dump(LayeredTorusBundle.recognise(Triangulation3('hvLPQkcedgffggnnkaaeiw')))
363
+ dump(PlugTriSolidTorus.recognise(Example3.poincare().component(0)))
364
+ dump(TrivialTri.recognise(Example3.rp2xs1().component(0)))
365
+
366
+ t = Example3.sfsOverSphere(3,4,5,1,2,-1)
367
+ a = AugTriSolidTorus.recognise(t.component(0))
368
+ dump(a)
369
+ dump(a.core())
370
+
371
+ l = Example3.lens(8,3)
372
+ dump(LayeredLensSpace.recognise(l.component(0)))
373
+ dump(LayeredSolidTorus.recogniseFromBase(l.tetrahedron(0)))
374
+ dump(LayeredSolidTorus.recogniseFromBase(l.tetrahedron(l.size()-1)))
375
+
376
+ y = Layering(l.tetrahedron(0), Perm4(2,3,0,1), l.tetrahedron(0), Perm4(3,2,1,0))
377
+ dump(y)
378
+ y.extend()
379
+ dump(y)
380
+
381
+ t = Triangulation3('kLLLMAMkcegfhhhijjjhqhaqjshhrw')
382
+ l = LayeredChainPair.recognise(t.component(0))
383
+ dump(l)
384
+ dump(l.chain(0))
385
+ dump(SpiralSolidTorus.recognise(l.chain(0).top(), l.chain(0).topVertexRoles()))
386
+
387
+ # ----------------------------------------------------------------------
388
+ # census/
389
+ # ----------------------------------------------------------------------
390
+
391
+ h = Census.lookup('cPcbbbiht')[0]
392
+ dump(h)
393
+ # Do not dump the CensusDB object, since the output is filesystem-dependent.
394
+ # dump(h.db())
395
+
396
+ p = FacetPairing2(Example2.annulus())
397
+ isos = p.findAutomorphisms()
398
+ dump(GluingPermSearcher2(p, isos, True))
399
+
400
+ p = FacetPairing3(Example3.sfsOverSphere(3,4,5,1,2,-1))
401
+ isos = p.findAutomorphisms()
402
+ dump(GluingPermSearcher3(p, isos, True, False, PURGE_NON_MINIMAL))
403
+ dump(CompactSearcher(p, isos, True, PURGE_NON_MINIMAL))
404
+ dump(HyperbolicMinSearcher(p, isos, True))
405
+ dump(EulerSearcher(-2, p, isos, False, PURGE_NONE))
406
+ dump(ClosedPrimeMinSearcher(p, isos, True))
407
+
408
+ p = FacetPairing4(Example4.s3xs1())
409
+ isos = p.findAutomorphisms()
410
+ dump(GluingPermSearcher4(p, isos, False, True))
411
+
412
+ # ----------------------------------------------------------------------
413
+ # enumerate/
414
+ # ----------------------------------------------------------------------
415
+
416
+ dump(TypeTrie4())
417
+ dump(TypeTrie7())
418
+
419
+ t = Example3.figureEight()
420
+ tab = LPInitialTableaux_NonSpun(t, NS_QUAD)
421
+ dump(tab)
422
+ m = LPMatrix(tab.rank(), tab.columns())
423
+ tab.fillInitialTableaux(m)
424
+ dump(m)
425
+ dat = LPData_NonSpun()
426
+ dump(dat)
427
+ dat.reserve(tab)
428
+ dat.initStart()
429
+ dump(dat)
430
+
431
+ dump(makeEmbeddedConstraints(t, NS_STANDARD));
432
+ dump(makeEmbeddedConstraints(t, NS_AN_QUAD_OCT));
433
+
434
+ t = Example3.lst(3,4)
435
+ tab = LPInitialTableaux(t, NS_STANDARD)
436
+ dump(BanNone(tab))
437
+ dump(BanBoundary(tab))
438
+ dump(BanTorusBoundary(tab))
439
+
440
+ dump(PosOrder(MatrixInt.identity(3)))
441
+
442
+ # ----------------------------------------------------------------------
443
+ # treewidth/
444
+ # ----------------------------------------------------------------------
445
+
446
+ t = TreeDecomposition(ExampleLink.conway())
447
+ dump(t)
448
+ dump(t.bag(0))
449
+
450
+ # ----------------------------------------------------------------------
451
+ # split/
452
+ # ----------------------------------------------------------------------
453
+
454
+ dump(Signature('abbc.ac'))
455
+
456
+ # ----------------------------------------------------------------------
457
+ # file/
458
+ # ----------------------------------------------------------------------
459
+
460
+ dump(FileInfo.identify(testpath + '/file3.rga'))
461
+ dump(FileInfo.identify(testpath + '/pdf.test'))
462
+
463
+ # ----------------------------------------------------------------------
464
+ # progress/
465
+ # ----------------------------------------------------------------------
466
+
467
+ p = ProgressTrackerOpen()
468
+ dump(p)
469
+ p.newStage('Doing stuff')
470
+ p.incSteps(3)
471
+ dump(p)
472
+ p.setFinished()
473
+ dump(p)
474
+
475
+ p = ProgressTracker()
476
+ dump(p)
477
+ p.newStage('Doing stuff', 1)
478
+ p.setPercent(5.87)
479
+ dump(p)
480
+ p.setPercent(75.87)
481
+ dump(p)
482
+ p.cancel()
483
+ dump(p)
484
+
485
+ # ----------------------------------------------------------------------
486
+ # packet/
487
+ # ----------------------------------------------------------------------
488
+
489
+ c = Container()
490
+ t = Text('Hello world!')
491
+ t.setLabel('Welcome')
492
+ c.append(t)
493
+ a = Attachment(b'foo', 'test.txt')
494
+ t.append(a)
495
+ s = Script()
496
+ s.setText('print("Hello world!")\nprint(0)')
497
+ s.addVariable('text', t)
498
+ s.addVariable('dummy', None)
499
+ t.append(s)
500
+ dump(c)
501
+ dump(t)
502
+ dump(a)
503
+ dump(s)
504
+
505
+ # Do not dump PacketShell objects, since they write internal IDs which
506
+ # are not consistent between runs.
507
+ #
508
+ # dump(PacketShell(s))
509
+ # dump(PacketShell(t))
510
+
511
+ # ----------------------------------------------------------------------
512
+ # Classes that require us to use callbacks for non-trivial access:
513
+ # ----------------------------------------------------------------------
514
+
515
+ def foundGluings2(g):
516
+ dump(g)
517
+
518
+ def foundPairing2(p, isos):
519
+ GluingPermSearcher2.findAllPerms(p, isos, True, foundGluings2)
520
+
521
+ FacetPairing2.findAllPairings(2, False, 0, foundPairing2)
522
+
523
+ def processSig(s, autos):
524
+ print(s)
525
+ dump(autos[-1])
526
+
527
+ SigCensus.formCensus(2, processSig)
528
+
529
+ t = Example3.rp3rp3()
530
+ tree = TreeSingleSoln_EulerPositive(t, NS_STANDARD)
531
+ dump(tree)
532
+ tree.find()
533
+ dump(tree)
534
+
535
+ t = Example3.figureEight()
536
+ tree = TautEnumeration(t)
537
+ tree.run(dump)
538
+
539
+ t = Example3.figureEight()
540
+ tree = TreeEnumeration(t, NS_QUAD)
541
+ tree.run(dump)
542
+
543
+ t = Example3.trefoil()
544
+ tree = TreeEnumeration_NonSpun(t, NS_QUAD)
545
+ tree.run(dump)
546
+
547
+ dump(Perm8.Sn)
548
+
@@ -0,0 +1,17 @@
1
+ Constructor:
2
+ Empty container
3
+ Deleting parent:
4
+ Empty container
5
+ Deleting matriarch:
6
+ Container with 1 child, 1 descendant
7
+ Empty container
8
+ Multiple references:
9
+ Container with 1 child, 2 descendants
10
+ Container with 1 child, 1 descendant
11
+ Empty container
12
+ Container with 1 child, 2 descendants
13
+ Empty container
14
+ Empty container
15
+ Empty container
16
+ Empty container
17
+ Empty container
@@ -0,0 +1,113 @@
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
+ # Provides basic tests of the shared_ptr holder types
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
+ # NOTE: Since Regina 5.96, python references to packets never expire.
35
+ # Therefore we should never raise any exceptions in this test.
36
+
37
+ print("Constructor:")
38
+
39
+ print(Container())
40
+
41
+ print("Deleting parent:")
42
+
43
+ c = Container()
44
+ c1 = Container()
45
+
46
+ c.prepend(c1)
47
+
48
+ c = None
49
+
50
+ try:
51
+ print(c1)
52
+ except RuntimeError:
53
+ print("Got exception")
54
+
55
+ print("Deleting matriarch:")
56
+
57
+ c = Container()
58
+ c.prepend(Container())
59
+ c.firstChild().prepend(Container())
60
+
61
+ c1 = c.firstChild()
62
+ c2 = c.firstChild().firstChild()
63
+
64
+ c = None
65
+
66
+ try:
67
+ print(c1)
68
+ except RuntimeError:
69
+ print("Got exception")
70
+
71
+ try:
72
+ print(c2)
73
+ except RuntimeError:
74
+ print("Got exception")
75
+
76
+ print("Multiple references:")
77
+
78
+ c = Container()
79
+ c1 = Container()
80
+ c2 = Container()
81
+
82
+ c.prepend(c1)
83
+ c1.prepend(c2)
84
+
85
+ print(c)
86
+ print(c1)
87
+ print(c2)
88
+
89
+ c1 = None
90
+
91
+ print(c)
92
+ print(c2)
93
+
94
+ d = c2.root()
95
+
96
+ c = None
97
+
98
+ print(c2)
99
+
100
+ e = c2.root()
101
+
102
+ print(c2)
103
+
104
+ e = None
105
+
106
+ print(c2)
107
+
108
+ d = None
109
+
110
+ try:
111
+ print(c2)
112
+ except RuntimeError:
113
+ print("Got exception")