regina 7.4.1__cp314-cp314-macosx_10_13_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- regina/.dylibs/libgmp.10.dylib +0 -0
- regina/.dylibs/libgmpxx.4.dylib +0 -0
- regina/__init__.py +192 -0
- regina/engine.cpython-314-darwin.so +0 -0
- regina/plainCompleter.py +221 -0
- regina/pyCensus/__init__.py +14 -0
- regina/pyCensus/christy-knots-links.tdb +0 -0
- regina/pyCensus/closed-hyp-census-full.tdb +0 -0
- regina/pyCensus/closed-nor-census-11.tdb +0 -0
- regina/pyCensus/closed-or-census-11.tdb +0 -0
- regina/pyCensus/cusped-hyp-nor-census-9.tdb +0 -0
- regina/pyCensus/cusped-hyp-or-census-9.tdb +0 -0
- regina/sageRegina/__init__.py +2 -0
- regina/sageRegina/config.py +9 -0
- regina/sageRegina/test.py +131 -0
- regina/sageRegina/testsuite/CMakeLists.txt +64 -0
- regina/sageRegina/testsuite/O2_1.rga +15 -0
- regina/sageRegina/testsuite/O2_1.tri +28 -0
- regina/sageRegina/testsuite/README.txt +21 -0
- regina/sageRegina/testsuite/alltypes-exc.out +698 -0
- regina/sageRegina/testsuite/alltypes-exc.test +92 -0
- regina/sageRegina/testsuite/alltypes-noexc.out +698 -0
- regina/sageRegina/testsuite/alltypes-noexc.test +85 -0
- regina/sageRegina/testsuite/alltypes.out +698 -0
- regina/sageRegina/testsuite/alltypes.test +85 -0
- regina/sageRegina/testsuite/angles.out +102 -0
- regina/sageRegina/testsuite/angles.test +70 -0
- regina/sageRegina/testsuite/arrow.out +86 -0
- regina/sageRegina/testsuite/arrow.test +224 -0
- regina/sageRegina/testsuite/base64.out +2 -0
- regina/sageRegina/testsuite/base64.test +37 -0
- regina/sageRegina/testsuite/basic_callback.out +124 -0
- regina/sageRegina/testsuite/basic_sub.out +7 -0
- regina/sageRegina/testsuite/binom.out +14 -0
- regina/sageRegina/testsuite/binom.test +69 -0
- regina/sageRegina/testsuite/bool.out +6 -0
- regina/sageRegina/testsuite/bool.test +62 -0
- regina/sageRegina/testsuite/bytes.out +17 -0
- regina/sageRegina/testsuite/bytes.test +76 -0
- regina/sageRegina/testsuite/callbacks.out +515 -0
- regina/sageRegina/testsuite/callbacks.test +279 -0
- regina/sageRegina/testsuite/census.out +120 -0
- regina/sageRegina/testsuite/census.test +156 -0
- regina/sageRegina/testsuite/clone.out +18 -0
- regina/sageRegina/testsuite/clone.test +99 -0
- regina/sageRegina/testsuite/comparison.out +41 -0
- regina/sageRegina/testsuite/comparison.test +47 -0
- regina/sageRegina/testsuite/construction.out +120 -0
- regina/sageRegina/testsuite/construction.test +63 -0
- regina/sageRegina/testsuite/constructors.out +14 -0
- regina/sageRegina/testsuite/constructors.test +95 -0
- regina/sageRegina/testsuite/cube.orb +87 -0
- regina/sageRegina/testsuite/discs.out +3 -0
- regina/sageRegina/testsuite/discs.test +38 -0
- regina/sageRegina/testsuite/docstrings.filter +22 -0
- regina/sageRegina/testsuite/docstrings.out +802 -0
- regina/sageRegina/testsuite/docstrings.out.v2 +799 -0
- regina/sageRegina/testsuite/docstrings.test +55 -0
- regina/sageRegina/testsuite/dodec.orb +309 -0
- regina/sageRegina/testsuite/embeddings.out +23 -0
- regina/sageRegina/testsuite/embeddings.test +87 -0
- regina/sageRegina/testsuite/enumerate.out +62 -0
- regina/sageRegina/testsuite/enumerate.test +80 -0
- regina/sageRegina/testsuite/equality.out +112 -0
- regina/sageRegina/testsuite/equality.test +308 -0
- regina/sageRegina/testsuite/euler.out +15 -0
- regina/sageRegina/testsuite/euler.test +93 -0
- regina/sageRegina/testsuite/exception.out +7 -0
- regina/sageRegina/testsuite/exception.test +98 -0
- regina/sageRegina/testsuite/facenumbering.out +546 -0
- regina/sageRegina/testsuite/facenumbering.test +72 -0
- regina/sageRegina/testsuite/faces.out +40 -0
- regina/sageRegina/testsuite/faces.test +70 -0
- regina/sageRegina/testsuite/file.out +1229 -0
- regina/sageRegina/testsuite/file.test +68 -0
- regina/sageRegina/testsuite/file1.rga +0 -0
- regina/sageRegina/testsuite/file2.rga +0 -0
- regina/sageRegina/testsuite/file3.rga +119 -0
- regina/sageRegina/testsuite/flags.out +38 -0
- regina/sageRegina/testsuite/flags.out.v2 +38 -0
- regina/sageRegina/testsuite/flags.test +81 -0
- regina/sageRegina/testsuite/flype.out +37 -0
- regina/sageRegina/testsuite/flype.test +48 -0
- regina/sageRegina/testsuite/generic.out +116 -0
- regina/sageRegina/testsuite/generic.test +74 -0
- regina/sageRegina/testsuite/groups.out +70 -0
- regina/sageRegina/testsuite/groups.test +115 -0
- regina/sageRegina/testsuite/hash.out +66 -0
- regina/sageRegina/testsuite/hash.test +84 -0
- regina/sageRegina/testsuite/hypersurfaces.out +681 -0
- regina/sageRegina/testsuite/hypersurfaces.test +89 -0
- regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
- regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
- regina/sageRegina/testsuite/i18n.out +6 -0
- regina/sageRegina/testsuite/i18n.test +89 -0
- regina/sageRegina/testsuite/id.out +2 -0
- regina/sageRegina/testsuite/id.test +45 -0
- regina/sageRegina/testsuite/index.out +2 -0
- regina/sageRegina/testsuite/index.test +41 -0
- regina/sageRegina/testsuite/integer.out +74 -0
- regina/sageRegina/testsuite/integer.test +54 -0
- regina/sageRegina/testsuite/italian.orb +90 -0
- regina/sageRegina/testsuite/iterators.out +118 -0
- regina/sageRegina/testsuite/iterators.test +126 -0
- regina/sageRegina/testsuite/knotted-Y.orb +47 -0
- regina/sageRegina/testsuite/listener.out +43 -0
- regina/sageRegina/testsuite/listener.test +99 -0
- regina/sageRegina/testsuite/listview.out +416 -0
- regina/sageRegina/testsuite/listview.test +251 -0
- regina/sageRegina/testsuite/lookup.out +13 -0
- regina/sageRegina/testsuite/lookup.test +42 -0
- regina/sageRegina/testsuite/lst.out +844 -0
- regina/sageRegina/testsuite/lst.test +195 -0
- regina/sageRegina/testsuite/memory1.out +62 -0
- regina/sageRegina/testsuite/memory1.test +152 -0
- regina/sageRegina/testsuite/memory2.out +62 -0
- regina/sageRegina/testsuite/memory2.test +122 -0
- regina/sageRegina/testsuite/memory3.out +92 -0
- regina/sageRegina/testsuite/memory3.test +214 -0
- regina/sageRegina/testsuite/misc.out +7 -0
- regina/sageRegina/testsuite/misc.test +54 -0
- regina/sageRegina/testsuite/operators.out +129 -0
- regina/sageRegina/testsuite/operators.test +59 -0
- regina/sageRegina/testsuite/orb.out +441 -0
- regina/sageRegina/testsuite/orb.test +47 -0
- regina/sageRegina/testsuite/pdf.out +4 -0
- regina/sageRegina/testsuite/pdf.test +47 -0
- regina/sageRegina/testsuite/perm.out +36 -0
- regina/sageRegina/testsuite/perm.test +74 -0
- regina/sageRegina/testsuite/plantri.out +12 -0
- regina/sageRegina/testsuite/plantri.test +58 -0
- regina/sageRegina/testsuite/poincare.tri +55 -0
- regina/sageRegina/testsuite/presentations.out +11 -0
- regina/sageRegina/testsuite/presentations.test +59 -0
- regina/sageRegina/testsuite/refs.out +51 -0
- regina/sageRegina/testsuite/refs.test +126 -0
- regina/sageRegina/testsuite/repr.out +951 -0
- regina/sageRegina/testsuite/repr.out.v2 +951 -0
- regina/sageRegina/testsuite/repr.test +546 -0
- regina/sageRegina/testsuite/runbasic.in +75 -0
- regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
- regina/sageRegina/testsuite/safeheldtype_basic.test +111 -0
- regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
- regina/sageRegina/testsuite/safeheldtype_packet.test +179 -0
- regina/sageRegina/testsuite/sample.pdf +0 -0
- regina/sageRegina/testsuite/sets.out +7 -0
- regina/sageRegina/testsuite/sets.test +42 -0
- regina/sageRegina/testsuite/skeleton.out +308 -0
- regina/sageRegina/testsuite/skeleton.test +52 -0
- regina/sageRegina/testsuite/snappea.out +90 -0
- regina/sageRegina/testsuite/snappea.test +133 -0
- regina/sageRegina/testsuite/snapshot.out +15 -0
- regina/sageRegina/testsuite/snapshot.test +76 -0
- regina/sageRegina/testsuite/sort.out +78 -0
- regina/sageRegina/testsuite/sort.test +58 -0
- regina/sageRegina/testsuite/special.out +4 -0
- regina/sageRegina/testsuite/special.test +45 -0
- regina/sageRegina/testsuite/standardtri.out +12101 -0
- regina/sageRegina/testsuite/standardtri.test +453 -0
- regina/sageRegina/testsuite/surfaces.out +2133 -0
- regina/sageRegina/testsuite/surfaces.test +112 -0
- regina/sageRegina/testsuite/swapping.out +25 -0
- regina/sageRegina/testsuite/swapping.test +86 -0
- regina/sageRegina/testsuite/testall.in +174 -0
- regina/sageRegina/testsuite/testbasic.in +277 -0
- regina/sageRegina/testsuite/testcallback.in +148 -0
- regina/sageRegina/testsuite/testsub.in +148 -0
- regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
- regina/sageRegina/testsuite/tightencode.out +40 -0
- regina/sageRegina/testsuite/tightencode.test +106 -0
- regina/sageRegina/testsuite/treedecomp.out +135 -0
- regina/sageRegina/testsuite/treedecomp.test +64 -0
- regina/sageRegina/testsuite/treetraversal.out +52 -0
- regina/sageRegina/testsuite/treetraversal.test +188 -0
- regina/sageRegina/testsuite/trigeneral.out +1251 -0
- regina/sageRegina/testsuite/trigeneral.test +153 -0
- regina/sageRegina/testsuite/utf8.out +42 -0
- regina/sageRegina/testsuite/utf8.test +92 -0
- regina/sageRegina/testsuite/whitehead.tri +47 -0
- regina/sageRegina/version.py +5 -0
- regina/sageSetup.py +41 -0
- regina/test.py +6 -0
- regina-7.4.1.dist-info/METADATA +109 -0
- regina-7.4.1.dist-info/RECORD +186 -0
- regina-7.4.1.dist-info/WHEEL +6 -0
- regina-7.4.1.dist-info/top_level.txt +4 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
EqualityType.BY_VALUE
|
|
2
|
+
EqualityType.BY_REFERENCE
|
|
3
|
+
EqualityType.BY_VALUE
|
|
4
|
+
EqualityType.NEVER_INSTANTIATED
|
|
5
|
+
EqualityType.DISABLED
|
|
6
|
+
EqualityType.DISABLED
|
|
7
|
+
|
|
8
|
+
Integer : ==, not !=
|
|
9
|
+
Integer : not ==, !=
|
|
10
|
+
AbelianGroup : ==, not !=
|
|
11
|
+
AbelianGroup : not ==, !=
|
|
12
|
+
GroupPresentation : ==, not !=
|
|
13
|
+
GroupPresentation : not ==, !=
|
|
14
|
+
Link : ==, not !=
|
|
15
|
+
Link : not ==, !=
|
|
16
|
+
Link : ==, not !=
|
|
17
|
+
Link : not ==, !=
|
|
18
|
+
Link + Packet : ==, not !=, throws on samePacket()
|
|
19
|
+
Link + Packet : ==, not !=, throws on samePacket()
|
|
20
|
+
PacketOfLink : ==, not !=, different packets
|
|
21
|
+
PacketOfLink : ==, not !=, same packet
|
|
22
|
+
Tangle : ==, not !=
|
|
23
|
+
Tangle : not ==, !=
|
|
24
|
+
Tangle : not ==, !=
|
|
25
|
+
ModelLinkGraph : ==, not !=
|
|
26
|
+
ModelLinkGraph : not ==, !=
|
|
27
|
+
ModelLinkGraphCells : ==, not !=
|
|
28
|
+
ModelLinkGraphCells : not ==, !=
|
|
29
|
+
Triangulation3 : ==, not !=
|
|
30
|
+
Triangulation3 : not ==, !=
|
|
31
|
+
Triangulation3 + Packet : ==, not !=, throws on samePacket()
|
|
32
|
+
Triangulation3 + Packet : ==, not !=, throws on samePacket()
|
|
33
|
+
PacketOfTriangulation3 : ==, not !=, different packets
|
|
34
|
+
PacketOfTriangulation3 : ==, not !=, same packet
|
|
35
|
+
SnapPeaTriangulation : ==, not !=
|
|
36
|
+
SnapPeaTriangulation : not ==, !=
|
|
37
|
+
SnapPeaTriangulation : not ==, !=
|
|
38
|
+
SnapPeaTriangulation : not ==, !=
|
|
39
|
+
FacetPairing2 : ==, not !=
|
|
40
|
+
FacetPairing2 : not ==, !=
|
|
41
|
+
Attachment : ==, not !=, different packets
|
|
42
|
+
Attachment : not ==, !=, different packets
|
|
43
|
+
Attachment : not ==, !=, different packets
|
|
44
|
+
Attachment : not ==, !=, different packets
|
|
45
|
+
Text : ==, not !=, different packets
|
|
46
|
+
Text : not ==, !=, different packets
|
|
47
|
+
Script : not ==, !=
|
|
48
|
+
Script : ==, not !=
|
|
49
|
+
Script : ==, not !=
|
|
50
|
+
GluingPerms2 : ==, not !=
|
|
51
|
+
GluingPerms2 : not ==, !=
|
|
52
|
+
GluingPerms2 : not ==, !=
|
|
53
|
+
NormalSurfaces : not ==, !=
|
|
54
|
+
NormalSurfaces : ==, not !=
|
|
55
|
+
NormalSurfaces : ==, not !=
|
|
56
|
+
NormalHypersurfaces : not ==, !=
|
|
57
|
+
NormalHypersurfaces : ==, not !=
|
|
58
|
+
NormalHypersurfaces : ==, not !=
|
|
59
|
+
AngleStructures : not ==, !=
|
|
60
|
+
AngleStructures : ==, not !=
|
|
61
|
+
TypeTrie : ==, not !=
|
|
62
|
+
TypeTrie : not ==, !=
|
|
63
|
+
TypeTrie : not ==, !=
|
|
64
|
+
TrieSet : ==, not !=
|
|
65
|
+
TrieSet : not ==, !=
|
|
66
|
+
TrieSet : not ==, !=
|
|
67
|
+
LPMatrix : ==, not !=
|
|
68
|
+
LPMatrix : ==, not !=
|
|
69
|
+
LPMatrix : not ==, !=
|
|
70
|
+
ValidityConstraints : ==, not !=
|
|
71
|
+
ValidityConstraints : not ==, !=
|
|
72
|
+
Signature : ==, not !=
|
|
73
|
+
Signature : not ==, !=
|
|
74
|
+
SFSAlt : ==, not !=
|
|
75
|
+
SFSAlt : not ==, !=
|
|
76
|
+
DiscSetTet : ==, not !=
|
|
77
|
+
DiscSetTet : not ==, !=
|
|
78
|
+
DiscSetSurface : ==, not !=
|
|
79
|
+
DiscSetSurface : not ==, !=
|
|
80
|
+
DiscSetSurface : not ==, !=
|
|
81
|
+
TreeDecomposition : ==, not !=
|
|
82
|
+
TreeDecomposition : not ==, !=
|
|
83
|
+
SatBlockSpec : ==, not !=
|
|
84
|
+
SatBlockSpec : not ==, !=
|
|
85
|
+
SatBlockSpec : ==, not !=
|
|
86
|
+
SatBlockSpec : not ==, !=
|
|
87
|
+
SatBlockSpec : ==, not !=
|
|
88
|
+
SatBlockSpec : not ==, !=
|
|
89
|
+
SatBlock : ==, not !=
|
|
90
|
+
SatBlock : not ==, !=
|
|
91
|
+
SatBlock : ==, not !=
|
|
92
|
+
SatBlock : not ==, !=
|
|
93
|
+
SatBlock : ==, not !=
|
|
94
|
+
SatBlock : not ==, !=
|
|
95
|
+
TxICore : ==, not !=
|
|
96
|
+
TxICore : not ==, !=
|
|
97
|
+
TxICore : not ==, !=
|
|
98
|
+
TxICore : ==, not !=
|
|
99
|
+
BlockedSFSTriple : ==, not !=
|
|
100
|
+
BlockedSFSTriple : not ==, !=
|
|
101
|
+
BlockedSFSTriple.manifold() : ==, not !=
|
|
102
|
+
Tetrahedron3 : ==, not !=
|
|
103
|
+
Tetrahedron3 : not ==, !=
|
|
104
|
+
Container : throws on ==, throws on !=, same packet
|
|
105
|
+
Text : ==, not !=, same packet
|
|
106
|
+
Different Packets : throws on ==, throws on !=, different packets
|
|
107
|
+
Different Packets : throws on ==, throws on !=, different packets
|
|
108
|
+
Different Packets : throws on ==, throws on !=, different packets
|
|
109
|
+
Different Packets : throws on ==, throws on !=, different packets
|
|
110
|
+
Different Packets : throws on ==, throws on !=, throws on samePacket()
|
|
111
|
+
Different Packets : throws on ==, throws on !=, throws on samePacket()
|
|
112
|
+
HomologicalData : throws on ==, throws on !=
|
|
@@ -0,0 +1,308 @@
|
|
|
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 that == and != behave as expected for Regina's python bindings.
|
|
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
|
+
print(AbelianGroup.equalityType)
|
|
33
|
+
print(GluingPermSearcher2.equalityType)
|
|
34
|
+
print(Integer.equalityType)
|
|
35
|
+
print(SigCensus.equalityType)
|
|
36
|
+
print(HomologicalData.equalityType)
|
|
37
|
+
print(Container.equalityType)
|
|
38
|
+
|
|
39
|
+
print()
|
|
40
|
+
|
|
41
|
+
def cmp(name, a, b, packet = False):
|
|
42
|
+
ans = ''
|
|
43
|
+
try:
|
|
44
|
+
if a == b:
|
|
45
|
+
ans += '=='
|
|
46
|
+
else:
|
|
47
|
+
ans += 'not =='
|
|
48
|
+
except:
|
|
49
|
+
ans += 'throws on =='
|
|
50
|
+
ans += ', '
|
|
51
|
+
try:
|
|
52
|
+
if a != b:
|
|
53
|
+
ans += '!='
|
|
54
|
+
else:
|
|
55
|
+
ans += 'not !='
|
|
56
|
+
except:
|
|
57
|
+
ans += 'throws on !='
|
|
58
|
+
if packet:
|
|
59
|
+
ans += ', '
|
|
60
|
+
try:
|
|
61
|
+
if a.samePacket(b):
|
|
62
|
+
ans += 'same packet'
|
|
63
|
+
else:
|
|
64
|
+
ans += 'different packets'
|
|
65
|
+
except:
|
|
66
|
+
ans += 'throws on samePacket()'
|
|
67
|
+
print(name, ':', ans)
|
|
68
|
+
|
|
69
|
+
# ----------------------------------------------------------------------
|
|
70
|
+
# Classes that compare by value:
|
|
71
|
+
# ----------------------------------------------------------------------
|
|
72
|
+
|
|
73
|
+
cmp('Integer', Integer(3), Integer(3))
|
|
74
|
+
cmp('Integer', Integer(3), Integer(4))
|
|
75
|
+
|
|
76
|
+
cmp('AbelianGroup', AbelianGroup(), AbelianGroup())
|
|
77
|
+
cmp('AbelianGroup', AbelianGroup(), AbelianGroup(1))
|
|
78
|
+
|
|
79
|
+
cmp('GroupPresentation', GroupPresentation(), GroupPresentation())
|
|
80
|
+
cmp('GroupPresentation', GroupPresentation(), GroupPresentation(1))
|
|
81
|
+
|
|
82
|
+
cmp('Link', ExampleLink.trefoil(), ExampleLink.trefoilRight())
|
|
83
|
+
cmp('Link', ExampleLink.trefoilLeft(), ExampleLink.trefoilRight())
|
|
84
|
+
cmp('Link', Link(3), Link(3))
|
|
85
|
+
cmp('Link', Link(3), Link(2))
|
|
86
|
+
cmp('Link + Packet', Link(2), PacketOfLink(2), True)
|
|
87
|
+
cmp('Link + Packet', PacketOfLink(2), Link(2), True)
|
|
88
|
+
cmp('PacketOfLink', PacketOfLink(2), PacketOfLink(2), True)
|
|
89
|
+
p = PacketOfLink(3)
|
|
90
|
+
cmp('PacketOfLink', p, p.root(), True)
|
|
91
|
+
|
|
92
|
+
cmp('Tangle', Tangle(3,2), Tangle(3,2))
|
|
93
|
+
cmp('Tangle', Tangle(3,2), Tangle(3,-2))
|
|
94
|
+
cmp('Tangle', Tangle(1,0), Tangle(0,1))
|
|
95
|
+
|
|
96
|
+
g1 = ModelLinkGraph.fromPlantri('bcdd,aeec,abfd,acfa,bffb,ceed')
|
|
97
|
+
g2 = ModelLinkGraph.fromPlantri('bcdd,aeec,abfd,acfa,bffb,eedc')
|
|
98
|
+
cmp('ModelLinkGraph', g1, ModelLinkGraph(g1))
|
|
99
|
+
cmp('ModelLinkGraph', g1, g2)
|
|
100
|
+
cmp('ModelLinkGraphCells', g1.cells(), ModelLinkGraph(g1).cells())
|
|
101
|
+
cmp('ModelLinkGraphCells', g1.cells(), g2.cells())
|
|
102
|
+
|
|
103
|
+
cmp('Triangulation3', Triangulation3(), Triangulation3())
|
|
104
|
+
cmp('Triangulation3', Example3.figureEight(), Example3.whiteheadLink())
|
|
105
|
+
cmp('Triangulation3 + Packet', Triangulation3(), PacketOfTriangulation3(), True)
|
|
106
|
+
cmp('Triangulation3 + Packet', PacketOfTriangulation3(), Triangulation3(), True)
|
|
107
|
+
cmp('PacketOfTriangulation3', PacketOfTriangulation3(), PacketOfTriangulation3(), True)
|
|
108
|
+
p = PacketOfTriangulation3()
|
|
109
|
+
cmp('PacketOfTriangulation3', p, p.root(), True)
|
|
110
|
+
|
|
111
|
+
w = ExampleSnapPea.whiteheadLink()
|
|
112
|
+
cmp('SnapPeaTriangulation', w, ExampleSnapPea.whiteheadLink())
|
|
113
|
+
dummy = w.fill(3,4,0)
|
|
114
|
+
cmp('SnapPeaTriangulation', w, ExampleSnapPea.whiteheadLink())
|
|
115
|
+
cmp('SnapPeaTriangulation', ExampleSnapPea.whiteheadLink(), w)
|
|
116
|
+
cmp('SnapPeaTriangulation', ExampleSnapPea.figureEight(), w)
|
|
117
|
+
|
|
118
|
+
cmp('FacetPairing2', FacetPairing2(Example2.kb()), FacetPairing2(Example2.kb()))
|
|
119
|
+
cmp('FacetPairing2', FacetPairing2(Example2.mobius()), FacetPairing2(Example2.annulus()))
|
|
120
|
+
|
|
121
|
+
cmp('Attachment', Attachment(b'foo', 'x'), Attachment(b'foo', 'y'), True)
|
|
122
|
+
cmp('Attachment', Attachment(b'foo', 'x'), Attachment(), True)
|
|
123
|
+
cmp('Attachment', Attachment(), Attachment(b'foo', 'x'), True)
|
|
124
|
+
cmp('Attachment', Attachment(b'foof', 'x'), Attachment(b'foo', 'x'), True)
|
|
125
|
+
cmp('Text', Text('foo'), Text('foo'), True)
|
|
126
|
+
cmp('Text', Text('foo'), Text('foof'), True)
|
|
127
|
+
|
|
128
|
+
s = Script()
|
|
129
|
+
s.setText('print("Hello world!")')
|
|
130
|
+
dummy = s.addVariable('foo', None)
|
|
131
|
+
dummy = s.addVariable('bar', s)
|
|
132
|
+
t = Script()
|
|
133
|
+
t.setText('print("Hello world!")')
|
|
134
|
+
dummy = t.addVariable('foo', None)
|
|
135
|
+
dummy = t.addVariable('bar', t)
|
|
136
|
+
cmp('Script', s, t)
|
|
137
|
+
t.removeVariable('bar')
|
|
138
|
+
dummy = t.addVariable('bar', s)
|
|
139
|
+
cmp('Script', s, t)
|
|
140
|
+
cmp('Script', s, Script(s))
|
|
141
|
+
|
|
142
|
+
x = None
|
|
143
|
+
|
|
144
|
+
def foundGluings2(g):
|
|
145
|
+
global x
|
|
146
|
+
if not x:
|
|
147
|
+
x = GluingPerms2(g)
|
|
148
|
+
cmp('GluingPerms2', x, g)
|
|
149
|
+
|
|
150
|
+
def foundPairing2(p, isos):
|
|
151
|
+
GluingPermSearcher2.findAllPerms(p, isos, True, foundGluings2)
|
|
152
|
+
|
|
153
|
+
FacetPairing2.findAllPairings(2, False, 0, foundPairing2)
|
|
154
|
+
|
|
155
|
+
a = NormalSurfaces(Example3.poincare(), NormalCoords.Standard)
|
|
156
|
+
b = NormalSurfaces(Example3.poincare(), NormalCoords.Quad)
|
|
157
|
+
c = NormalSurfaces(Example3.poincare(), NormalCoords.Standard)
|
|
158
|
+
cmp('NormalSurfaces', a, b)
|
|
159
|
+
cmp('NormalSurfaces', a, c)
|
|
160
|
+
a.sort(lambda x,y: x.eulerChar() > y.eulerChar())
|
|
161
|
+
c.sort(lambda x,y: x.eulerChar() < y.eulerChar())
|
|
162
|
+
cmp('NormalSurfaces', a, c)
|
|
163
|
+
|
|
164
|
+
a = NormalHypersurfaces(Example4.s3xs1(), HyperCoords.Standard)
|
|
165
|
+
b = NormalHypersurfaces(Example4.s3xs1(), HyperCoords.Prism)
|
|
166
|
+
c = NormalHypersurfaces(Example4.s3xs1(), HyperCoords.Standard)
|
|
167
|
+
cmp('NormalHypersurfaces', a, b)
|
|
168
|
+
cmp('NormalHypersurfaces', a, c)
|
|
169
|
+
a.sort(lambda x,y: x.homology().str() > y.homology().str())
|
|
170
|
+
c.sort(lambda x,y: x.homology().str() < y.homology().str())
|
|
171
|
+
cmp('NormalHypersurfaces', a, c)
|
|
172
|
+
|
|
173
|
+
a = AngleStructures(Example3.figureEight())
|
|
174
|
+
b = AngleStructures(Example3.figureEight(), True)
|
|
175
|
+
c = AngleStructures(Example3.figureEight())
|
|
176
|
+
cmp('AngleStructures', a, b)
|
|
177
|
+
cmp('AngleStructures', a, c)
|
|
178
|
+
|
|
179
|
+
t = TypeTrie4()
|
|
180
|
+
t.insert([1,0,3])
|
|
181
|
+
t.insert([0,0,2])
|
|
182
|
+
u = TypeTrie4(t)
|
|
183
|
+
cmp('TypeTrie', t, u)
|
|
184
|
+
u.insert([0,1,1])
|
|
185
|
+
cmp('TypeTrie', t, u)
|
|
186
|
+
cmp('TypeTrie', u, t)
|
|
187
|
+
|
|
188
|
+
t = TrieSet()
|
|
189
|
+
b = Bitmask8(); b.set([1,2,4], True); t.insert(b)
|
|
190
|
+
b = Bitmask8(); b.set([1,4,5], True); t.insert(b)
|
|
191
|
+
u = TrieSet(t)
|
|
192
|
+
cmp('TrieSet', t, u)
|
|
193
|
+
b = Bitmask8(); b.set([0,4], True); t.insert(b)
|
|
194
|
+
cmp('TrieSet', t, u)
|
|
195
|
+
cmp('TrieSet', u, t)
|
|
196
|
+
|
|
197
|
+
t = Example3.figureEight()
|
|
198
|
+
tab = LPInitialTableaux(t, NormalCoords.Quad)
|
|
199
|
+
m1 = LPMatrix(tab.rank(), tab.columns()); tab.fillInitialTableaux(m1)
|
|
200
|
+
m2 = LPMatrix(tab.rank(), tab.columns()); tab.fillInitialTableaux(m2)
|
|
201
|
+
cmp('LPMatrix', LPMatrix(), LPMatrix())
|
|
202
|
+
cmp('LPMatrix', m1, m2)
|
|
203
|
+
t = Example3.s2xs1()
|
|
204
|
+
tab = LPInitialTableaux(t, NormalCoords.Quad)
|
|
205
|
+
m3 = LPMatrix(tab.rank(), tab.columns()); tab.fillInitialTableaux(m3)
|
|
206
|
+
cmp('LPMatrix', m1, m3)
|
|
207
|
+
|
|
208
|
+
v1 = ValidityConstraints(10, 4)
|
|
209
|
+
v1.addLocal([4,5,6]); v1.addLocal([7,8,9]); v1.addGlobal([0])
|
|
210
|
+
v2 = ValidityConstraints(10, 4)
|
|
211
|
+
v2.addLocal([9,8,7]); v2.addLocal([6,5,4]); v2.addGlobal([0])
|
|
212
|
+
v3 = ValidityConstraints(10, 4)
|
|
213
|
+
v3.addLocal([9,8,7]); v3.addLocal([6,5,4]); v3.addGlobal([1])
|
|
214
|
+
cmp('ValidityConstraints', v1, v2)
|
|
215
|
+
cmp('ValidityConstraints', v1, v3)
|
|
216
|
+
|
|
217
|
+
cmp('Signature', Signature('(aba)(b)'), Signature('aba.b'))
|
|
218
|
+
cmp('Signature', Signature('(aba)(b)'), Signature('(ab)(a)(b)'))
|
|
219
|
+
|
|
220
|
+
sfsDisc = SFSpace(SFSpace.o2, 0, 1)
|
|
221
|
+
s1 = SFSAlt.altSet(sfsDisc)
|
|
222
|
+
s2 = SFSAlt.altSet(sfsDisc)
|
|
223
|
+
cmp('SFSAlt', s1[0], s2[0])
|
|
224
|
+
cmp('SFSAlt', s1[0], s1[1])
|
|
225
|
+
|
|
226
|
+
t = Example3.poincare()
|
|
227
|
+
st = NormalSurfaces(t, NormalCoords.Quad)
|
|
228
|
+
dt = DiscSetSurface(st.surface(0))
|
|
229
|
+
u = Example3.s2xs1()
|
|
230
|
+
su = NormalSurfaces(u, NormalCoords.Quad)
|
|
231
|
+
du = DiscSetSurface(su.surface(0))
|
|
232
|
+
cmp('DiscSetTet', du.tetDiscs(0), du.tetDiscs(1)) # should be equal
|
|
233
|
+
cmp('DiscSetTet', dt.tetDiscs(0), dt.tetDiscs(1)) # should be different
|
|
234
|
+
cmp('DiscSetSurface', dt, DiscSetSurface(st.surface(0)))
|
|
235
|
+
cmp('DiscSetSurface', dt, DiscSetSurface(st.surface(1)))
|
|
236
|
+
cmp('DiscSetSurface', dt, du)
|
|
237
|
+
|
|
238
|
+
t1 = TreeDecomposition(ExampleLink.conway())
|
|
239
|
+
t2 = TreeDecomposition(ExampleLink.conway())
|
|
240
|
+
cmp('TreeDecomposition', t1, t2)
|
|
241
|
+
t2.reroot(t2.bag(3))
|
|
242
|
+
cmp('TreeDecomposition', t1, t2)
|
|
243
|
+
|
|
244
|
+
t = Triangulation3('kLALALMkbccfefihijjlpkusuueotr')
|
|
245
|
+
b = BlockedSFSTriple.recognise(t)
|
|
246
|
+
# [ Tri, Mob(v), LST(1,2,3) | Tri, Mob(v) | Tri, Mob(v), Mob(v) ]
|
|
247
|
+
cmp('SatBlockSpec', b.end(0).block(0), b.centre().block(0))
|
|
248
|
+
cmp('SatBlockSpec', b.end(0).block(0), b.centre().block(1))
|
|
249
|
+
cmp('SatBlockSpec', b.end(0).block(1), b.centre().block(1))
|
|
250
|
+
cmp('SatBlockSpec', b.end(0).block(1), b.centre().block(0))
|
|
251
|
+
cmp('SatBlockSpec', b.end(0).block(2), b.end(0).block(2))
|
|
252
|
+
cmp('SatBlockSpec', b.end(0).block(2), b.end(1).block(2))
|
|
253
|
+
cmp('SatBlock', b.end(0).block(0).block(), b.centre().block(0).block())
|
|
254
|
+
cmp('SatBlock', b.end(0).block(0).block(), b.centre().block(1).block())
|
|
255
|
+
cmp('SatBlock', b.end(0).block(1).block(), b.centre().block(1).block())
|
|
256
|
+
cmp('SatBlock', b.end(0).block(1).block(), b.centre().block(0).block())
|
|
257
|
+
cmp('SatBlock', b.end(0).block(2).block(), b.end(0).block(2).block())
|
|
258
|
+
cmp('SatBlock', b.end(0).block(2).block(), b.end(1).block(2).block())
|
|
259
|
+
|
|
260
|
+
cmp('TxICore', TxIDiagonalCore(6, 1), TxIDiagonalCore(6, 1))
|
|
261
|
+
cmp('TxICore', TxIDiagonalCore(7, 1), TxIDiagonalCore(7, 2))
|
|
262
|
+
cmp('TxICore', TxIDiagonalCore(6, 1), TxIParallelCore())
|
|
263
|
+
cmp('TxICore', TxIParallelCore(), TxIParallelCore())
|
|
264
|
+
|
|
265
|
+
t = Triangulation3('kLALALMkbccfefihijjlpkusuueotr')
|
|
266
|
+
b1 = BlockedSFSTriple.recognise(t)
|
|
267
|
+
b2 = BlockedSFSTriple.recognise(t)
|
|
268
|
+
cmp('BlockedSFSTriple', b1, b2)
|
|
269
|
+
iso = Isomorphism3(t.size())
|
|
270
|
+
for i in range(t.size()):
|
|
271
|
+
iso.setSimpImage(i, t.size() - i - 1)
|
|
272
|
+
iso.setFacetPerm(i, Perm4(3,2,1,0))
|
|
273
|
+
|
|
274
|
+
t2 = iso.apply(t)
|
|
275
|
+
b3 = BlockedSFSTriple.recognise(t2)
|
|
276
|
+
cmp('BlockedSFSTriple', b1, b3)
|
|
277
|
+
cmp('BlockedSFSTriple.manifold()', b1.manifold(), b3.manifold())
|
|
278
|
+
|
|
279
|
+
# ----------------------------------------------------------------------
|
|
280
|
+
# Classes that compare by reference:
|
|
281
|
+
# ----------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
t = Triangulation3()
|
|
284
|
+
(a,b) = t.newTetrahedra(2)
|
|
285
|
+
cmp('Tetrahedron3', a, t.tetrahedron(0))
|
|
286
|
+
cmp('Tetrahedron3', a, t.tetrahedron(1))
|
|
287
|
+
|
|
288
|
+
# ----------------------------------------------------------------------
|
|
289
|
+
# More tests with packets:
|
|
290
|
+
# ----------------------------------------------------------------------
|
|
291
|
+
|
|
292
|
+
a = Container()
|
|
293
|
+
cmp('Container', a, a.root(), True)
|
|
294
|
+
t = Text()
|
|
295
|
+
cmp('Text', t, t.root(), True)
|
|
296
|
+
cmp('Different Packets', Container(), Text(), True)
|
|
297
|
+
cmp('Different Packets', Text(), Container(), True)
|
|
298
|
+
cmp('Different Packets', PacketOfLink(), Text(), True)
|
|
299
|
+
cmp('Different Packets', Text(), PacketOfLink(), True)
|
|
300
|
+
cmp('Different Packets', Text(), Link(), True)
|
|
301
|
+
cmp('Different Packets', Link(), Text(), True)
|
|
302
|
+
|
|
303
|
+
# ----------------------------------------------------------------------
|
|
304
|
+
# Classes that cannot be compared:
|
|
305
|
+
# ----------------------------------------------------------------------
|
|
306
|
+
|
|
307
|
+
t = Example3.poincare()
|
|
308
|
+
cmp('HomologicalData', HomologicalData(t), HomologicalData(t))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Euler characteristics for triangulation vs compact manifold:
|
|
2
|
+
0 0 --- Empty triangulation
|
|
3
|
+
0 0 --- L(8,3)
|
|
4
|
+
0 0 --- RP2 x S1
|
|
5
|
+
0 0 --- Solid Klein bottle
|
|
6
|
+
0 0 --- LST(3,4,7)
|
|
7
|
+
1 1 --- Solid ball
|
|
8
|
+
1 0 --- Figure eight knot complement
|
|
9
|
+
2 0 --- Whitehead link complement
|
|
10
|
+
1 0 --- Gieseking manifold
|
|
11
|
+
2 -1 --- Cusped genus two torus
|
|
12
|
+
-1 1 --- Invalid edge
|
|
13
|
+
1 1 --- Two projective plane cusps
|
|
14
|
+
1 0 --- Pinched solid torus
|
|
15
|
+
1 0 --- Pinched solid Klein bottle
|
|
@@ -0,0 +1,93 @@
|
|
|
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 different Euler characteristic calculations.
|
|
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
|
+
def printEuler(t, name):
|
|
33
|
+
print(t.eulerCharTri(), t.eulerCharManifold(), \
|
|
34
|
+
'---', name)
|
|
35
|
+
|
|
36
|
+
# Consistency check, while we're here.
|
|
37
|
+
eHom = regina.HomologicalData(t).eulerChar()
|
|
38
|
+
if eHom != t.eulerCharManifold():
|
|
39
|
+
print('ERROR: Triangulation3::eulerCharManifold() and')
|
|
40
|
+
print(' HomologicalData.eulerChar() disagree!')
|
|
41
|
+
|
|
42
|
+
print('Euler characteristics for triangulation vs compact manifold:')
|
|
43
|
+
|
|
44
|
+
# Empty:
|
|
45
|
+
printEuler(regina.Triangulation3(), "Empty triangulation")
|
|
46
|
+
|
|
47
|
+
# Closed:
|
|
48
|
+
printEuler(regina.Example3.lens(8,3), "L(8,3)")
|
|
49
|
+
printEuler(regina.Example3.rp2xs1(), "RP2 x S1")
|
|
50
|
+
|
|
51
|
+
# Bounded:
|
|
52
|
+
printEuler(regina.Example3.solidKleinBottle(),
|
|
53
|
+
"Solid Klein bottle")
|
|
54
|
+
printEuler(regina.Example3.lst(3,4), "LST(3,4,7)")
|
|
55
|
+
|
|
56
|
+
tri = regina.Triangulation3()
|
|
57
|
+
dummy = tri.newTetrahedron()
|
|
58
|
+
printEuler(tri, "Solid ball")
|
|
59
|
+
|
|
60
|
+
# Ideal:
|
|
61
|
+
printEuler(regina.Example3.figureEight(),
|
|
62
|
+
"Figure eight knot complement")
|
|
63
|
+
printEuler(regina.Example3.whiteheadLink(),
|
|
64
|
+
"Whitehead link complement")
|
|
65
|
+
printEuler(regina.Example3.gieseking(),
|
|
66
|
+
"Gieseking manifold")
|
|
67
|
+
printEuler(regina.Example3.cuspedGenusTwoTorus(),
|
|
68
|
+
"Cusped genus two torus")
|
|
69
|
+
|
|
70
|
+
# Edge joined to itself:
|
|
71
|
+
tri = regina.Triangulation3()
|
|
72
|
+
t = tri.newTetrahedron()
|
|
73
|
+
t.join(0, t, regina.Perm4(1,0,3,2))
|
|
74
|
+
t.join(2, t, regina.Perm4(1,0,3,2))
|
|
75
|
+
printEuler(tri, "Invalid edge")
|
|
76
|
+
|
|
77
|
+
# Subdivide to obtain a valid triangulation:
|
|
78
|
+
tri.subdivide()
|
|
79
|
+
printEuler(tri, "Two projective plane cusps")
|
|
80
|
+
|
|
81
|
+
# Invalid boundary vertex links:
|
|
82
|
+
tri = regina.Triangulation3()
|
|
83
|
+
(t, s) = tri.newTetrahedra(2)
|
|
84
|
+
t.join(3, s, regina.Perm4(0,1,2,3))
|
|
85
|
+
t.join(2, s, regina.Perm4(0,3,1,2))
|
|
86
|
+
printEuler(tri, "Pinched solid torus")
|
|
87
|
+
|
|
88
|
+
tri = regina.Triangulation3()
|
|
89
|
+
(t, s) = tri.newTetrahedra(2)
|
|
90
|
+
t.join(3, s, regina.Perm4(0,1,2,3))
|
|
91
|
+
t.join(2, s, regina.Perm4(0,2,1,3))
|
|
92
|
+
printEuler(tri, "Pinched solid Klein bottle")
|
|
93
|
+
|
|
@@ -0,0 +1,98 @@
|
|
|
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 throwing and catching Regina's exception 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 License
|
|
30
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
31
|
+
|
|
32
|
+
t = Example3.poincare()
|
|
33
|
+
|
|
34
|
+
print(t.faces(2).size())
|
|
35
|
+
try:
|
|
36
|
+
print(t.faces(3).size())
|
|
37
|
+
print('ERROR: Did not throw exception')
|
|
38
|
+
except InvalidArgument:
|
|
39
|
+
pass
|
|
40
|
+
|
|
41
|
+
try:
|
|
42
|
+
print(t.faces(-1).size())
|
|
43
|
+
print('ERROR: Did not throw exception')
|
|
44
|
+
except InvalidArgument:
|
|
45
|
+
pass
|
|
46
|
+
|
|
47
|
+
t = ExampleSnapPea.whiteheadLink()
|
|
48
|
+
try:
|
|
49
|
+
print(t.filledAll())
|
|
50
|
+
print('ERROR: Did not throw exception')
|
|
51
|
+
except FailedPrecondition:
|
|
52
|
+
pass
|
|
53
|
+
|
|
54
|
+
dummy = t.fill(1,2,0)
|
|
55
|
+
dummy = t.fill(3,4,1)
|
|
56
|
+
print(t.filledAll().homology())
|
|
57
|
+
dummy = t.pachner(t.triangle(0))
|
|
58
|
+
try:
|
|
59
|
+
print(t.filledAll())
|
|
60
|
+
print('ERROR: Did not throw exception')
|
|
61
|
+
except SnapPeaIsNull:
|
|
62
|
+
pass
|
|
63
|
+
|
|
64
|
+
print(Rational(1,2).doubleApprox())
|
|
65
|
+
try:
|
|
66
|
+
print(Rational(1,0).doubleApprox())
|
|
67
|
+
print('ERROR: Did not throw exception')
|
|
68
|
+
except UnsolvedCase:
|
|
69
|
+
pass
|
|
70
|
+
|
|
71
|
+
s = SFSpace()
|
|
72
|
+
print(s.construct().homology())
|
|
73
|
+
s.addPuncture()
|
|
74
|
+
try:
|
|
75
|
+
print(s.construct())
|
|
76
|
+
print('ERROR: Did not throw exception')
|
|
77
|
+
except NotImplemented:
|
|
78
|
+
pass
|
|
79
|
+
|
|
80
|
+
t = Example3.poincare()
|
|
81
|
+
s = NormalSurfaces(t, NormalCoords.Standard)
|
|
82
|
+
t = None
|
|
83
|
+
print(s)
|
|
84
|
+
try:
|
|
85
|
+
t = s.triangulation()
|
|
86
|
+
print(t.isReadOnlySnapshot())
|
|
87
|
+
# TODO: subdivide(), due to a swap() in its internal implementation,
|
|
88
|
+
# actually throws a SnapshotWriteError from a triangulation destructor.
|
|
89
|
+
# This is *bad*, and moreover results in an exception that Python cannot
|
|
90
|
+
# catch.
|
|
91
|
+
# t.subdivide()
|
|
92
|
+
t.pachner(t.triangle(0))
|
|
93
|
+
print('ERROR: Did not throw exception')
|
|
94
|
+
except SnapshotWriteError:
|
|
95
|
+
pass
|
|
96
|
+
|
|
97
|
+
print('All done!')
|
|
98
|
+
|