regina 7.3.1.1__cp311-cp311-macosx_10_9_x86_64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of regina might be problematic. Click here for more details.

Files changed (162) hide show
  1. regina/.dylibs/libgmp.10.dylib +0 -0
  2. regina/.dylibs/libgmpxx.4.dylib +0 -0
  3. regina/__init__.py +203 -0
  4. regina/engine.cpython-311-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 +132 -0
  16. regina/sageRegina/testsuite/CMakeLists.txt +60 -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 +20 -0
  20. regina/sageRegina/testsuite/alltypes.out +1551 -0
  21. regina/sageRegina/testsuite/alltypes.test +88 -0
  22. regina/sageRegina/testsuite/angles.out +102 -0
  23. regina/sageRegina/testsuite/angles.test +72 -0
  24. regina/sageRegina/testsuite/basic_callback.out +124 -0
  25. regina/sageRegina/testsuite/basic_sub.out +7 -0
  26. regina/sageRegina/testsuite/bool.out +6 -0
  27. regina/sageRegina/testsuite/bool.test +64 -0
  28. regina/sageRegina/testsuite/bytes.out +17 -0
  29. regina/sageRegina/testsuite/bytes.test +78 -0
  30. regina/sageRegina/testsuite/callbacks.out +515 -0
  31. regina/sageRegina/testsuite/callbacks.test +281 -0
  32. regina/sageRegina/testsuite/census.out +120 -0
  33. regina/sageRegina/testsuite/census.test +157 -0
  34. regina/sageRegina/testsuite/clone.out +18 -0
  35. regina/sageRegina/testsuite/clone.test +101 -0
  36. regina/sageRegina/testsuite/constructors.out +14 -0
  37. regina/sageRegina/testsuite/constructors.test +97 -0
  38. regina/sageRegina/testsuite/cube.orb +87 -0
  39. regina/sageRegina/testsuite/discs.out +3 -0
  40. regina/sageRegina/testsuite/discs.test +40 -0
  41. regina/sageRegina/testsuite/docstrings.filter +19 -0
  42. regina/sageRegina/testsuite/docstrings.out +808 -0
  43. regina/sageRegina/testsuite/docstrings.out.v3 +808 -0
  44. regina/sageRegina/testsuite/docstrings.test +57 -0
  45. regina/sageRegina/testsuite/dodec.orb +309 -0
  46. regina/sageRegina/testsuite/embeddings.out +23 -0
  47. regina/sageRegina/testsuite/embeddings.test +89 -0
  48. regina/sageRegina/testsuite/enumerate.out +62 -0
  49. regina/sageRegina/testsuite/enumerate.test +82 -0
  50. regina/sageRegina/testsuite/equality.out +112 -0
  51. regina/sageRegina/testsuite/equality.test +310 -0
  52. regina/sageRegina/testsuite/euler.out +15 -0
  53. regina/sageRegina/testsuite/euler.test +95 -0
  54. regina/sageRegina/testsuite/exception.out +7 -0
  55. regina/sageRegina/testsuite/exception.test +100 -0
  56. regina/sageRegina/testsuite/facenumbering.out +546 -0
  57. regina/sageRegina/testsuite/facenumbering.test +74 -0
  58. regina/sageRegina/testsuite/faces.out +40 -0
  59. regina/sageRegina/testsuite/faces.test +72 -0
  60. regina/sageRegina/testsuite/file.out +1229 -0
  61. regina/sageRegina/testsuite/file.test +70 -0
  62. regina/sageRegina/testsuite/file1.rga +0 -0
  63. regina/sageRegina/testsuite/file2.rga +0 -0
  64. regina/sageRegina/testsuite/file3.rga +119 -0
  65. regina/sageRegina/testsuite/flype.out +37 -0
  66. regina/sageRegina/testsuite/flype.test +50 -0
  67. regina/sageRegina/testsuite/generic.out +116 -0
  68. regina/sageRegina/testsuite/generic.test +76 -0
  69. regina/sageRegina/testsuite/groups.out +70 -0
  70. regina/sageRegina/testsuite/groups.test +117 -0
  71. regina/sageRegina/testsuite/hypersurfaces.out +681 -0
  72. regina/sageRegina/testsuite/hypersurfaces.test +90 -0
  73. regina/sageRegina/testsuite/i18n-latin1.rga +8 -0
  74. regina/sageRegina/testsuite/i18n-utf8.rga +8 -0
  75. regina/sageRegina/testsuite/i18n.out +6 -0
  76. regina/sageRegina/testsuite/i18n.test +91 -0
  77. regina/sageRegina/testsuite/id.out +2 -0
  78. regina/sageRegina/testsuite/id.test +47 -0
  79. regina/sageRegina/testsuite/index.out +2 -0
  80. regina/sageRegina/testsuite/index.test +43 -0
  81. regina/sageRegina/testsuite/integer.out +74 -0
  82. regina/sageRegina/testsuite/integer.test +56 -0
  83. regina/sageRegina/testsuite/italian.orb +90 -0
  84. regina/sageRegina/testsuite/iterators.out +118 -0
  85. regina/sageRegina/testsuite/iterators.test +128 -0
  86. regina/sageRegina/testsuite/knotted-Y.orb +47 -0
  87. regina/sageRegina/testsuite/listener.out +43 -0
  88. regina/sageRegina/testsuite/listener.test +101 -0
  89. regina/sageRegina/testsuite/listview.out +416 -0
  90. regina/sageRegina/testsuite/listview.test +253 -0
  91. regina/sageRegina/testsuite/lookup.out +13 -0
  92. regina/sageRegina/testsuite/lookup.test +44 -0
  93. regina/sageRegina/testsuite/memory1.out +62 -0
  94. regina/sageRegina/testsuite/memory1.test +154 -0
  95. regina/sageRegina/testsuite/memory2.out +62 -0
  96. regina/sageRegina/testsuite/memory2.test +124 -0
  97. regina/sageRegina/testsuite/memory3.out +92 -0
  98. regina/sageRegina/testsuite/memory3.test +216 -0
  99. regina/sageRegina/testsuite/misc.out +7 -0
  100. regina/sageRegina/testsuite/misc.test +56 -0
  101. regina/sageRegina/testsuite/operators.out +129 -0
  102. regina/sageRegina/testsuite/operators.test +61 -0
  103. regina/sageRegina/testsuite/orb.out +441 -0
  104. regina/sageRegina/testsuite/orb.test +49 -0
  105. regina/sageRegina/testsuite/pdf.out +4 -0
  106. regina/sageRegina/testsuite/pdf.test +49 -0
  107. regina/sageRegina/testsuite/perm.out +55 -0
  108. regina/sageRegina/testsuite/perm.test +96 -0
  109. regina/sageRegina/testsuite/plantri.out +12 -0
  110. regina/sageRegina/testsuite/plantri.test +60 -0
  111. regina/sageRegina/testsuite/presentations.out +11 -0
  112. regina/sageRegina/testsuite/presentations.test +61 -0
  113. regina/sageRegina/testsuite/refs.out +51 -0
  114. regina/sageRegina/testsuite/refs.test +128 -0
  115. regina/sageRegina/testsuite/repr.out +951 -0
  116. regina/sageRegina/testsuite/repr.out.v3 +951 -0
  117. regina/sageRegina/testsuite/repr.test +548 -0
  118. regina/sageRegina/testsuite/safeheldtype_basic.out +17 -0
  119. regina/sageRegina/testsuite/safeheldtype_basic.test +113 -0
  120. regina/sageRegina/testsuite/safeheldtype_packet.out +58 -0
  121. regina/sageRegina/testsuite/safeheldtype_packet.test +181 -0
  122. regina/sageRegina/testsuite/sample.pdf +0 -0
  123. regina/sageRegina/testsuite/sets.out +7 -0
  124. regina/sageRegina/testsuite/sets.test +44 -0
  125. regina/sageRegina/testsuite/skeleton.out +308 -0
  126. regina/sageRegina/testsuite/skeleton.test +54 -0
  127. regina/sageRegina/testsuite/snappea.out +82 -0
  128. regina/sageRegina/testsuite/snappea.test +107 -0
  129. regina/sageRegina/testsuite/snapshot.out +15 -0
  130. regina/sageRegina/testsuite/snapshot.test +78 -0
  131. regina/sageRegina/testsuite/sort.out +57 -0
  132. regina/sageRegina/testsuite/sort.test +53 -0
  133. regina/sageRegina/testsuite/special.out +4 -0
  134. regina/sageRegina/testsuite/special.test +47 -0
  135. regina/sageRegina/testsuite/standardtri.out +12101 -0
  136. regina/sageRegina/testsuite/standardtri.test +455 -0
  137. regina/sageRegina/testsuite/surfaces.out +2133 -0
  138. regina/sageRegina/testsuite/surfaces.test +114 -0
  139. regina/sageRegina/testsuite/swapping.out +25 -0
  140. regina/sageRegina/testsuite/swapping.test +88 -0
  141. regina/sageRegina/testsuite/testall.in +176 -0
  142. regina/sageRegina/testsuite/testbasic.in +279 -0
  143. regina/sageRegina/testsuite/testcallback.in +150 -0
  144. regina/sageRegina/testsuite/testsub.in +150 -0
  145. regina/sageRegina/testsuite/theta_in_solid_torus.orb +65 -0
  146. regina/sageRegina/testsuite/tightencode.out +40 -0
  147. regina/sageRegina/testsuite/tightencode.test +108 -0
  148. regina/sageRegina/testsuite/treedecomp.out +135 -0
  149. regina/sageRegina/testsuite/treedecomp.test +66 -0
  150. regina/sageRegina/testsuite/treetraversal.out +52 -0
  151. regina/sageRegina/testsuite/treetraversal.test +190 -0
  152. regina/sageRegina/testsuite/trigeneral.out +1251 -0
  153. regina/sageRegina/testsuite/trigeneral.test +155 -0
  154. regina/sageRegina/testsuite/utf8.out +42 -0
  155. regina/sageRegina/testsuite/utf8.test +94 -0
  156. regina/sageRegina/version.py +5 -0
  157. regina/sageSetup.py +41 -0
  158. regina/test.py +6 -0
  159. regina-7.3.1.1.dist-info/METADATA +109 -0
  160. regina-7.3.1.1.dist-info/RECORD +162 -0
  161. regina-7.3.1.1.dist-info/WHEEL +6 -0
  162. regina-7.3.1.1.dist-info/top_level.txt +4 -0
