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,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")
|