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,85 @@
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
+ # Prints basic properties of all wrapped objects and 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
+ import enum
33
+
34
+ def classInfo(name, object):
35
+ realName = object.__name__
36
+ if realName == name:
37
+ if name == 'Bitmask256' or name == 'Qitmask256':
38
+ # These classes are only present on 64-bit machines.
39
+ # Omit them here so that this test generates the same output
40
+ # across all platforms.
41
+ return
42
+ if object.__base__ is RuntimeError:
43
+ # Exception classes do not have equalityType.
44
+ print(name, ': exception')
45
+ else:
46
+ print(name, ': class ->', object.equalityType)
47
+ else:
48
+ print(name, ': alias ->', realName)
49
+
50
+ def enumInfo(name, object):
51
+ realName = object.__name__
52
+ if realName == name:
53
+ print(name, ': enum')
54
+ else:
55
+ print(name, ': alias -> enum', realName)
56
+
57
+ def functionInfo(name, object):
58
+ if not name.startswith('__'):
59
+ print(name, ': function')
60
+
61
+ def objectInfo(name, object):
62
+ # print(name, ': object')
63
+ pass
64
+
65
+ keys = sorted(regina.__dict__)
66
+
67
+ for i in keys:
68
+ object = regina.__dict__[i]
69
+ if isinstance(object, type):
70
+ if versionPybind11Major() == 2:
71
+ try:
72
+ tmp = object.__members__ # Exists for enums, not classes
73
+ enumInfo(i, object)
74
+ except AttributeError:
75
+ classInfo(i, object)
76
+ else:
77
+ # pybind11v3 provides native Python enum types.
78
+ if object.__base__ in [ enum.Enum, enum.Flag ]:
79
+ enumInfo(i, object)
80
+ else:
81
+ classInfo(i, object)
82
+ elif 'builtin_function_or_method' in str(object.__class__):
83
+ functionInfo(i, object)
84
+ else:
85
+ objectInfo(i, object)
@@ -0,0 +1,102 @@
1
+ -------------------------------
2
+ Empty triangulation
3
+ Vertex angle structures
4
+ -------------------------------
5
+
6
+ 1 vertex angle structure (no restrictions):
7
+
8
+
9
+
10
+ -------------------------------
11
+ Empty triangulation
12
+ Taut angle structures
13
+ -------------------------------
14
+
15
+ 1 vertex angle structure (taut only):
16
+
17
+
18
+
19
+ -------------------------------
20
+ Figure eight knot complement
21
+ Vertex angle structures
22
+ -------------------------------
23
+
24
+ 5 vertex angle structures (no restrictions):
25
+ 1 0 0 ; 1 0 0
26
+ 1 0 0 ; 0 1/2 1/2
27
+ 0 1/2 1/2 ; 1 0 0
28
+ 0 1 0 ; 0 0 1
29
+ 0 0 1 ; 0 1 0
30
+
31
+
32
+ -------------------------------
33
+ Figure eight knot complement
34
+ Taut angle structures
35
+ -------------------------------
36
+
37
+ 3 vertex angle structures (taut only):
38
+ 1 0 0 ; 1 0 0
39
+ 0 1 0 ; 0 0 1
40
+ 0 0 1 ; 0 1 0
41
+
42
+
43
+ -------------------------------
44
+ Whitehead link complement
45
+ Vertex angle structures
46
+ -------------------------------
47
+
48
+ 18 vertex angle structures (no restrictions):
49
+ 1/2 1/2 0 ; 1/2 1/2 0 ; 1 0 0 ; 0 0 1
50
+ 1/2 1/2 0 ; 1/2 1/2 0 ; 0 0 1 ; 1 0 0
51
+ 1/2 1/2 0 ; 1 0 0 ; 1/2 1/2 0 ; 0 0 1
52
+ 1/2 1/2 0 ; 0 0 1 ; 1/2 1/2 0 ; 1 0 0
53
+ 1 0 0 ; 1/2 1/2 0 ; 0 0 1 ; 1/2 1/2 0
54
+ 1 0 0 ; 1 0 0 ; 0 1 0 ; 0 1 0
55
+ 1 0 0 ; 1 0 0 ; 0 0 1 ; 0 0 1
56
+ 1 0 0 ; 0 1 0 ; 1 0 0 ; 0 1 0
57
+ 1 0 0 ; 0 0 1 ; 1/2 1/2 0 ; 1/2 1/2 0
58
+ 1 0 0 ; 0 0 1 ; 1 0 0 ; 0 0 1
59
+ 1 0 0 ; 0 0 1 ; 0 0 1 ; 1 0 0
60
+ 0 1 0 ; 1 0 0 ; 0 1 0 ; 1 0 0
61
+ 0 1 0 ; 0 1 0 ; 1 0 0 ; 1 0 0
62
+ 0 0 1 ; 1/2 1/2 0 ; 1 0 0 ; 1/2 1/2 0
63
+ 0 0 1 ; 1 0 0 ; 1/2 1/2 0 ; 1/2 1/2 0
64
+ 0 0 1 ; 1 0 0 ; 1 0 0 ; 0 0 1
65
+ 0 0 1 ; 1 0 0 ; 0 0 1 ; 1 0 0
66
+ 0 0 1 ; 0 0 1 ; 1 0 0 ; 1 0 0
67
+
68
+
69
+ -------------------------------
70
+ Whitehead link complement
71
+ Taut angle structures
72
+ -------------------------------
73
+
74
+ 10 vertex angle structures (taut only):
75
+ 1 0 0 ; 1 0 0 ; 0 1 0 ; 0 1 0
76
+ 1 0 0 ; 1 0 0 ; 0 0 1 ; 0 0 1
77
+ 1 0 0 ; 0 1 0 ; 1 0 0 ; 0 1 0
78
+ 1 0 0 ; 0 0 1 ; 1 0 0 ; 0 0 1
79
+ 1 0 0 ; 0 0 1 ; 0 0 1 ; 1 0 0
80
+ 0 1 0 ; 1 0 0 ; 0 1 0 ; 1 0 0
81
+ 0 1 0 ; 0 1 0 ; 1 0 0 ; 1 0 0
82
+ 0 0 1 ; 1 0 0 ; 1 0 0 ; 0 0 1
83
+ 0 0 1 ; 1 0 0 ; 0 0 1 ; 1 0 0
84
+ 0 0 1 ; 0 0 1 ; 1 0 0 ; 1 0 0
85
+
86
+
87
+ -------------------------------
88
+ Poincare homology sphere
89
+ Vertex angle structures
90
+ -------------------------------
91
+
92
+ 0 vertex angle structures (no restrictions):
93
+
94
+
95
+ -------------------------------
96
+ Poincare homology sphere
97
+ Taut angle structures
98
+ -------------------------------
99
+
100
+ 0 vertex angle structures (taut only):
101
+
102
+
@@ -0,0 +1,70 @@
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
+ # Provides various tests for angle structure enumeration.
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 dumpAngles(name, tri, triName, tautOnly = False):
33
+ try:
34
+ slist = regina.AngleStructures(tri, tautOnly)
35
+ except:
36
+ print("-------------------------------")
37
+ print(name)
38
+ print('ENUMERATION FAILED')
39
+ print("-------------------------------")
40
+ print()
41
+ return
42
+
43
+ print("-------------------------------")
44
+ print(triName)
45
+ print(name)
46
+ print("-------------------------------")
47
+ print()
48
+
49
+ # Dump the angle structures in sort order, since we don't really mind if
50
+ # the ordering changes between releases.
51
+ structures = slist.detail().split('\n')
52
+ structures.sort()
53
+ # Let the text headers appear up top.
54
+ structures.reverse()
55
+ for s in structures:
56
+ print(s)
57
+
58
+ # Nothing else to say.
59
+ print()
60
+
61
+ def angleStats(tri, triName):
62
+ dumpAngles('Vertex angle structures', tri, triName, False)
63
+ dumpAngles('Taut angle structures', tri, triName, True)
64
+
65
+ t = regina.Triangulation3()
66
+ angleStats(t, 'Empty triangulation')
67
+
68
+ angleStats(regina.Example3.figureEight(), 'Figure eight knot complement')
69
+ angleStats(regina.Example3.whiteheadLink(), 'Whitehead link complement')
70
+ angleStats(regina.Example3.poincare(), 'Poincare homology sphere')
@@ -0,0 +1,86 @@
1
+ 0 True
2
+ --------
3
+ K_1^3 K_3 K_4^2 False
4
+ Exception caught
5
+ Exception caught
6
+ K_1^3 K_3 K_4^2 False
7
+ 2 K_1^3 K_3 K_4^2 False K_1^3 K_3 K_4^2 False
8
+ 0 True K_1^3 K_3 K_4^2 False
9
+ --------
10
+ Exception caught
11
+ Exception caught
12
+ (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1 False
13
+ --------
14
+ (-A^-1 + 3 A^-2) K_1
15
+ (-A^2 + 2 A^-1) + (-2 A^-1 + 6 A^-2) K_1
16
+ -A^2 + 2 A^-1
17
+ (-A^2 + 2 A^-1) + (-2 A^-1 + 6 A^-2) K_1
18
+ A^2 - 2 A^-1
19
+ (A^2 - 2 A^-1) + (A^-1 - 3 A^-2) K_1
20
+ --------
21
+ (-A^2 + 2 A^-1) + (-2 A^-1 + 6 A^-2) K_1
22
+ (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1
23
+ -A^2 + 2 A^-1
24
+ --------
25
+ (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1 vs (-A^-1 + 3 A^-2) K_1
26
+ (-A^-1 + 3 A^-2) K_1 vs (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1
27
+ (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1 vs (-A^-1 + 3 A^-2) K_1
28
+ --------
29
+ (3 A^2 - 6 A^-1) + (3 A^-1 - 9 A^-2) K_1
30
+ (3 A^2 - 6 A^-1) + (3 A^-1 - 9 A^-2) K_1
31
+ (-A^4 + 2 A) + (-A + 3) K_1
32
+ (-A^4 + 2 A) + (-A + 3) K_1
33
+ --------
34
+ -x^2 + 2 x^-1
35
+ -x^-1 + 3 x^-2
36
+ 0
37
+ 0
38
+ (-A^2 + 2 A^-1) + (-5 A^5 + 2 A^3) K_2 + (-A^-1 + 3 A^-2) K_1
39
+ -5 x^5 + 2 x^3
40
+ Exception caught
41
+ (-A^2 + 2 A^-1) + (-A^-1 + 3 A^-2) K_1
42
+ --------
43
+ (3 A^2 - 6 A^-1) + (3 A^-1 - 9 A^-2) K_1
44
+ (3 A^4 - 6 A) + (3 A - 9) K_1
45
+ --------
46
+ (3 A^2 - 6 A^-1) + (3 A^-1 - 9 A^-2) K_1
47
+ (-3 A^2 + 6 A^-1) + (-3 A^-1 + 9 A^-2) K_1
48
+ (6 A - 3 A^-2) + (9 A^2 - 3 A) K_1
49
+ (6 A^2 - 3 A^-4) + (9 A^4 - 3 A^2) K_1
50
+ (-3 A^2 + 6 A^-1) + (-3 A^-1 + 9 A^-2) K_1
51
+ --------
52
+ SLJOMMVKJLMNNM
53
+ (-3 A^2 + 6 A^-1) + (-3 A^-1 + 9 A^-2) K_1
54
+ 0 True
55
+ M
56
+ 0
57
+ --------
58
+ A^-4 + (A^-6 - A^-10) K_1
59
+ A^-4 + (A^-6 - A^-10) K_1
60
+ 3 A^-4 + (A^-6 - A^-10) K_1
61
+ (A^-6 - A^-10) K_1
62
+ Exception caught
63
+ Exception caught
64
+ True
65
+ False
66
+ False
67
+ True
68
+ --------
69
+ 1-crossing, 2-component virtual link: - ( ^0 ) ( _0 )
70
+ -A^2 - A^4 K_1
71
+ 3-crossing virtual knot: ++- ( ^0 _1 ^2 _0 ^1 _2 )
72
+ A^-8 + (1 - A^-8) K_1^2
73
+ 4-crossing virtual knot: +-+- ( ^0 _1 ^3 _2 _3 ^2 _0 ^1 )
74
+ (A^4 + 1 + A^-4) + 2 K_2 + (-A^4 - 2 - A^-4) K_1^2
75
+ 5-crossing virtual knot: ++--- ( ^0 _2 ^3 _0 ^1 _4 ^2 _3 ^4 _1 )
76
+ 1
77
+ 4-crossing virtual knot: +-++ ( ^0 _1 _2 _0 ^2 ^3 ^1 _3 )
78
+ (2 A^-4 + A^-8) + (A^-4 + A^-8) K_2 + (A^-6 - A^-10) K_1 + (-2 A^-4 - 2 A^-8) K_1^2
79
+ 4-crossing virtual knot: ---+ ( ^0 ^1 ^2 ^3 _0 _2 _1 _3 )
80
+ A^8 + A^10 K_3 + A^6 K_1 + (-A^10 - A^6) K_1 K_2 + (-A^8 + 1) K_1^2
81
+ 4-crossing virtual knot: ---+ ( ^0 ^1 _2 ^3 _1 _0 ^2 _3 )
82
+ A^8 + A^6 K_3 + A^10 K_1 + (-A^10 - A^6) K_1 K_2 + (-A^8 + 1) K_1^2
83
+ 3-crossing, 2-component virtual link: +++ ( ^0 _1 ^2 ) ( _0 ^1 _2 )
84
+ -A^-6 + (-A^-8 + A^-12 - A^-16) K_1
85
+ 3-crossing, 2-component virtual link: --- ( ^2 _1 ^0 ) ( _0 ^1 _2 )
86
+ (-A^10 + A^6 - A^2) - A^12 K_1
@@ -0,0 +1,224 @@
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
+ # Provides some simple tests for arrow polynomials.
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
+ a = Arrow()
33
+ print(a, a.isZero())
34
+
35
+ print('--------')
36
+
37
+ a.initDiagram(3, 0, 1, 2)
38
+ print(a, a.isZero())
39
+
40
+ try:
41
+ a.initDiagram(3, 0, 'a')
42
+ except InvalidArgument:
43
+ print('Exception caught')
44
+
45
+ try:
46
+ a.initDiagram(1, 1, 0)
47
+ except InvalidArgument:
48
+ print('Exception caught')
49
+
50
+ print(a, a.isZero())
51
+ b = Arrow(a)
52
+ a += a
53
+ print(a, a.isZero(), b, b.isZero())
54
+ a -= a
55
+ print(a, a.isZero(), b, b.isZero())
56
+
57
+ print('--------')
58
+
59
+ a.set(Laurent(-1, [2, 0, 0, -1]))
60
+ a.set(1, Laurent(-2, [3, -1]))
61
+
62
+ try:
63
+ a.set(3, 0)
64
+ except InvalidArgument:
65
+ print('Exception caught')
66
+
67
+ try:
68
+ a.set(2, 0, Laurent(-2, [3, -1]))
69
+ except InvalidArgument:
70
+ print('Exception caught')
71
+
72
+ print(a, a.isZero())
73
+
74
+ print('--------')
75
+
76
+ b = Arrow()
77
+ b.set(1, Laurent(-2, [3, -1]))
78
+ print(b)
79
+ print(a + b)
80
+ print(a - b)
81
+ print(b + a)
82
+ print(b - a)
83
+ print(- a)
84
+
85
+ print('--------')
86
+
87
+ a += b
88
+ print(a)
89
+ a -= b
90
+ print(a)
91
+ a -= b
92
+ print(a)
93
+
94
+ print('--------')
95
+
96
+ a += b
97
+ print(a, 'vs', b)
98
+ a.swap(b)
99
+ print(a, 'vs', b)
100
+ swap(b, a)
101
+ print(a, 'vs', b)
102
+
103
+ print('--------')
104
+
105
+ print(a * -3)
106
+ print(-3 * a)
107
+ print(a * Laurent(2, [1]))
108
+ print(Laurent(2, [1]) * a)
109
+
110
+ print('--------')
111
+
112
+ print(a[[]])
113
+ print(a[[1]])
114
+ print(a[[2]])
115
+ print(a[[0, 1]])
116
+ a[[0, 1]] = Laurent(3, [2, 0, -5])
117
+ print(a)
118
+ print(a[[0, 1]])
119
+
120
+ try:
121
+ print(a[[0, 1, 0]])
122
+ except InvalidArgument:
123
+ print('Exception caught')
124
+
125
+ a[[0, 1]] = Laurent()
126
+ print(a)
127
+
128
+ print('--------')
129
+
130
+ a *= -3
131
+ print(a)
132
+ a *= Laurent(2, [1])
133
+ print(a)
134
+
135
+ print('--------')
136
+
137
+ a.shift(-2)
138
+ print(a)
139
+ a.negate()
140
+ print(a)
141
+ a.invertA()
142
+ print(a)
143
+ a.scaleUp(2)
144
+ print(a)
145
+ a.scaleDown(-2)
146
+ print(a)
147
+
148
+ print('--------')
149
+
150
+ print(a.tightEncoding())
151
+ print(Arrow.tightDecoding(a.tightEncoding()))
152
+ a.init()
153
+ print(a, a.isZero())
154
+ print(a.tightEncoding())
155
+ print(Arrow.tightDecoding(a.tightEncoding()))
156
+
157
+ print('--------')
158
+
159
+ print(Arrow([([], Laurent(-4, [1])), ([1], Laurent(-10, [-1,0,0,0,1]))]))
160
+ print(Arrow([([], (-4, [1])), ([1], (-10, [-1,0,0,0,1]))]))
161
+ print(Arrow([([], (-4, [1])), ([], (-4, [2])), ([1], (-10, [-1,0,0,0,1]))]))
162
+ print(Arrow([([], (-4, [1])), ([], (-4, [-1])), ([1], (-10, [-1,0,0,0,1]))]))
163
+
164
+ try:
165
+ print(Arrow([([], (-4, [1])), ([1, 'a'], (-10, [-1,0,0,0,1]))]))
166
+ except InvalidArgument:
167
+ print('Exception caught')
168
+
169
+ try:
170
+ print(Arrow([([], (-4, [1])), ([1, -2], (-10, [-1,0,0,0,1]))]))
171
+ except InvalidArgument:
172
+ print('Exception caught')
173
+
174
+ laurent = Laurent(-2, [4,0,0,-1])
175
+ print(Arrow([([], laurent)]) == laurent)
176
+ print(Arrow([([1], laurent)]) == laurent)
177
+ print(Arrow([([], laurent), ([1], laurent)]) == laurent)
178
+ print(Arrow([([], laurent), ([1], laurent)])[[1]] == laurent)
179
+
180
+ print('--------')
181
+
182
+ # Compute some actual arrow polynomials.
183
+ # The following examples are all taken from Dye & Kauffman, JKTR 18 (2009).
184
+ # These are also in the C++ test suite; see there for further discussion
185
+ # (including the reasons why some of our answers differ from Dye-Kauffman).
186
+
187
+ # Section 3.1: Virtual Hopf link
188
+ l = Link.fromData([-1], [[1], [-1]])
189
+ print(l); print(l.arrow())
190
+
191
+ # Section 3.2: Virtualised trefoil (not the virtual trefoil!)
192
+ l = Link.fromData([+1, +1, -1], [1, -2, 3, -1, 2, -3])
193
+ print(l); print(l.arrow())
194
+
195
+ # Section 3.3: Kishino's knot
196
+ l = Link.fromData([+1, -1, +1, -1], [1, -2, 4, -3, -4, 3, -1, 2])
197
+ print(l); print(l.arrow())
198
+
199
+ # Section 3.4: Slavik's knot
200
+ l = Link.fromData([+1, +1, -1, -1, -1], [1, -3, 4, -1, 2, -5, 3, -4, 5, -2])
201
+ print(l); print(l.arrow())
202
+
203
+ # Section 3.5: Miyazawa's knot
204
+ # Note: our answer differs by sign (+/-) for the coefficient of K_1^2 A^-4.
205
+ # However: our answer is consistent with the Jones polynomial for that same
206
+ # knot, and so it seems likely that the sign error is in the Dye-Kauffman paper.
207
+ l = Link.fromData([+1, -1, +1, +1], [1, -2, -3, -1, 3, 4, 2, -4])
208
+ print(l); print(l.arrow())
209
+
210
+ # Section 3.6: Two knots differentiated only by K_1 and K_3
211
+ l1 = Link.fromSignedGauss('O1-O2-O3-O4+U1-U3-U2-U4+') # knot 4.93
212
+ l2 = Link.fromSignedGauss('O1-O2-U3-O4+U2-U1-O3-U4+') # knot 4.103
213
+ print(l1); print(l1.arrow());
214
+ print(l2); print(l2.arrow());
215
+
216
+ # Section 3.8: Two virtual torus links
217
+ # Note: In the Dye-Kauffman paper, the polynomials for these links do not
218
+ # appear to be normalised using the writhe (though this is perhaps explicitly
219
+ # noted in the paper since they use the subscript <..>_A instead of <..>_NA.
220
+ l1 = Link.fromData([+1, +1, +1], [[1, -2, 3], [-1, 2, -3]])
221
+ l2 = Link.fromData([-1, -1, -1], [[3, -2, 1], [-1, 2, -3]])
222
+ print(l1); print(l1.arrow());
223
+ print(l2); print(l2.arrow());
224
+
@@ -0,0 +1,2 @@
1
+ cde
2
+ [2, 3, 4]
@@ -0,0 +1,37 @@
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
+ # Some simple tests for base64 encoders and decoders.
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
+ enc = Base64SigEncoder()
33
+ enc.encodeInts([2,3,4], 1)
34
+ print(enc.str())
35
+
36
+ dec = Base64SigDecoder('cdefg')
37
+ print(dec.decodeInts(3, 1))