@@ -0,0 +1,150 @@
1
+ #!/bin/bash
2
+ #
3
+ # Regina - A Normal Surface Theory Calculator
4
+ # Python Test Suite Runner
5
+ #
6
+ # Copyright (c) 2007-2025, Ben Burton
7
+ # For further details contact Ben Burton (bab@debian.org).
8
+ #
9
+ # Usage: testcallback
10
+ #
11
+ # Runs some simple tests to ensure that Regina's Python module is playing
12
+ # nicely with pure Python callbacks in embedded subinterpreters.
13
+ #
14
+ # This script MUST be run from the python/testsuite directory in the
15
+ # build tree. It runs everything directly out of the build tree.
16
+ # It does not require regina to be installed on the system (and indeed
17
+ # it ignores any installation that it might find).
18
+ #
19
+ # This program is free software; you can redistribute it and/or
20
+ # modify it under the terms of the GNU General Public License as
21
+ # published by the Free Software Foundation; either version 2 of the
22
+ # License, or (at your option) any later version.
23
+ #
24
+ # As an exception, when this program is distributed through (i) the
25
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
26
+ # (iii) Google Play by Google Inc., then that store may impose any
27
+ # digital rights management, device limits and/or redistribution
28
+ # restrictions that are required by its terms of service.
29
+ #
30
+ # This program is distributed in the hope that it will be useful, but
31
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33
+ # General Public License for more details.
34
+ #
35
+ # You should have received a copy of the GNU General Public
36
+ # License along with this program; if not, write to the Free
37
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
38
+ # MA 02110-1301, USA.
39
+
40
+ set -e
41
+
42
+ # To see the output, you need to run:
43
+ # make test ARGS="-V"
44
+
45
+ executable=./basic_callback
46
+ testdir='@BASH_CMAKE_SOURCE_DIR@/python/testsuite'
47
+ testoutdir=`mktemp -d -t regina.XXX`
48
+
49
+ # REGINA_HOME can be deduced from the executable path, but on Windows this
50
+ # deduction gives the wrong style of path (windows vs unix style) for use
51
+ # with the embedded basic Python interpreter. Fix it explicitly here.
52
+ export REGINA_HOME=../../engine
53
+
54
+ echo "---------------------------------------------------------"
55
+ echo "Testing pure python callbacks in embedded subinterpreters"
56
+ echo "---------------------------------------------------------"
57
+ echo
58
+
59
+ if ! test -f ../../CMakeCache.txt -a -f "$executable"; then
60
+ echo "ERROR: You do not appear to be within the python/testsuite directory"
61
+ echo " in the build tree. This script must be run from directly"
62
+ echo " within the build tree (where you ran cmake)."
63
+ echo " Please change into the python/testsuite directory in the"
64
+ echo " build tree and try again."
65
+ exit 1
66
+ fi
67
+
68
+ # Make sure Python will be able to import regina.
69
+ os='@CMAKE_SYSTEM_NAME@'
70
+ case "$os" in
71
+ Darwin )
72
+ export DYLD_LIBRARY_PATH="../../engine:$DYLD_LIBRARY_PATH"
73
+ export PYTHONPATH="..:$PYTHONPATH"
74
+ ;;
75
+ Windows )
76
+ # The PYTHONHOME directory is incorrectly hard-coded in msys2.
77
+ # Work out the correct value by asking the python interpreter directly.
78
+ PYTHON='@BASH_Python_EXECUTABLE@'
79
+ if [ ! -e "$PYTHON" ]; then
80
+ echo "ERROR: Python interpreter not found: $PYTHON"
81
+ exit 1
82
+ fi
83
+ export PYTHONHOME="`"$PYTHON" -c 'import sys; print(sys.prefix)'`"
84
+ if [ ! -d "$PYTHONHOME" ]; then
85
+ echo "ERROR: Python home not found: $PYTHONHOME"
86
+ exit 1
87
+ fi
88
+
89
+ export PATH="../../engine:$PATH"
90
+ export PYTHONPATH="..;$PYTHONPATH"
91
+ ;;
92
+ * )
93
+ export LD_LIBRARY_PATH="../../engine:$LD_LIBRARY_PATH"
94
+ export PYTHONPATH="..:$PYTHONPATH"
95
+ ;;
96
+ esac
97
+
98
+ expected="$testdir/basic_callback.out"
99
+ observed="$testoutdir/basic_callback.out"
100
+
101
+ # Since we have "set -e", we need "&& dummy=" to prevent this line to
102
+ # just exit the bash script when the test has non-zero exit code.
103
+ # We use && as opposed to || in order to preserve the exit code from
104
+ # the first command.
105
+ #
106
+ # The code that unsets TERM fixes an issue seen some years ago on
107
+ # Fedora, where (as a result of a more exotic TERM setting) unprintable
108
+ # characters were being dumped at the beginning of the python output.
109
+ #
110
+ echo -n "Running callback test ... "
111
+ TERM= PYTHONIOENCODING=utf8 "$executable" > "$observed" 2>&1 && dummy=
112
+
113
+ # Catch exitcode.
114
+ exitcode=$?
115
+
116
+ # Branch based on exit code.
117
+ broken=
118
+ if [ "$exitcode" -ne 0 ]; then
119
+ echo "FAILED (exit code $exitcode)"
120
+ echo " Output was:"
121
+ echo " ..."
122
+ tail -n 5 $observed | sed -e 's/^/ /'
123
+ broken=1
124
+ else
125
+ if ! ( diff --strip-trailing-cr "$expected" "$observed" > /dev/null ); then
126
+ echo "FAILED (output differs from expected)"
127
+ echo " Diff was:"
128
+ diff --strip-trailing-cr -u \
129
+ --label 'Expected output' --label 'Actual output' \
130
+ "$expected" "$observed" | head -n200 | sed -e 's/^/ /'
131
+ echo " ..."
132
+ broken=1
133
+ else
134
+ echo "ok"
135
+ rm -f "$observed"
136
+ fi
137
+ fi
138
+
139
+ if test -n "$broken"; then
140
+ echo
141
+ echo "The full output file(s) produced by Regina are in the directory:"
142
+ echo " $testoutdir"
143
+ exit 1
144
+ else
145
+ rmdir "$testoutdir"
146
+ fi
147
+
148
+ echo
149
+ echo "Test passed!"
150
+ exit 0
@@ -0,0 +1,150 @@
1
+ #!/bin/bash
2
+ #
3
+ # Regina - A Normal Surface Theory Calculator
4
+ # Python Test Suite Runner
5
+ #
6
+ # Copyright (c) 2007-2025, Ben Burton
7
+ # For further details contact Ben Burton (bab@debian.org).
8
+ #
9
+ # Usage: testsub
10
+ #
11
+ # Runs some simple tests to ensure that Regina's Python module is playing
12
+ # nicely with Python subinterpreters.
13
+ #
14
+ # This script MUST be run from the python/testsuite directory in the
15
+ # build tree. It runs everything directly out of the build tree.
16
+ # It does not require regina to be installed on the system (and indeed
17
+ # it ignores any installation that it might find).
18
+ #
19
+ # This program is free software; you can redistribute it and/or
20
+ # modify it under the terms of the GNU General Public License as
21
+ # published by the Free Software Foundation; either version 2 of the
22
+ # License, or (at your option) any later version.
23
+ #
24
+ # As an exception, when this program is distributed through (i) the
25
+ # App Store by Apple Inc.; (ii) the Mac App Store by Apple Inc.; or
26
+ # (iii) Google Play by Google Inc., then that store may impose any
27
+ # digital rights management, device limits and/or redistribution
28
+ # restrictions that are required by its terms of service.
29
+ #
30
+ # This program is distributed in the hope that it will be useful, but
31
+ # WITHOUT ANY WARRANTY; without even the implied warranty of
32
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
33
+ # General Public License for more details.
34
+ #
35
+ # You should have received a copy of the GNU General Public
36
+ # License along with this program; if not, write to the Free
37
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
38
+ # MA 02110-1301, USA.
39
+
40
+ set -e
41
+
42
+ # To see the output, you need to run:
43
+ # make test ARGS="-V"
44
+
45
+ executable=./basic_sub
46
+ testdir='@BASH_CMAKE_SOURCE_DIR@/python/testsuite'
47
+ testoutdir=`mktemp -d -t regina.XXX`
48
+
49
+ # REGINA_HOME can be deduced from the executable path, but on Windows this
50
+ # deduction gives the wrong style of path (windows vs unix style) for use
51
+ # with the embedded basic Python interpreter. Fix it explicitly here.
52
+ export REGINA_HOME=../../engine
53
+
54
+ echo "---------------------------------------------------"
55
+ echo "Testing python bindings in embedded subinterpreters"
56
+ echo "---------------------------------------------------"
57
+ echo
58
+
59
+ if ! test -f ../../CMakeCache.txt -a -f "$executable"; then
60
+ echo "ERROR: You do not appear to be within the python/testsuite directory"
61
+ echo " in the build tree. This script must be run from directly"
62
+ echo " within the build tree (where you ran cmake)."
63
+ echo " Please change into the python/testsuite directory in the"
64
+ echo " build tree and try again."
65
+ exit 1
66
+ fi
67
+
68
+ # Make sure Python will be able to import regina.
69
+ os='@CMAKE_SYSTEM_NAME@'
70
+ case "$os" in
71
+ Darwin )
72
+ export DYLD_LIBRARY_PATH="../../engine:$DYLD_LIBRARY_PATH"
73
+ export PYTHONPATH="..:$PYTHONPATH"
74
+ ;;
75
+ Windows )
76
+ # The PYTHONHOME directory is incorrectly hard-coded in msys2.
77
+ # Work out the correct value by asking the python interpreter directly.
78
+ PYTHON='@BASH_Python_EXECUTABLE@'
79
+ if [ ! -e "$PYTHON" ]; then
80
+ echo "ERROR: Python interpreter not found: $PYTHON"
81
+ exit 1
82
+ fi
83
+ export PYTHONHOME="`"$PYTHON" -c 'import sys; print(sys.prefix)'`"
84
+ if [ ! -d "$PYTHONHOME" ]; then
85
+ echo "ERROR: Python home not found: $PYTHONHOME"
86
+ exit 1
87
+ fi
88
+
89
+ export PATH="../../engine:$PATH"
90
+ export PYTHONPATH="..;$PYTHONPATH"
91
+ ;;
92
+ * )
93
+ export LD_LIBRARY_PATH="../../engine:$LD_LIBRARY_PATH"
94
+ export PYTHONPATH="..:$PYTHONPATH"
95
+ ;;
96
+ esac
97
+
98
+ expected="$testdir/basic_sub.out"
99
+ observed="$testoutdir/basic_sub.out"
100
+
101
+ # Since we have "set -e", we need "&& dummy=" to prevent this line to
102
+ # just exit the bash script when the test has non-zero exit code.
103
+ # We use && as opposed to || in order to preserve the exit code from
104
+ # the first command.
105
+ #
106
+ # The code that unsets TERM fixes an issue seen some years ago on
107
+ # Fedora, where (as a result of a more exotic TERM setting) unprintable
108
+ # characters were being dumped at the beginning of the python output.
109
+ #
110
+ echo -n "Running subinterpreter test ... "
111
+ TERM= PYTHONIOENCODING=utf8 "$executable" > "$observed" 2>&1 && dummy=
112
+
113
+ # Catch exitcode.
114
+ exitcode=$?
115
+
116
+ # Branch based on exit code.
117
+ broken=
118
+ if [ "$exitcode" -ne 0 ]; then
119
+ echo "FAILED (exit code $exitcode)"
120
+ echo " Output was:"
121
+ echo " ..."
122
+ tail -n 5 $observed | sed -e 's/^/ /'
123
+ broken=1
124
+ else
125
+ if ! ( diff --strip-trailing-cr "$expected" "$observed" > /dev/null ); then
126
+ echo "FAILED (output differs from expected)"
127
+ echo " Diff was:"
128
+ diff --strip-trailing-cr -u \
129
+ --label 'Expected output' --label 'Actual output' \
130
+ "$expected" "$observed" | head -n200 | sed -e 's/^/ /'
131
+ echo " ..."
132
+ broken=1
133
+ else
134
+ echo "ok"
135
+ rm -f "$observed"
136
+ fi
137
+ fi
138
+
139
+ if test -n "$broken"; then
140
+ echo
141
+ echo "The full output file(s) produced by Regina are in the directory:"
142
+ echo " $testoutdir"
143
+ exit 1
144
+ else
145
+ rmdir "$testoutdir"
146
+ fi
147
+
148
+ echo
149
+ echo "Test passed!"
150
+ exit 0
@@ -0,0 +1,65 @@
1
+ % orb
2
+ theta_in_solid_torus
3
+ SolutionType geometric_solution
4
+ vertices_known
5
+
6
+ 1 0 1.000 1 1 4xu 3uw 1wx 2wx
7
+ 2 3 0.000 3 2 4wv 1uv
8
+ 3 1 0.000 3 2 2vu
9
+ 4 2 0.000 2 3 3xv
10
+ 5 0 1.000 1 3 4xv 3vw 3wx 4wx 1wv 2vx 2xu 1uw
11
+ 6 0 1.000 1 2 4vu 1xu 3xu 3uv 1vx 4uw 2uw 2wv
12
+
13
+ 1 -53.3333333333333570 0.0000000000000080 0.0000000000000080 1.5707963267948968 1.5707963267948968 1.5707963267948968 1.5707963267948968
14
+ 2 -0.7655364486149963 0.7655364486149963 0.7655364486149961 0.0000000000000000 0.0000000000000000
15
+ 3 -0.7655364486149963 0.7655364486149963 0.7655364486149961 0.0000000000000000
16
+ 4 -0.7655364486149963 0.7655364486149961 0.7655364486149963 0.0000000000000000
17
+ 5 -4.5182192616560677 0.0000000000000080 0.7655364486149963 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484
18
+ 6 -4.5182192616560677 0.0000000000000080 0.7655364486149961 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484 0.7853981633974484
19
+
20
+ 1 1 0 0 0 -1 1 0 0 -1 1 0 0 2 -2 0 0 0 -1 0 0 -1 1 0 0 0 0 0 0 0 0 0 0
21
+ 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
22
+ 3 0 0 0 0 0 0 0 0
23
+ 4 0 0 0 0 0 0 0 0
24
+ 5 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 1 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
25
+ 6 0 0 0 0 -1 0 0 0 0 0 0 0 1 0 0 0 1 0 0 0 -2 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 2 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 0 0 0
26
+
27
+ 14
28
+ 0 136 118
29
+ 1 345 127
30
+ 2 317 387
31
+ 3 197 339
32
+ 4 82 344
33
+ 5 93 163
34
+ 6 296 164
35
+ 7 275 264
36
+ 8 196 309
37
+ 9 127 250
38
+ 10 262 207
39
+ 11 246 235
40
+ 12 365 257
41
+ 13 402 223
42
+
43
+ 15
44
+ 0 0 1 0
45
+ 1 1 2 0
46
+ 2 2 3 0
47
+ 3 3 4 0
48
+ 4 4 5 0
49
+ 5 5 6 0
50
+ 6 6 7 0
51
+ 7 7 8 0
52
+ 8 8 9 0
53
+ 9 9 0 0
54
+ 10 8 3 0
55
+ 11 10 11 1
56
+ 12 11 12 1
57
+ 13 12 13 1
58
+ 14 13 10 1
59
+
60
+ 5
61
+ 0 132 163 5 9 0.196642 0.657601
62
+ 1 331 250 12 1 0.719863 0.476296
63
+ 2 279 241 12 6 0.283854 0.772448
64
+ 3 335 215 1 14 0.339991 0.475141
65
+ 4 286 209 6 14 0.457868 0.825823
@@ -0,0 +1,40 @@
1
+ M
2
+ !
3
+ z
4
+ ~!
5
+ ~M
6
+ ~N
7
+ ~z
8
+ |!!
9
+ |zM
10
+ |!N
11
+ |zz
12
+ }!!!
13
+ }zzM
14
+ }!!N
15
+ }zzz
16
+ {z}
17
+ {N}
18
+ {"}
19
+ {M}
20
+ {z"}
21
+ {N"}
22
+ {!"}
23
+ {M"}
24
+ {+5p4(lG]&IOQRD6RDt%["}
25
+ {X5p4(lG]&IOQRD6RDt%["}
26
+ {}
27
+ {}
28
+ MM
29
+ NM
30
+ zM
31
+ ~NM
32
+ ~zM
33
+ |!NM
34
+ |zzM
35
+ }!!NM
36
+ }zzzM
37
+ {"}M
38
+ {M}M
39
+ {!"}M
40
+ {M"}M
@@ -0,0 +1,108 @@
1
+ # Regina - A Normal Surface Theory Calculator
2
+ # Python Test Suite Component
3
+ #
4
+ # Copyright (c) 2015-2023, Ben Burton
5
+ # For further details contact Ben Burton (bab@debian.org).
6
+ #
7
+ # Tests the tightEncode() 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
30
+ # License along with this program; if not, write to the Free
31
+ # Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
32
+ # MA 02110-1301, USA.
33
+
34
+ def doLong(val):
35
+ enc = tightEncoding(val)
36
+ print(enc)
37
+ for i in [ tightEncoding(Integer(val)), tightEncoding(LargeInteger(val)),
38
+ Integer(val).tightEncoding(), LargeInteger(val).tightEncoding() ]:
39
+ if i != enc:
40
+ print("ERROR: Inconsistent encodings")
41
+ if tightDecoding(enc) != val:
42
+ print("ERROR: Inconsistent decoding")
43
+
44
+ def doLarge(val):
45
+ enc = tightEncoding(Integer(val))
46
+ print(enc)
47
+ for i in [ tightEncoding(Integer(val)), tightEncoding(LargeInteger(val)),
48
+ Integer(val).tightEncoding(), LargeInteger(val).tightEncoding() ]:
49
+ if i != enc:
50
+ print("ERROR: Inconsistent encodings")
51
+ if str(tightDecoding(enc)) != val:
52
+ print("ERROR: Inconsistent decoding")
53
+
54
+ def doUnsigned(val):
55
+ # We can test encodings for unsigned types via AbelianGroup,
56
+ # which stores the rank as an unsigned integer.
57
+ a = AbelianGroup(val)
58
+ print(a.tightEncoding())
59
+
60
+ doLong(0)
61
+ doLong(-44)
62
+ doLong(45)
63
+
64
+ doLong(-89)
65
+ doLong(-45)
66
+ doLong(46)
67
+ doLong(90)
68
+
69
+ doLong(-4139)
70
+ doLong(-90)
71
+ doLong(91)
72
+ doLong(4140)
73
+
74
+ doLong(-368639)
75
+ doLong(-4140)
76
+ doLong(4141)
77
+ doLong(368640)
78
+
79
+ doLong(-368684)
80
+ doLong(-368640)
81
+ doLong(368641)
82
+ doLong(368684)
83
+
84
+ doLong(-368729)
85
+ doLong(-368685)
86
+ doLong(368685)
87
+ doLong(368729)
88
+
89
+ doLarge('1000000000000000000000000000000000000000')
90
+ doLarge('-1000000000000000000000000000000000000000')
91
+
92
+ print(tightEncoding(LargeInteger.infinity))
93
+ print(LargeInteger.infinity.tightEncoding())
94
+
95
+ doUnsigned(0)
96
+ doUnsigned(1)
97
+ doUnsigned(45)
98
+ doUnsigned(46)
99
+ doUnsigned(90)
100
+ doUnsigned(91)
101
+ doUnsigned(4140)
102
+ doUnsigned(4141)
103
+ doUnsigned(368640)
104
+ doUnsigned(368641)
105
+ doUnsigned(368684)
106
+ doUnsigned(368685)
107
+ doUnsigned(368729)
108
+
@@ -0,0 +1,135 @@
1
+ Tree decomposition: width 4, size 5
2
+ Bag 4 [1]: 4
3
+ Bag 3 [2]: 3 4
4
+ Bag 2 [3]: 2 3 4
5
+ Bag 1 [4]: 1 2 3 4
6
+ Bag 0 [5]: 0 1 2 3 4
7
+
8
+ Tree decomposition: width 4, size 10
9
+ Bag 9 [0]:
10
+ Bag 8 [1]: 0
11
+ Bag 7 [2]: 0 1
12
+ Bag 6 [3]: 0 1 2
13
+ Bag 5 [4]: 0 1 2 3
14
+ Bag 4 [5]: 0 1 2 3 4
15
+ Bag 3 [4]: 0 1 2 3
16
+ Bag 2 [3]: 0 1 2
17
+ Bag 1 [2]: 0 1
18
+ Bag 0 [1]: 0
19
+
20
+ Tree decomposition: width 4, size 5
21
+ Bag 4 [1]: 4
22
+ Bag 3 [2]: 3 4
23
+ Bag 2 [3]: 2 3 4
24
+ Bag 1 [4]: 1 2 3 4
25
+ Bag 0 [5]: 0 1 2 3 4
26
+
27
+ Tree decomposition: width 4, size 10
28
+ Bag 9 [0]:
29
+ Bag 8 [1]: 0
30
+ Bag 7 [2]: 0 1
31
+ Bag 6 [3]: 0 1 2
32
+ Bag 5 [4]: 0 1 2 3
33
+ Bag 4 [5]: 0 1 2 3 4
34
+ Bag 3 [4]: 0 1 2 3
35
+ Bag 2 [3]: 0 1 2
36
+ Bag 1 [2]: 0 1
37
+ Bag 0 [1]: 0
38
+
39
+ Tree decomposition: width 4, size 5
40
+ Bag 4 [1]: 4
41
+ Bag 3 [2]: 3 4
42
+ Bag 2 [3]: 2 3 4
43
+ Bag 1 [4]: 1 2 3 4
44
+ Bag 0 [5]: 0 1 2 3 4
45
+
46
+ Tree decomposition: width 4, size 10
47
+ Bag 9 [0]:
48
+ Bag 8 [1]: 2
49
+ Bag 7 [2]: 1 2
50
+ Bag 6 [3]: 0 1 2
51
+ Bag 5 [4]: 0 1 2 3
52
+ Bag 4 [5]: 0 1 2 3 4
53
+ Bag 3 [4]: 0 1 2 3
54
+ Bag 2 [3]: 0 1 2
55
+ Bag 1 [2]: 0 1
56
+ Bag 0 [1]: 0
57
+
58
+ Tree decomposition: width 2, size 11
59
+ Bag 10 [1]: 10
60
+ Bag 9 [2]: 9 10
61
+ Bag 8 [2]: 8 9
62
+ Bag 7 [2]: 7 8
63
+ Bag 6 [2]: 2 7
64
+ Bag 5 [3]: 0 2 7
65
+ Bag 4 [3]: 0 1 2
66
+ Bag 1 [3]: 1 2 5
67
+ Bag 0 [2]: 5 6
68
+ Bag 3 [3]: 0 1 3
69
+ Bag 2 [2]: 3 4
70
+
71
+ Tree decomposition: width 2, size 11
72
+ Bag 10 [2]: 3 4
73
+ Bag 9 [3]: 0 1 3
74
+ Bag 8 [3]: 0 1 2
75
+ Bag 5 [3]: 0 2 7
76
+ Bag 4 [2]: 2 7
77
+ Bag 3 [2]: 7 8
78
+ Bag 2 [2]: 8 9
79
+ Bag 1 [2]: 9 10
80
+ Bag 0 [1]: 10
81
+ Bag 7 [3]: 1 2 5
82
+ Bag 6 [2]: 5 6
83
+
84
+ Tree decomposition: width 2, size 11
85
+ Bag 10 [1]: 10
86
+ Bag 9 [2]: 9 10
87
+ Bag 8 [2]: 8 9
88
+ Bag 7 [2]: 7 8
89
+ Bag 6 [2]: 2 7
90
+ Bag 5 [3]: 0 2 7
91
+ Bag 4 [3]: 0 1 2
92
+ Bag 1 [3]: 1 2 5
93
+ Bag 0 [2]: 5 6
94
+ Bag 3 [3]: 0 1 3
95
+ Bag 2 [2]: 3 4
96
+
97
+ Tree decomposition: width 2, size 11
98
+ Bag 10 [2]: 3 4
99
+ Bag 9 [3]: 0 1 3
100
+ Bag 8 [3]: 0 1 2
101
+ Bag 5 [3]: 0 2 7
102
+ Bag 4 [2]: 2 7
103
+ Bag 3 [2]: 7 8
104
+ Bag 2 [2]: 8 9
105
+ Bag 1 [2]: 9 10
106
+ Bag 0 [1]: 10
107
+ Bag 7 [3]: 1 2 5
108
+ Bag 6 [2]: 5 6
109
+
110
+ Tree decomposition: width 2, size 11
111
+ Bag 10 [1]: 10
112
+ Bag 9 [2]: 9 10
113
+ Bag 8 [2]: 8 9
114
+ Bag 7 [2]: 7 8
115
+ Bag 6 [2]: 2 7
116
+ Bag 5 [3]: 0 2 7
117
+ Bag 4 [3]: 0 1 2
118
+ Bag 1 [3]: 1 2 5
119
+ Bag 0 [2]: 5 6
120
+ Bag 3 [3]: 0 1 3
121
+ Bag 2 [2]: 3 4
122
+
123
+ Tree decomposition: width 2, size 11
124
+ Bag 10 [3]: 0 2 7
125
+ Bag 4 [2]: 2 7
126
+ Bag 3 [2]: 7 8
127
+ Bag 2 [2]: 8 9
128
+ Bag 1 [2]: 9 10
129
+ Bag 0 [1]: 10
130
+ Bag 9 [3]: 0 1 2
131
+ Bag 6 [3]: 1 2 5
132
+ Bag 5 [2]: 5 6
133
+ Bag 8 [3]: 0 1 3
134
+ Bag 7 [2]: 3 4
135
+