regina 7.4.1__cp314-cp314-macosx_10_13_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. regina/.dylibs/libgmp.10.dylib +0 -0
  2. regina/.dylibs/libgmpxx.4.dylib +0 -0
  3. regina/__init__.py +192 -0
  4. regina/engine.cpython-314-darwin.so +0 -0
  5. regina/plainCompleter.py +221 -0
  6. regina/pyCensus/__init__.py +14 -0
  7. regina/pyCensus/christy-knots-links.tdb +0 -0
  8. regina/pyCensus/closed-hyp-census-full.tdb +0 -0
  9. regina/pyCensus/closed-nor-census-11.tdb +0 -0
  10. regina/pyCensus/closed-or-census-11.tdb +0 -0
  11. regina/pyCensus/cusped-hyp-nor-census-9.tdb +0 -0
  12. regina/pyCensus/cusped-hyp-or-census-9.tdb +0 -0
  13. regina/sageRegina/__init__.py +2 -0
  14. regina/sageRegina/config.py +9 -0
  15. regina/sageRegina/test.py +131 -0
  16. regina/sageRegina/testsuite/CMakeLists.txt +64 -0
  17. regina/sageRegina/testsuite/O2_1.rga +15 -0
  18. regina/sageRegina/testsuite/O2_1.tri +28 -0
  19. regina/sageRegina/testsuite/README.txt +21 -0
  20. regina/sageRegina/testsuite/alltypes-exc.out +698 -0
  21. regina/sageRegina/testsuite/alltypes-exc.test +92 -0
  22. regina/sageRegina/testsuite/alltypes-noexc.out +698 -0
  23. regina/sageRegina/testsuite/alltypes-noexc.test +85 -0
  24. regina/sageRegina/testsuite/alltypes.out +698 -0
  25. regina/sageRegina/testsuite/alltypes.test +85 -0
  26. regina/sageRegina/testsuite/angles.out +102 -0
  27. regina/sageRegina/testsuite/angles.test +70 -0
  28. regina/sageRegina/testsuite/arrow.out +86 -0
  29. regina/sageRegina/testsuite/arrow.test +224 -0
  30. regina/sageRegina/testsuite/base64.out +2 -0
  31. regina/sageRegina/testsuite/base64.test +37 -0
  32. regina/sageRegina/testsuite/basic_callback.out +124 -0
  33. regina/sageRegina/testsuite/basic_sub.out +7 -0
  34. regina/sageRegina/testsuite/binom.out +14 -0
  35. regina/sageRegina/testsuite/binom.test +69 -0
  36. regina/sageRegina/testsuite/bool.out +6 -0
  37. regina/sageRegina/testsuite/bool.test +62 -0
  38. regina/sageRegina/testsuite/bytes.out +17 -0
  39. regina/sageRegina/testsuite/bytes.test +76 -0
  40. regina/sageRegina/testsuite/callbacks.out +515 -0
  41. regina/sageRegina/testsuite/callbacks.test +279 -0
  42. regina/sageRegina/testsuite/census.out +120 -0
  43. regina/sageRegina/testsuite/census.test +156 -0
  44. regina/sageRegina/testsuite/clone.out +18 -0
  45. regina/sageRegina/testsuite/clone.test +99 -0
  46. regina/sageRegina/testsuite/comparison.out +41 -0
  47. regina/sageRegina/testsuite/comparison.test +47 -0
  48. regina/sageRegina/testsuite/construction.out +120 -0
  49. regina/sageRegina/testsuite/construction.test +63 -0
  50. regina/sageRegina/testsuite/constructors.out +14 -0
  51. regina/sageRegina/testsuite/constructors.test +95 -0
  52. regina/sageRegina/testsuite/cube.orb +87 -0
  53. regina/sageRegina/testsuite/discs.out +3 -0
  54. regina/sageRegina/testsuite/discs.test +38 -0
  55. regina/sageRegina/testsuite/docstrings.filter +22 -0
  56. regina/sageRegina/testsuite/docstrings.out +802 -0
  57. regina/sageRegina/testsuite/docstrings.out.v2 +799 -0
  58. regina/sageRegina/testsuite/docstrings.test +55 -0
  59. regina/sageRegina/testsuite/dodec.orb +309 -0
  60. regina/sageRegina/testsuite/embeddings.out +23 -0
  61. regina/sageRegina/testsuite/embeddings.test +87 -0
  62. regina/sageRegina/testsuite/enumerate.out +62 -0
  63. regina/sageRegina/testsuite/enumerate.test +80 -0
  64. regina/sageRegina/testsuite/equality.out +112 -0
  65. regina/sageRegina/testsuite/equality.test +308 -0
  66. regina/sageRegina/testsuite/euler.out +15 -0
  67. regina/sageRegina/testsuite/euler.test +93 -0
  68. regina/sageRegina/testsuite/exception.out +7 -0
  69. regina/sageRegina/testsuite/exception.test +98 -0
  70. regina/sageRegina/testsuite/facenumbering.out +546 -0
  71. regina/sageRegina/testsuite/facenumbering.test +72 -0
  72. regina/sageRegina/testsuite/faces.out +40 -0
  73. regina/sageRegina/testsuite/faces.test +70 -0
  74. regina/sageRegina/testsuite/file.out +1229 -0
  75. regina/sageRegina/testsuite/file.test +68 -0
  76. regina/sageRegina/testsuite/file1.rga +0 -0
  77. regina/sageRegina/testsuite/file2.rga +0 -0
  78. regina/sageRegina/testsuite/file3.rga +119 -0
  79. regina/sageRegina/testsuite/flags.out +38 -0
  80. regina/sageRegina/testsuite/flags.out.v2 +38 -0
  81. regina/sageRegina/testsuite/flags.test +81 -0
  82. regina/sageRegina/testsuite/flype.out +37 -0
  83. regina/sageRegina/testsuite/flype.test +48 -0
  84. regina/sageRegina/testsuite/generic.out +116 -0
  85. regina/sageRegina/testsuite/generic.test +74 -0
  86. regina/sageRegina/testsuite/groups.out +70 -0
  87. regina/sageRegina/testsuite/groups.test +115 -0
  88. regina/sageRegina/testsuite/hash.out +66 -0
  89. regina/sageRegina/testsuite/hash.test +84 -0
  90. regina/sageRegina/testsuite/hypersurfaces.out +681 -0
  91. regina/sageRegina/testsuite/hypersurfaces.test +89 -0
  92. regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
  93. regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
  94. regina/sageRegina/testsuite/i18n.out +6 -0
  95. regina/sageRegina/testsuite/i18n.test +89 -0
  96. regina/sageRegina/testsuite/id.out +2 -0
  97. regina/sageRegina/testsuite/id.test +45 -0
  98. regina/sageRegina/testsuite/index.out +2 -0
  99. regina/sageRegina/testsuite/index.test +41 -0
  100. regina/sageRegina/testsuite/integer.out +74 -0
  101. regina/sageRegina/testsuite/integer.test +54 -0
  102. regina/sageRegina/testsuite/italian.orb +90 -0
  103. regina/sageRegina/testsuite/iterators.out +118 -0
  104. regina/sageRegina/testsuite/iterators.test +126 -0
  105. regina/sageRegina/testsuite/knotted-Y.orb +47 -0
  106. regina/sageRegina/testsuite/listener.out +43 -0
  107. regina/sageRegina/testsuite/listener.test +99 -0
  108. regina/sageRegina/testsuite/listview.out +416 -0
  109. regina/sageRegina/testsuite/listview.test +251 -0
  110. regina/sageRegina/testsuite/lookup.out +13 -0
  111. regina/sageRegina/testsuite/lookup.test +42 -0
  112. regina/sageRegina/testsuite/lst.out +844 -0
  113. regina/sageRegina/testsuite/lst.test +195 -0
  114. regina/sageRegina/testsuite/memory1.out +62 -0
  115. regina/sageRegina/testsuite/memory1.test +152 -0
  116. regina/sageRegina/testsuite/memory2.out +62 -0
  117. regina/sageRegina/testsuite/memory2.test +122 -0
  118. regina/sageRegina/testsuite/memory3.out +92 -0
  119. regina/sageRegina/testsuite/memory3.test +214 -0
  120. regina/sageRegina/testsuite/misc.out +7 -0
  121. regina/sageRegina/testsuite/misc.test +54 -0
  122. regina/sageRegina/testsuite/operators.out +129 -0
  123. regina/sageRegina/testsuite/operators.test +59 -0
  124. regina/sageRegina/testsuite/orb.out +441 -0
  125. regina/sageRegina/testsuite/orb.test +47 -0
  126. regina/sageRegina/testsuite/pdf.out +4 -0
  127. regina/sageRegina/testsuite/pdf.test +47 -0
  128. regina/sageRegina/testsuite/perm.out +36 -0
  129. regina/sageRegina/testsuite/perm.test +74 -0
  130. regina/sageRegina/testsuite/plantri.out +12 -0
  131. regina/sageRegina/testsuite/plantri.test +58 -0
  132. regina/sageRegina/testsuite/poincare.tri +55 -0
  133. regina/sageRegina/testsuite/presentations.out +11 -0
  134. regina/sageRegina/testsuite/presentations.test +59 -0
  135. regina/sageRegina/testsuite/refs.out +51 -0
  136. regina/sageRegina/testsuite/refs.test +126 -0
  137. regina/sageRegina/testsuite/repr.out +951 -0
  138. regina/sageRegina/testsuite/repr.out.v2 +951 -0
  139. regina/sageRegina/testsuite/repr.test +546 -0
  140. regina/sageRegina/testsuite/runbasic.in +75 -0
  141. regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
  142. regina/sageRegina/testsuite/safeheldtype_basic.test +111 -0
  143. regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
  144. regina/sageRegina/testsuite/safeheldtype_packet.test +179 -0
  145. regina/sageRegina/testsuite/sample.pdf +0 -0
  146. regina/sageRegina/testsuite/sets.out +7 -0
  147. regina/sageRegina/testsuite/sets.test +42 -0
  148. regina/sageRegina/testsuite/skeleton.out +308 -0
  149. regina/sageRegina/testsuite/skeleton.test +52 -0
  150. regina/sageRegina/testsuite/snappea.out +90 -0
  151. regina/sageRegina/testsuite/snappea.test +133 -0
  152. regina/sageRegina/testsuite/snapshot.out +15 -0
  153. regina/sageRegina/testsuite/snapshot.test +76 -0
  154. regina/sageRegina/testsuite/sort.out +78 -0
  155. regina/sageRegina/testsuite/sort.test +58 -0
  156. regina/sageRegina/testsuite/special.out +4 -0
  157. regina/sageRegina/testsuite/special.test +45 -0
  158. regina/sageRegina/testsuite/standardtri.out +12101 -0
  159. regina/sageRegina/testsuite/standardtri.test +453 -0
  160. regina/sageRegina/testsuite/surfaces.out +2133 -0
  161. regina/sageRegina/testsuite/surfaces.test +112 -0
  162. regina/sageRegina/testsuite/swapping.out +25 -0
  163. regina/sageRegina/testsuite/swapping.test +86 -0
  164. regina/sageRegina/testsuite/testall.in +174 -0
  165. regina/sageRegina/testsuite/testbasic.in +277 -0
  166. regina/sageRegina/testsuite/testcallback.in +148 -0
  167. regina/sageRegina/testsuite/testsub.in +148 -0
  168. regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
  169. regina/sageRegina/testsuite/tightencode.out +40 -0
  170. regina/sageRegina/testsuite/tightencode.test +106 -0
  171. regina/sageRegina/testsuite/treedecomp.out +135 -0
  172. regina/sageRegina/testsuite/treedecomp.test +64 -0
  173. regina/sageRegina/testsuite/treetraversal.out +52 -0
  174. regina/sageRegina/testsuite/treetraversal.test +188 -0
  175. regina/sageRegina/testsuite/trigeneral.out +1251 -0
  176. regina/sageRegina/testsuite/trigeneral.test +153 -0
  177. regina/sageRegina/testsuite/utf8.out +42 -0
  178. regina/sageRegina/testsuite/utf8.test +92 -0
  179. regina/sageRegina/testsuite/whitehead.tri +47 -0
  180. regina/sageRegina/version.py +5 -0
  181. regina/sageSetup.py +41 -0
  182. regina/test.py +6 -0
  183. regina-7.4.1.dist-info/METADATA +109 -0
  184. regina-7.4.1.dist-info/RECORD +186 -0
  185. regina-7.4.1.dist-info/WHEEL +6 -0
  186. regina-7.4.1.dist-info/top_level.txt +4 -0
@@ -0,0 +1,47 @@
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 the comparison operators behave as expected for Regina's
8
+ # python bindings.
9
+ #
10
+ # This file is a single component of Regina's python test suite. To run
11
+ # the python test suite, move to the main python directory in the source
12
+ # tree and run "make check".
13
+ #
14
+ # This program is free software; you can redistribute it and/or
15
+ # modify it under the terms of the GNU General Public License as
16
+ # published by the Free Software Foundation; either version 2 of the
17
+ # License, or (at your option) any later version.
18
+ #
19
+ # As an exception, when this program is distributed through (i) the
20
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
21
+ # (iii) Google Play by Google Inc., then that store may impose any
22
+ # digital rights management, device limits and/or redistribution
23
+ # restrictions that are required by its terms of service.
24
+ #
25
+ # This program is distributed in the hope that it will be useful, but
26
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
27
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28
+ # General Public License for more details.
29
+ #
30
+ # You should have received a copy of the GNU General Public License
31
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
32
+
33
+ r = [ Rational(0,0), Rational(1,3), Rational(1,2), Rational(1,0) ]
34
+
35
+ for a in r:
36
+ for b in r:
37
+ print(a < b, a <= b, a == b, a != b, a > b, a >= b)
38
+
39
+ # Note: Currently regina sorts invariant factors using the _reverse_ sequences.
40
+ # The five groups below are presented in the order that regina should sort them.
41
+
42
+ g = [ AbelianGroup(), AbelianGroup(2), AbelianGroup(2, [3]), AbelianGroup(2, [6]), AbelianGroup(2, [3, 6]) ]
43
+
44
+ for a in g:
45
+ for b in g:
46
+ print(a < b, a <= b, a == b, a != b, a > b, a >= b)
47
+
@@ -0,0 +1,120 @@
1
+ ----------
2
+ Empty link
3
+
4
+ Link link = Link::fromData({ });
5
+
6
+ link = Link.fromData([ ], [ ])
7
+
8
+ Empty link
9
+ ----------
10
+ 0-crossing knot: ( )
11
+
12
+ Link link = Link::fromData({ }, { 0 });
13
+
14
+ link = Link.fromData([ ], [[ ]])
15
+
16
+ 0-crossing knot: ( )
17
+ ----------
18
+ 0-crossing, 2-component link: ( ) ( )
19
+
20
+ Link link = Link::fromData({ }, { 0 }, { 0 });
21
+
22
+ link = Link.fromData([ ], [[ ], [ ]])
23
+
24
+ 0-crossing, 2-component link: ( ) ( )
25
+ ----------
26
+ 3-crossing knot: +++ ( ^0 _1 ^2 _0 ^1 _2 )
27
+
28
+ Link link = Link::fromData({ +1, +1, +1 }, { 1, -2, 3, -1, 2, -3 });
29
+
30
+ link = Link.fromData([ +1, +1, +1 ], [ 1, -2, 3, -1, 2, -3 ])
31
+
32
+ 3-crossing knot: +++ ( ^0 _1 ^2 _0 ^1 _2 )
33
+ ----------
34
+ 2-crossing, 2-component link: ++ ( ^0 _1 ) ( _0 ^1 )
35
+
36
+ Link link = Link::fromData({ +1, +1 }, { 1, -2 }, { -1, 2 });
37
+
38
+ link = Link.fromData([ +1, +1 ], [[ 1, -2 ], [ -1, 2 ]])
39
+
40
+ 2-crossing, 2-component link: ++ ( ^0 _1 ) ( _0 ^1 )
41
+ ----------
42
+ Empty 3-D triangulation
43
+
44
+ Triangulation<3> tri = Triangulation<3>::fromGluings(0, {
45
+ });
46
+
47
+ tri = Triangulation3.fromGluings(0, [
48
+ ])
49
+
50
+ Empty 3-D triangulation
51
+ ----------
52
+ Bounded orientable 2-D triangulation, f = ( 2 4 2 )
53
+
54
+ Triangulation<2> tri = Triangulation<2>::fromGluings(2, {
55
+ { 0, 0, 1, {2,0,1} }, { 0, 2, 1, {1,2,0} }});
56
+
57
+ tri = Triangulation2.fromGluings(2, [
58
+ [ 0, 0, 1, Perm3(2,0,1) ], [ 0, 2, 1, Perm3(1,2,0) ]])
59
+
60
+ Bounded orientable 2-D triangulation, f = ( 2 4 2 )
61
+ ----------
62
+ Bounded orientable 3-D triangulation, f = ( 4 6 4 1 )
63
+
64
+ Triangulation<3> tri = Triangulation<3>::fromGluings(1, {
65
+ });
66
+
67
+ tri = Triangulation3.fromGluings(1, [
68
+ ])
69
+
70
+ Bounded orientable 3-D triangulation, f = ( 4 6 4 1 )
71
+ ----------
72
+ Closed orientable 3-D triangulation, f = ( 1 6 10 5 )
73
+
74
+ Triangulation<3> tri = Triangulation<3>::fromGluings(5, {
75
+ { 0, 0, 1, {0,3,2,1} }, { 0, 1, 2, {3,0,1,2} },
76
+ { 0, 2, 3, {3,2,0,1} }, { 0, 3, 4, {3,1,2,0} },
77
+ { 1, 1, 2, {2,1,0,3} }, { 1, 2, 4, {2,3,1,0} },
78
+ { 1, 3, 3, {2,0,3,1} }, { 2, 2, 3, {1,2,3,0} },
79
+ { 2, 3, 4, {3,0,1,2} }, { 3, 2, 4, {1,2,3,0} }});
80
+
81
+ tri = Triangulation3.fromGluings(5, [
82
+ [ 0, 0, 1, Perm4(0,3,2,1) ], [ 0, 1, 2, Perm4(3,0,1,2) ],
83
+ [ 0, 2, 3, Perm4(3,2,0,1) ], [ 0, 3, 4, Perm4(3,1,2,0) ],
84
+ [ 1, 1, 2, Perm4(2,1,0,3) ], [ 1, 2, 4, Perm4(2,3,1,0) ],
85
+ [ 1, 3, 3, Perm4(2,0,3,1) ], [ 2, 2, 3, Perm4(1,2,3,0) ],
86
+ [ 2, 3, 4, Perm4(3,0,1,2) ], [ 3, 2, 4, Perm4(1,2,3,0) ]])
87
+
88
+ Closed orientable 3-D triangulation, f = ( 1 6 10 5 )
89
+ ----------
90
+ Ideal orientable 4-D triangulation, f = ( 1 1 4 5 2 )
91
+
92
+ Triangulation<4> tri = Triangulation<4>::fromGluings(2, {
93
+ { 0, 0, 0, {3,0,1,2,4} }, { 0, 1, 1, {0,4,1,2,3} },
94
+ { 0, 2, 1, {1,2,0,4,3} }, { 0, 4, 1, {0,1,4,3,2} },
95
+ { 1, 1, 1, {0,3,1,4,2} }});
96
+
97
+ tri = Triangulation4.fromGluings(2, [
98
+ [ 0, 0, 0, Perm5(3,0,1,2,4) ], [ 0, 1, 1, Perm5(0,4,1,2,3) ],
99
+ [ 0, 2, 1, Perm5(1,2,0,4,3) ], [ 0, 4, 1, Perm5(0,1,4,3,2) ],
100
+ [ 1, 1, 1, Perm5(0,3,1,4,2) ]])
101
+
102
+ Ideal orientable 4-D triangulation, f = ( 1 1 4 5 2 )
103
+ ----------
104
+ Possibly closed orientable 8-D triangulation, f = ( 9 36 84 126 126 84 36 9 2 )
105
+
106
+ Triangulation<8> tri = Triangulation<8>::fromGluings(2, {
107
+ { 0, 0, 1, {0,1,2,3,4,5,6,7,8} }, { 0, 1, 1, {0,1,2,3,4,5,6,7,8} },
108
+ { 0, 2, 1, {0,1,2,3,4,5,6,7,8} }, { 0, 3, 1, {0,1,2,3,4,5,6,7,8} },
109
+ { 0, 4, 1, {0,1,2,3,4,5,6,7,8} }, { 0, 5, 1, {0,1,2,3,4,5,6,7,8} },
110
+ { 0, 6, 1, {0,1,2,3,4,5,6,7,8} }, { 0, 7, 1, {0,1,2,3,4,5,6,7,8} },
111
+ { 0, 8, 1, {0,1,2,3,4,5,6,7,8} }});
112
+
113
+ tri = Triangulation8.fromGluings(2, [
114
+ [ 0, 0, 1, Perm9([0,1,2,3,4,5,6,7,8]) ], [ 0, 1, 1, Perm9([0,1,2,3,4,5,6,7,8]) ],
115
+ [ 0, 2, 1, Perm9([0,1,2,3,4,5,6,7,8]) ], [ 0, 3, 1, Perm9([0,1,2,3,4,5,6,7,8]) ],
116
+ [ 0, 4, 1, Perm9([0,1,2,3,4,5,6,7,8]) ], [ 0, 5, 1, Perm9([0,1,2,3,4,5,6,7,8]) ],
117
+ [ 0, 6, 1, Perm9([0,1,2,3,4,5,6,7,8]) ], [ 0, 7, 1, Perm9([0,1,2,3,4,5,6,7,8]) ],
118
+ [ 0, 8, 1, Perm9([0,1,2,3,4,5,6,7,8]) ]])
119
+
120
+ Possibly closed orientable 8-D triangulation, f = ( 9 36 84 126 126 84 36 9 2 )
@@ -0,0 +1,63 @@
1
+ # Regina - A Normal Surface Theory Calculator
2
+ # Python Test Suite Component
3
+ #
4
+ # Copyright (c) 2015-2025, Ben Burton
5
+ # For further details contact Ben Burton (bab@debian.org).
6
+ #
7
+ # Tests the behaviour of the various dumpConstruction() functions.
8
+ #
9
+ # This file is a single component of Regina's python test suite. To run
10
+ # the python test suite, move to the main python directory in the source
11
+ # tree and run "make check".
12
+ #
13
+ # This program is free software; you can redistribute it and/or
14
+ # modify it under the terms of the GNU General Public License as
15
+ # published by the Free Software Foundation; either version 2 of the
16
+ # License, or (at your option) any later version.
17
+ #
18
+ # As an exception, when this program is distributed through (i) the
19
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
20
+ # (iii) Google Play by Google Inc., then that store may impose any
21
+ # digital rights management, device limits and/or redistribution
22
+ # restrictions that are required by its terms of service.
23
+ #
24
+ # This program is distributed in the hope that it will be useful, but
25
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
26
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27
+ # General Public License for more details.
28
+ #
29
+ # You should have received a copy of the GNU General Public License
30
+ # along with this program. If not, see <https://www.gnu.org/licenses/>.
31
+
32
+ def testDump(obj):
33
+ print('----------')
34
+ print(obj)
35
+ print()
36
+
37
+ # For C++, just print the construction.
38
+ print(obj.source(Language.Cxx))
39
+
40
+ # For Python, print it _and_ test that it works.
41
+ code = obj.source()
42
+ print(code)
43
+ # As of Python 3.13 we need to set up our own locals dictionary (a result
44
+ # of PEP 667). See also: https://github.com/python/cpython/issues/118888
45
+ loc = {}
46
+ exec(code, globals(), loc)
47
+ if obj.__class__ == regina.Link:
48
+ print(loc['link'])
49
+ else:
50
+ print(loc['tri'])
51
+
52
+ testDump(Link())
53
+ testDump(Link(1))
54
+ testDump(Link(2))
55
+ testDump(ExampleLink.trefoil())
56
+ testDump(ExampleLink.hopf())
57
+
58
+ testDump(Triangulation3())
59
+ testDump(Example2.annulus())
60
+ testDump(Example3.ball())
61
+ testDump(Example3.poincare())
62
+ testDump(Example4.cappellShaneson())
63
+ testDump(Example8.sphere())
@@ -0,0 +1,14 @@
1
+ 0 a
2
+ 2 cPcbbbiht
3
+ 2 cPcbbbiht
4
+ 4 eLPkbdcddhgggb
5
+ 4 eLPkbdcddhgggb
6
+ 2 cPcbbbiht
7
+ 2 cPcbbbiht
8
+ 2 cPcbbbiht
9
+ Could not construct
10
+ 2 cPcbbbiht
11
+ Invalid constructor arguments
12
+ Invalid constructor arguments
13
+ Could not construct
14
+ Invalid constructor arguments
@@ -0,0 +1,95 @@
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 bindings for the different Triangulation3 constructors.
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 tri3From(*args):
33
+ try:
34
+ t = Triangulation3(*args)
35
+ print(t.size(), t.isoSig())
36
+ except InvalidArgument:
37
+ print('Could not construct')
38
+ except TypeError:
39
+ print('Invalid constructor arguments')
40
+ except Exception as e:
41
+ print('ERROR: Unexpected exception:', type(e))
42
+
43
+ # Empty
44
+ tri3From()
45
+
46
+ # Another triangulation
47
+ tri3From(Example3.figureEight())
48
+
49
+ # Another triangulation, without cloning properties
50
+ tri3From(Example3.figureEight(), False)
51
+
52
+ # Regina's SnapPeaTriangulation class
53
+ tri3From(ExampleSnapPea.whiteheadLink())
54
+
55
+ # Regina's SnapPeaTriangulation class, without cloning properties
56
+ tri3From(ExampleSnapPea.whiteheadLink(), False)
57
+
58
+ # Iso sig
59
+ tri3From('cPcbbbiht')
60
+
61
+ # Dehydration string
62
+ tri3From('cabbbbaei')
63
+
64
+ # SnapPea data file contents
65
+ tri3From(Example3.figureEight().snapPea())
66
+
67
+ # Junk (constructor should throw an exception)
68
+ tri3From('banana')
69
+
70
+ # Simulate what happens if we try to pass a SnapPy manifold or triangulation:
71
+ class SnapPyObject:
72
+ def _to_string(self):
73
+ return Example3.figureEight().snapPea()
74
+
75
+ class NotSnapPyObject:
76
+ def _other_string(self):
77
+ return Example3.figureEight().snapPea()
78
+
79
+ class JunkSnapPyObject:
80
+ def _other_string(self):
81
+ return 'banana'
82
+
83
+ class MisbehavedSnapPyObject:
84
+ def _to_string(self):
85
+ return 42
86
+
87
+ class UncallableSnapPyObject:
88
+ _to_string = 'cPcbbbiht'
89
+
90
+ tri3From(SnapPyObject())
91
+ tri3From(NotSnapPyObject())
92
+ tri3From(JunkSnapPyObject())
93
+ tri3From(MisbehavedSnapPyObject())
94
+ tri3From(UncallableSnapPyObject())
95
+
@@ -0,0 +1,87 @@
1
+ % orb
2
+ cube
3
+ SolutionType geometric_solution
4
+ vertices_known
5
+
6
+ 1 4 0.000 1 4 2vu 1uv
7
+ 2 1 0.000 1 2 2xv 1vw
8
+ 3 10 0.000 8 4 8wv 7vx
9
+ 4 0 1.000 5 2 6xv 5vw 1wx 2wx 10xv 9vw
10
+ 5 9 0.000 5 1 2xu 1uw
11
+ 6 0 1.000 5 4 8vu 7uv 10vu 2uw 1xu 5uv
12
+ 7 0 1.000 4 2 5xv 3ux 4wu 10vw 2vw 1xv
13
+ 8 12 0.000 2 6 6wv 9vx
14
+ 9 0 1.000 2 7 6xw 5xw 3wx 4wx 10xw 9xw
15
+ 10 2 0.000 2 3 4xu 3uw
16
+ 11 3 0.000 3 4 4vu 3uv
17
+ 12 11 0.000 3 7 4xv 3vw
18
+ 13 0 1.000 4 7 8wu 7ux 10wu 4vw 3xv 5ux
19
+ 14 8 0.000 5 8 8xv 7vw
20
+ 15 5 0.000 5 6 6vu 9uv
21
+ 16 0 1.000 7 5 8xu 7uw 10xu 9uw 6xu 5uw
22
+ 17 6 0.000 6 7 6wu 9ux
23
+ 18 7 0.000 8 7 8xw 7xw
24
+
25
+ 1 -0.4349533391534604 0.5731099791419046 0.3301014013470916 0.0000000000000000 0.0000000000000000
26
+ 2 -0.4349533391534603 0.5731099791419046 0.3301014013470914 0.0000000000000000 0.0000000000000000
27
+ 3 -0.4349533391534603 0.5731099791419045 0.3301014013470916 0.0000000000000000 0.0000000000000000
28
+ 4 -0.9903042040412748 0.3301014013470915 0.3301014013470914 1.1071487177940906 0.9272952180016123 1.1071487177940909 1.1071487177940909 0.9272952180016124 1.1071487177940906
29
+ 5 -0.4349533391534603 0.3301014013470915 0.5731099791419046 0.0000000000000000 0.0000000000000000
30
+ 6 -0.9903042040412748 0.3301014013470915 0.3301014013470916 1.1071487177940904 1.1071487177940904 0.9272952180016123 1.1071487177940904 1.1071487177940906 0.9272952180016123
31
+ 7 -0.9903042040412748 0.3301014013470916 0.3301014013470914 0.9272952180016123 1.1071487177940906 1.1071487177940906 0.9272952180016123 1.1071487177940906 1.1071487177940906
32
+ 8 -0.4349533391534603 0.3301014013470914 0.5731099791419046 0.0000000000000000 0.0000000000000000
33
+ 9 -0.9903042040412747 0.3301014013470914 0.3301014013470915 1.1071487177940904 0.9272952180016121 1.1071487177940906 1.1071487177940904 0.9272952180016123 1.1071487177940904
34
+ 10 -0.4349533391534603 0.3301014013470914 0.5731099791419045 0.0000000000000000 0.0000000000000000
35
+ 11 -0.4349533391534603 0.5731099791419045 0.3301014013470916 0.0000000000000000 0.0000000000000000
36
+ 12 -0.4349533391534603 0.5731099791419045 0.3301014013470915 0.0000000000000000 0.0000000000000000
37
+ 13 -0.9903042040412748 0.3301014013470916 0.3301014013470915 1.1071487177940904 1.1071487177940904 0.9272952180016123 1.1071487177940906 1.1071487177940906 0.9272952180016123
38
+ 14 -0.4349533391534603 0.3301014013470915 0.5731099791419045 0.0000000000000000 0.0000000000000000
39
+ 15 -0.4349533391534603 0.3301014013470915 0.5731099791419046 0.0000000000000000 0.0000000000000000
40
+ 16 -0.9903042040412747 0.3301014013470915 0.3301014013470915 1.1071487177940906 1.1071487177940906 0.9272952180016123 1.1071487177940904 1.1071487177940904 0.9272952180016121
41
+ 17 -0.4349533391534603 0.5731099791419046 0.3301014013470915 0.0000000000000000 0.0000000000000000
42
+ 18 -0.4349533391534603 0.5731099791419045 0.3301014013470915 0.0000000000000000 0.0000000000000000
43
+
44
+ 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
45
+ 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
46
+ 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
47
+ 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
48
+ 5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
49
+ 6 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
50
+ 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
51
+ 8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
52
+ 9 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
53
+ 10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
54
+ 11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
55
+ 12 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
56
+ 13 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
57
+ 14 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
58
+ 15 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
59
+ 16 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
60
+ 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
61
+ 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
62
+
63
+ 8
64
+ 0 54 35
65
+ 1 39 136
66
+ 2 180 165
67
+ 3 202 46
68
+ 4 89 61
69
+ 5 84 110
70
+ 6 155 124
71
+ 7 162 81
72
+
73
+ 12
74
+ 0 0 1 0
75
+ 1 1 2 0
76
+ 2 2 3 0
77
+ 3 3 0 0
78
+ 4 4 5 0
79
+ 5 5 6 0
80
+ 6 6 7 0
81
+ 7 7 4 0
82
+ 8 4 0 0
83
+ 9 7 3 0
84
+ 10 6 2 0
85
+ 11 5 1 0
86
+
87
+ 0
@@ -0,0 +1,3 @@
1
+ 0:4 #0
2
+ 1:0 #0
3
+ 3:1 #0
@@ -0,0 +1,38 @@
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 for issues relating to disc set iteration.
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.rp3rp3()
33
+ s = t.nonTrivialSphereOrDisc()
34
+ d = DiscSetSurface(s)
35
+
36
+ for spec in d:
37
+ print(spec)
38
+
@@ -0,0 +1,22 @@
1
+ #!/bin/sh
2
+ set -e
3
+
4
+ # This filter adjusts the names of pybind11 local modules so that
5
+ # they are independent of the C++ compiler that was used.
6
+ #
7
+ # It also makes tweaks to account for differences in help() output between
8
+ # Python 3.6 vs 3.8 and above (I'm not sure which way Python 3.7 goes),
9
+ # to account for the different ways that trailing whitespace is handled in
10
+ # Python <= 3.11 vs >= 3.12, to account for the differerent ways that the
11
+ # pybind11_object constructor is handled in Python <= 3.11 vs >= 3.12, and
12
+ # to account for the different ways that class methods are introduced in
13
+ # Python <= 3.13 vs >= 3.14.
14
+ #
15
+ # Note that BSD sed does not support \+, which is why we use \{1,\} instead.
16
+ # BSD sed also seems to have issues with \s and \S, so we avoid them too.
17
+
18
+ sed -e 's#\( \)__pybind11_module_local_\([a-zA-Z0-9_-]\{1,\}\) = .*\.\.\.#\1__pybind11_module_local__ = ...#' \
19
+ -e 's#\( \)Methods\( inherited from pybind11_builtins\.pybind11_object:\)$#\1Static methods\2#' \
20
+ -e 's#\(Help on \)method descriptor [a-zA-Z0-9_]\{1,\}\( in module\)#\1instancemethod\2#' \
21
+ -e 's# \{1,\}$##' \
22
+ -e 's# class method of pybind11_builtins\.pybind11_object# from pybind11_builtins\.pybind11_type#'