snappy 3.1__cp310-cp310-macosx_11_0_arm64.whl → 3.2__cp310-cp310-macosx_11_0_arm64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (465) hide show
  1. snappy/CyOpenGL.cpython-310-darwin.so +0 -0
  2. snappy/SnapPy.cpython-310-darwin.so +0 -0
  3. snappy/SnapPyHP.cpython-310-darwin.so +0 -0
  4. snappy/__init__.py +299 -402
  5. snappy/app.py +70 -20
  6. snappy/browser.py +18 -17
  7. snappy/canonical.py +249 -0
  8. snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
  9. snappy/cusps/cusp_area_matrix.py +101 -0
  10. snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
  11. snappy/cusps/maximal_cusp_area_matrix.py +136 -0
  12. snappy/cusps/test.py +21 -0
  13. snappy/cusps/trig_cusp_area_matrix.py +63 -0
  14. snappy/database.py +10 -9
  15. snappy/decorated_isosig.py +337 -114
  16. snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
  17. snappy/dev/extended_ptolemy/extended.py +3 -3
  18. snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
  19. snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
  20. snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
  21. snappy/doc/_images/m125_paper_plane.jpg +0 -0
  22. snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
  23. snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
  24. snappy/doc/_sources/credits.rst.txt +6 -1
  25. snappy/doc/_sources/development.rst.txt +66 -46
  26. snappy/doc/_sources/index.rst.txt +72 -5
  27. snappy/doc/_sources/installing.rst.txt +145 -162
  28. snappy/doc/_sources/news.rst.txt +73 -1
  29. snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
  30. snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
  31. snappy/doc/_sources/triangulation.rst.txt +2 -2
  32. snappy/doc/_sources/verify.rst.txt +89 -29
  33. snappy/doc/_sources/verify_internals.rst.txt +5 -16
  34. snappy/doc/_static/basic.css +23 -1
  35. snappy/doc/_static/css/badge_only.css +1 -1
  36. snappy/doc/_static/css/theme.css +1 -1
  37. snappy/doc/_static/doctools.js +1 -1
  38. snappy/doc/_static/documentation_options.js +2 -3
  39. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  40. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  41. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  42. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  43. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  44. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  45. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  46. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  47. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  48. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  49. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  50. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  51. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  52. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  53. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  54. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  55. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  56. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  57. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  58. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  59. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  60. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  61. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  62. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  63. snappy/doc/_static/js/versions.js +228 -0
  64. snappy/doc/_static/language_data.js +2 -2
  65. snappy/doc/_static/pygments.css +1 -0
  66. snappy/doc/_static/searchtools.js +125 -71
  67. snappy/doc/_static/sphinx_highlight.js +13 -3
  68. snappy/doc/additional_classes.html +291 -122
  69. snappy/doc/bugs.html +17 -20
  70. snappy/doc/censuses.html +34 -53
  71. snappy/doc/credits.html +22 -22
  72. snappy/doc/development.html +88 -68
  73. snappy/doc/genindex.html +66 -145
  74. snappy/doc/index.html +86 -31
  75. snappy/doc/installing.html +164 -182
  76. snappy/doc/manifold.html +1168 -556
  77. snappy/doc/manifoldhp.html +18 -21
  78. snappy/doc/news.html +91 -33
  79. snappy/doc/objects.inv +0 -0
  80. snappy/doc/other.html +20 -22
  81. snappy/doc/platonic_census.html +31 -34
  82. snappy/doc/plink.html +19 -22
  83. snappy/doc/ptolemy.html +20 -22
  84. snappy/doc/ptolemy_classes.html +102 -105
  85. snappy/doc/ptolemy_examples1.html +34 -36
  86. snappy/doc/ptolemy_examples2.html +28 -31
  87. snappy/doc/ptolemy_examples3.html +26 -29
  88. snappy/doc/ptolemy_examples4.html +20 -23
  89. snappy/doc/ptolemy_prelim.html +25 -28
  90. snappy/doc/py-modindex.html +16 -19
  91. snappy/doc/screenshots.html +22 -24
  92. snappy/doc/search.html +15 -18
  93. snappy/doc/searchindex.js +1 -1
  94. snappy/doc/snap.html +18 -21
  95. snappy/doc/snappy.html +18 -20
  96. snappy/doc/spherogram.html +84 -87
  97. snappy/doc/todo.html +17 -20
  98. snappy/doc/triangulation.html +324 -215
  99. snappy/doc/tutorial.html +17 -20
  100. snappy/doc/verify.html +100 -46
  101. snappy/doc/verify_internals.html +106 -563
  102. snappy/drilling/__init__.py +153 -235
  103. snappy/drilling/barycentric.py +103 -0
  104. snappy/drilling/constants.py +0 -2
  105. snappy/drilling/crush.py +56 -130
  106. snappy/drilling/cusps.py +12 -6
  107. snappy/drilling/debug.py +2 -1
  108. snappy/drilling/exceptions.py +7 -40
  109. snappy/drilling/moves.py +302 -243
  110. snappy/drilling/perturb.py +63 -37
  111. snappy/drilling/shorten.py +36 -0
  112. snappy/drilling/subdivide.py +0 -5
  113. snappy/drilling/test.py +23 -0
  114. snappy/drilling/test_cases.py +126 -0
  115. snappy/drilling/tracing.py +9 -37
  116. snappy/exceptions.py +18 -5
  117. snappy/exterior_to_link/barycentric_geometry.py +2 -4
  118. snappy/exterior_to_link/main.py +8 -7
  119. snappy/exterior_to_link/mcomplex_with_link.py +2 -2
  120. snappy/exterior_to_link/rational_linear_algebra.py +1 -1
  121. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
  122. snappy/exterior_to_link/test.py +21 -33
  123. snappy/geometric_structure/__init__.py +212 -0
  124. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  125. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  126. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  127. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  128. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  129. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  130. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  131. snappy/geometric_structure/geodesic/__init__.py +0 -0
  132. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  133. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  134. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  135. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  136. snappy/geometric_structure/geodesic/constants.py +6 -0
  137. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  138. snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
  139. snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
  140. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  141. snappy/geometric_structure/geodesic/line.py +30 -0
  142. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  143. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  144. snappy/geometric_structure/test.py +22 -0
  145. snappy/gui.py +23 -13
  146. snappy/horoviewer.py +7 -7
  147. snappy/hyperboloid/__init__.py +96 -31
  148. snappy/hyperboloid/distances.py +245 -0
  149. snappy/hyperboloid/horoball.py +19 -0
  150. snappy/hyperboloid/line.py +35 -0
  151. snappy/hyperboloid/point.py +9 -0
  152. snappy/hyperboloid/triangle.py +29 -0
  153. snappy/isometry_signature.py +382 -0
  154. snappy/len_spec/__init__.py +596 -0
  155. snappy/len_spec/geodesic_info.py +110 -0
  156. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  157. snappy/len_spec/geodesic_piece.py +143 -0
  158. snappy/len_spec/geometric_structure.py +182 -0
  159. snappy/len_spec/geometry.py +80 -0
  160. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  161. snappy/len_spec/spine.py +206 -0
  162. snappy/len_spec/test.py +24 -0
  163. snappy/len_spec/test_cases.py +69 -0
  164. snappy/len_spec/tile.py +275 -0
  165. snappy/len_spec/word.py +86 -0
  166. snappy/math_basics.py +39 -13
  167. snappy/matrix.py +52 -9
  168. snappy/number.py +12 -6
  169. snappy/numeric_output_checker.py +2 -3
  170. snappy/pari.py +8 -4
  171. snappy/phone_home.py +2 -1
  172. snappy/polyviewer.py +8 -8
  173. snappy/ptolemy/__init__.py +1 -1
  174. snappy/ptolemy/component.py +2 -2
  175. snappy/ptolemy/coordinates.py +25 -25
  176. snappy/ptolemy/findLoops.py +9 -9
  177. snappy/ptolemy/manifoldMethods.py +27 -29
  178. snappy/ptolemy/polynomial.py +50 -57
  179. snappy/ptolemy/processFileBase.py +60 -0
  180. snappy/ptolemy/ptolemyVariety.py +109 -41
  181. snappy/ptolemy/reginaWrapper.py +4 -4
  182. snappy/ptolemy/rur.py +1 -1
  183. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
  184. snappy/ptolemy/test.py +99 -54
  185. snappy/ptolemy/utilities.py +1 -1
  186. snappy/raytracing/__init__.py +64 -0
  187. snappy/raytracing/additional_horospheres.py +64 -0
  188. snappy/raytracing/additional_len_spec_choices.py +63 -0
  189. snappy/raytracing/cohomology_fractal.py +0 -3
  190. snappy/raytracing/eyeball.py +123 -0
  191. snappy/raytracing/finite_raytracing_data.py +17 -17
  192. snappy/raytracing/finite_viewer.py +15 -15
  193. snappy/raytracing/geodesic_tube_info.py +93 -63
  194. snappy/raytracing/geodesics.py +94 -64
  195. snappy/raytracing/geodesics_window.py +56 -34
  196. snappy/raytracing/gui_utilities.py +21 -6
  197. snappy/raytracing/hyperboloid_navigation.py +29 -4
  198. snappy/raytracing/hyperboloid_utilities.py +73 -73
  199. snappy/raytracing/ideal_raytracing_data.py +121 -91
  200. snappy/raytracing/inside_viewer.py +199 -66
  201. snappy/raytracing/pack.py +22 -0
  202. snappy/raytracing/raytracing_data.py +37 -25
  203. snappy/raytracing/raytracing_view.py +70 -65
  204. snappy/raytracing/shaders/Eye.png +0 -0
  205. snappy/raytracing/shaders/NonGeometric.png +0 -0
  206. snappy/raytracing/shaders/__init__.py +39 -3
  207. snappy/raytracing/shaders/fragment.glsl +451 -133
  208. snappy/raytracing/test.py +29 -0
  209. snappy/raytracing/tooltip.py +146 -0
  210. snappy/raytracing/upper_halfspace_utilities.py +42 -9
  211. snappy/sage_helper.py +67 -134
  212. snappy/settings.py +90 -77
  213. snappy/shell.py +2 -0
  214. snappy/snap/character_varieties.py +2 -2
  215. snappy/snap/find_field.py +4 -3
  216. snappy/snap/fundamental_polyhedron.py +2 -2
  217. snappy/snap/kernel_structures.py +5 -1
  218. snappy/snap/nsagetools.py +9 -8
  219. snappy/snap/peripheral/dual_cellulation.py +4 -3
  220. snappy/snap/peripheral/peripheral.py +2 -2
  221. snappy/snap/peripheral/surface.py +5 -5
  222. snappy/snap/peripheral/test.py +1 -1
  223. snappy/snap/polished_reps.py +8 -8
  224. snappy/snap/slice_obs_HKL.py +16 -14
  225. snappy/snap/t3mlite/arrow.py +3 -3
  226. snappy/snap/t3mlite/edge.py +3 -3
  227. snappy/snap/t3mlite/homology.py +2 -2
  228. snappy/snap/t3mlite/mcomplex.py +3 -3
  229. snappy/snap/t3mlite/simplex.py +12 -0
  230. snappy/snap/t3mlite/spun.py +18 -17
  231. snappy/snap/t3mlite/test_vs_regina.py +4 -4
  232. snappy/snap/test.py +37 -53
  233. snappy/snap/utilities.py +4 -5
  234. snappy/test.py +121 -138
  235. snappy/test_cases.py +263 -0
  236. snappy/testing.py +131 -0
  237. snappy/tiling/__init__.py +2 -0
  238. snappy/tiling/canonical_key_dict.py +59 -0
  239. snappy/tiling/dict_based_set.py +79 -0
  240. snappy/tiling/floor.py +49 -0
  241. snappy/tiling/hyperboloid_dict.py +54 -0
  242. snappy/tiling/iter_utils.py +78 -0
  243. snappy/tiling/lifted_tetrahedron.py +22 -0
  244. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  245. snappy/tiling/real_hash_dict.py +164 -0
  246. snappy/tiling/test.py +23 -0
  247. snappy/tiling/tile.py +215 -0
  248. snappy/tiling/triangle.py +33 -0
  249. snappy/tkterminal.py +116 -86
  250. snappy/twister/main.py +1 -7
  251. snappy/twister/twister_core.cpython-310-darwin.so +0 -0
  252. snappy/upper_halfspace/__init__.py +78 -17
  253. snappy/verify/__init__.py +3 -7
  254. snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
  255. snappy/verify/complex_volume/adjust_torsion.py +1 -2
  256. snappy/verify/complex_volume/closed.py +13 -13
  257. snappy/verify/complex_volume/cusped.py +6 -6
  258. snappy/verify/complex_volume/extended_bloch.py +5 -8
  259. snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
  260. snappy/verify/edge_equations.py +80 -0
  261. snappy/verify/exceptions.py +0 -55
  262. snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
  263. snappy/verify/interval_newton_shapes_engine.py +7 -5
  264. snappy/verify/interval_tree.py +5 -5
  265. snappy/verify/krawczyk_shapes_engine.py +17 -18
  266. snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
  267. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
  268. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
  269. snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
  270. snappy/verify/shapes.py +5 -3
  271. snappy/verify/short_slopes.py +39 -41
  272. snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
  273. snappy/verify/test.py +57 -60
  274. snappy/verify/upper_halfspace/extended_matrix.py +1 -1
  275. snappy/verify/upper_halfspace/finite_point.py +3 -4
  276. snappy/verify/upper_halfspace/ideal_point.py +9 -9
  277. snappy/verify/volume.py +2 -2
  278. snappy/version.py +2 -2
  279. {snappy-3.1.dist-info → snappy-3.2.dist-info}/METADATA +26 -11
  280. snappy-3.2.dist-info/RECORD +503 -0
  281. {snappy-3.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  282. {snappy-3.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  283. snappy/__pycache__/__init__.cpython-310.pyc +0 -0
  284. snappy/__pycache__/browser.cpython-310.pyc +0 -0
  285. snappy/__pycache__/cache.cpython-310.pyc +0 -0
  286. snappy/__pycache__/database.cpython-310.pyc +0 -0
  287. snappy/__pycache__/db_utilities.cpython-310.pyc +0 -0
  288. snappy/__pycache__/decorated_isosig.cpython-310.pyc +0 -0
  289. snappy/__pycache__/exceptions.cpython-310.pyc +0 -0
  290. snappy/__pycache__/export_stl.cpython-310.pyc +0 -0
  291. snappy/__pycache__/filedialog.cpython-310.pyc +0 -0
  292. snappy/__pycache__/gui.cpython-310.pyc +0 -0
  293. snappy/__pycache__/horoviewer.cpython-310.pyc +0 -0
  294. snappy/__pycache__/infowindow.cpython-310.pyc +0 -0
  295. snappy/__pycache__/math_basics.cpython-310.pyc +0 -0
  296. snappy/__pycache__/matrix.cpython-310.pyc +0 -0
  297. snappy/__pycache__/number.cpython-310.pyc +0 -0
  298. snappy/__pycache__/numeric_output_checker.cpython-310.pyc +0 -0
  299. snappy/__pycache__/pari.cpython-310.pyc +0 -0
  300. snappy/__pycache__/polyviewer.cpython-310.pyc +0 -0
  301. snappy/__pycache__/sage_helper.cpython-310.pyc +0 -0
  302. snappy/__pycache__/version.cpython-310.pyc +0 -0
  303. snappy/doc/_sources/verify_canon.rst.txt +0 -90
  304. snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
  305. snappy/doc/_static/js/html5shiv.min.js +0 -4
  306. snappy/doc/verify_canon.html +0 -304
  307. snappy/drilling/__pycache__/__init__.cpython-310.pyc +0 -0
  308. snappy/drilling/__pycache__/constants.cpython-310.pyc +0 -0
  309. snappy/drilling/__pycache__/crush.cpython-310.pyc +0 -0
  310. snappy/drilling/__pycache__/cusps.cpython-310.pyc +0 -0
  311. snappy/drilling/__pycache__/debug.cpython-310.pyc +0 -0
  312. snappy/drilling/__pycache__/epsilons.cpython-310.pyc +0 -0
  313. snappy/drilling/__pycache__/exceptions.cpython-310.pyc +0 -0
  314. snappy/drilling/__pycache__/fixed_points.cpython-310.pyc +0 -0
  315. snappy/drilling/__pycache__/geodesic_info.cpython-310.pyc +0 -0
  316. snappy/drilling/__pycache__/geodesic_tube.cpython-310.pyc +0 -0
  317. snappy/drilling/__pycache__/geometric_structure.cpython-310.pyc +0 -0
  318. snappy/drilling/__pycache__/line.cpython-310.pyc +0 -0
  319. snappy/drilling/__pycache__/moves.cpython-310.pyc +0 -0
  320. snappy/drilling/__pycache__/peripheral_curves.cpython-310.pyc +0 -0
  321. snappy/drilling/__pycache__/perturb.cpython-310.pyc +0 -0
  322. snappy/drilling/__pycache__/quotient_space.cpython-310.pyc +0 -0
  323. snappy/drilling/__pycache__/spatial_dict.cpython-310.pyc +0 -0
  324. snappy/drilling/__pycache__/subdivide.cpython-310.pyc +0 -0
  325. snappy/drilling/__pycache__/tracing.cpython-310.pyc +0 -0
  326. snappy/drilling/geodesic_tube.py +0 -441
  327. snappy/drilling/geometric_structure.py +0 -366
  328. snappy/drilling/line.py +0 -122
  329. snappy/drilling/quotient_space.py +0 -94
  330. snappy/drilling/spatial_dict.py +0 -128
  331. snappy/exterior_to_link/__pycache__/__init__.cpython-310.pyc +0 -0
  332. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-310.pyc +0 -0
  333. snappy/exterior_to_link/__pycache__/exceptions.cpython-310.pyc +0 -0
  334. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-310.pyc +0 -0
  335. snappy/exterior_to_link/__pycache__/link_projection.cpython-310.pyc +0 -0
  336. snappy/exterior_to_link/__pycache__/main.cpython-310.pyc +0 -0
  337. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-310.pyc +0 -0
  338. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-310.pyc +0 -0
  339. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-310.pyc +0 -0
  340. snappy/exterior_to_link/__pycache__/pl_utils.cpython-310.pyc +0 -0
  341. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-310.pyc +0 -0
  342. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-310.pyc +0 -0
  343. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-310.pyc +0 -0
  344. snappy/exterior_to_link/__pycache__/stored_moves.cpython-310.pyc +0 -0
  345. snappy/hyperboloid/__pycache__/__init__.cpython-310.pyc +0 -0
  346. snappy/manifolds/__pycache__/__init__.cpython-310.pyc +0 -0
  347. snappy/ptolemy/__pycache__/__init__.cpython-310.pyc +0 -0
  348. snappy/ptolemy/__pycache__/component.cpython-310.pyc +0 -0
  349. snappy/ptolemy/__pycache__/coordinates.cpython-310.pyc +0 -0
  350. snappy/ptolemy/__pycache__/fieldExtensions.cpython-310.pyc +0 -0
  351. snappy/ptolemy/__pycache__/findLoops.cpython-310.pyc +0 -0
  352. snappy/ptolemy/__pycache__/homology.cpython-310.pyc +0 -0
  353. snappy/ptolemy/__pycache__/manifoldMethods.cpython-310.pyc +0 -0
  354. snappy/ptolemy/__pycache__/matrix.cpython-310.pyc +0 -0
  355. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-310.pyc +0 -0
  356. snappy/ptolemy/__pycache__/polynomial.cpython-310.pyc +0 -0
  357. snappy/ptolemy/__pycache__/processComponents.cpython-310.pyc +0 -0
  358. snappy/ptolemy/__pycache__/processFileBase.cpython-310.pyc +0 -0
  359. snappy/ptolemy/__pycache__/processFileDispatch.cpython-310.pyc +0 -0
  360. snappy/ptolemy/__pycache__/processMagmaFile.cpython-310.pyc +0 -0
  361. snappy/ptolemy/__pycache__/processRurFile.cpython-310.pyc +0 -0
  362. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-310.pyc +0 -0
  363. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-310.pyc +0 -0
  364. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-310.pyc +0 -0
  365. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-310.pyc +0 -0
  366. snappy/ptolemy/__pycache__/rur.cpython-310.pyc +0 -0
  367. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-310.pyc +0 -0
  368. snappy/ptolemy/__pycache__/utilities.cpython-310.pyc +0 -0
  369. snappy/raytracing/__pycache__/__init__.cpython-310.pyc +0 -0
  370. snappy/raytracing/__pycache__/finite_raytracing_data.cpython-310.pyc +0 -0
  371. snappy/raytracing/__pycache__/gui_utilities.cpython-310.pyc +0 -0
  372. snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-310.pyc +0 -0
  373. snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-310.pyc +0 -0
  374. snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-310.pyc +0 -0
  375. snappy/raytracing/__pycache__/inside_viewer.cpython-310.pyc +0 -0
  376. snappy/raytracing/__pycache__/raytracing_data.cpython-310.pyc +0 -0
  377. snappy/raytracing/__pycache__/raytracing_view.cpython-310.pyc +0 -0
  378. snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-310.pyc +0 -0
  379. snappy/raytracing/__pycache__/view_scale_controller.cpython-310.pyc +0 -0
  380. snappy/raytracing/zoom_slider/__pycache__/__init__.cpython-310.pyc +0 -0
  381. snappy/snap/__pycache__/__init__.cpython-310.pyc +0 -0
  382. snappy/snap/__pycache__/character_varieties.cpython-310.pyc +0 -0
  383. snappy/snap/__pycache__/fundamental_polyhedron.cpython-310.pyc +0 -0
  384. snappy/snap/__pycache__/interval_reps.cpython-310.pyc +0 -0
  385. snappy/snap/__pycache__/kernel_structures.cpython-310.pyc +0 -0
  386. snappy/snap/__pycache__/mcomplex_base.cpython-310.pyc +0 -0
  387. snappy/snap/__pycache__/nsagetools.cpython-310.pyc +0 -0
  388. snappy/snap/__pycache__/polished_reps.cpython-310.pyc +0 -0
  389. snappy/snap/__pycache__/shapes.cpython-310.pyc +0 -0
  390. snappy/snap/__pycache__/slice_obs_HKL.cpython-310.pyc +0 -0
  391. snappy/snap/__pycache__/utilities.cpython-310.pyc +0 -0
  392. snappy/snap/peripheral/__pycache__/__init__.cpython-310.pyc +0 -0
  393. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-310.pyc +0 -0
  394. snappy/snap/peripheral/__pycache__/link.cpython-310.pyc +0 -0
  395. snappy/snap/peripheral/__pycache__/peripheral.cpython-310.pyc +0 -0
  396. snappy/snap/peripheral/__pycache__/surface.cpython-310.pyc +0 -0
  397. snappy/snap/t3mlite/__pycache__/__init__.cpython-310.pyc +0 -0
  398. snappy/snap/t3mlite/__pycache__/arrow.cpython-310.pyc +0 -0
  399. snappy/snap/t3mlite/__pycache__/corner.cpython-310.pyc +0 -0
  400. snappy/snap/t3mlite/__pycache__/edge.cpython-310.pyc +0 -0
  401. snappy/snap/t3mlite/__pycache__/face.cpython-310.pyc +0 -0
  402. snappy/snap/t3mlite/__pycache__/files.cpython-310.pyc +0 -0
  403. snappy/snap/t3mlite/__pycache__/homology.cpython-310.pyc +0 -0
  404. snappy/snap/t3mlite/__pycache__/linalg.cpython-310.pyc +0 -0
  405. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-310.pyc +0 -0
  406. snappy/snap/t3mlite/__pycache__/perm4.cpython-310.pyc +0 -0
  407. snappy/snap/t3mlite/__pycache__/simplex.cpython-310.pyc +0 -0
  408. snappy/snap/t3mlite/__pycache__/spun.cpython-310.pyc +0 -0
  409. snappy/snap/t3mlite/__pycache__/surface.cpython-310.pyc +0 -0
  410. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-310.pyc +0 -0
  411. snappy/snap/t3mlite/__pycache__/vertex.cpython-310.pyc +0 -0
  412. snappy/togl/__init__.py +0 -3
  413. snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
  414. snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
  415. snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  416. snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
  417. snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
  418. snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
  419. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  420. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
  421. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  422. snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
  423. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
  424. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
  425. snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  426. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  427. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
  428. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
  429. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  430. snappy/twister/__pycache__/__init__.cpython-310.pyc +0 -0
  431. snappy/twister/__pycache__/main.cpython-310.pyc +0 -0
  432. snappy/upper_halfspace/__pycache__/__init__.cpython-310.pyc +0 -0
  433. snappy/upper_halfspace/__pycache__/ideal_point.cpython-310.pyc +0 -0
  434. snappy/verify/__pycache__/__init__.cpython-310.pyc +0 -0
  435. snappy/verify/__pycache__/cuspCrossSection.cpython-310.pyc +0 -0
  436. snappy/verify/__pycache__/cuspTranslations.cpython-310.pyc +0 -0
  437. snappy/verify/__pycache__/cusp_areas.cpython-310.pyc +0 -0
  438. snappy/verify/__pycache__/cusp_shapes.cpython-310.pyc +0 -0
  439. snappy/verify/__pycache__/exceptions.cpython-310.pyc +0 -0
  440. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-310.pyc +0 -0
  441. snappy/verify/__pycache__/interval_tree.cpython-310.pyc +0 -0
  442. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-310.pyc +0 -0
  443. snappy/verify/__pycache__/realAlgebra.cpython-310.pyc +0 -0
  444. snappy/verify/__pycache__/shapes.cpython-310.pyc +0 -0
  445. snappy/verify/__pycache__/short_slopes.cpython-310.pyc +0 -0
  446. snappy/verify/__pycache__/squareExtensions.cpython-310.pyc +0 -0
  447. snappy/verify/__pycache__/verifyCanonical.cpython-310.pyc +0 -0
  448. snappy/verify/__pycache__/verifyHyperbolicity.cpython-310.pyc +0 -0
  449. snappy/verify/__pycache__/volume.cpython-310.pyc +0 -0
  450. snappy/verify/complex_volume/__pycache__/__init__.cpython-310.pyc +0 -0
  451. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-310.pyc +0 -0
  452. snappy/verify/complex_volume/__pycache__/closed.cpython-310.pyc +0 -0
  453. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-310.pyc +0 -0
  454. snappy/verify/complex_volume/__pycache__/cusped.cpython-310.pyc +0 -0
  455. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-310.pyc +0 -0
  456. snappy/verify/cuspCrossSection.py +0 -1422
  457. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-310.pyc +0 -0
  458. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-310.pyc +0 -0
  459. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-310.pyc +0 -0
  460. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-310.pyc +0 -0
  461. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-310.pyc +0 -0
  462. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-310.pyc +0 -0
  463. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-310.pyc +0 -0
  464. snappy-3.1.dist-info/RECORD +0 -585
  465. {snappy-3.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -1,30 +1,47 @@
1
1
  from . import constants
2
2
  from . import epsilons
3
3
  from . import exceptions
4
- from .geodesic_tube import add_structures_necessary_for_tube, GeodesicTube
5
- from .geodesic_info import GeodesicInfo
6
- from .line import R13Line, distance_r13_lines
7
4
 
5
+ from ..geometric_structure.geodesic.tiles_for_geodesic import compute_tiles_for_geodesic
6
+ from ..geometric_structure.geodesic.geodesic_start_point_info import GeodesicStartPointInfo
7
+ from ..geometric_structure.geodesic.check_away_from_core_curve import check_away_from_core_curve_iter
8
8
  from ..hyperboloid import ( # type: ignore
9
9
  unit_time_vector_to_o13_hyperbolic_translation,
10
10
  r13_dot,
11
- time_r13_normalise,
12
- distance_unit_time_r13_points)
11
+ time_r13_normalise)
12
+ from ..hyperboloid.line import R13Line
13
+ from ..hyperboloid.distances import distance_r13_lines, distance_r13_points
14
+ from ..tiling.triangle import add_triangles_to_tetrahedra
13
15
  from ..snap.t3mlite import Mcomplex # type: ignore
14
16
  from ..exceptions import InsufficientPrecisionError # type: ignore
15
- from ..matrix import vector # type: ignore
17
+ from ..matrix import make_vector # type: ignore
16
18
  from ..math_basics import correct_min # type: ignore
17
19
 
18
- from typing import Sequence, List
19
-
20
+ from typing import Sequence, Tuple, List, Any
21
+
22
+ # For perturbing, it is sufficient to just find some non-trivial
23
+ # lower bound for the embedding radius of a tube about a geodesic.
24
+ # To just any such bound, set _tube_developing_radius = 0.
25
+ # This will develop the tube just to the point where we can verify
26
+ # that it has positive radius.
27
+ #
28
+ # To stress-test our code, we can develop the tube further, by
29
+ # setting _tube_developing_radius > 0. The isotopy type of
30
+ # the drilled curve will not change no matter how large
31
+ # _tube_developing_radius is. In other words, we still compute
32
+ # a lower bound for the embedding radius which eventually will
33
+ # be the embedding radius up to rounding errors as
34
+ # _tube_developing_radius increases.
35
+ #
36
+ _tube_developing_radius = 0
20
37
 
21
38
  def perturb_geodesics(
22
39
  mcomplex : Mcomplex,
23
- geodesics : Sequence[GeodesicInfo],
40
+ geodesics : Sequence[GeodesicStartPointInfo],
24
41
  verbose=False):
25
42
  """
26
43
  Given a triangulation with structures added by add_r13_geometry
27
- and GeodesicInfo's with start points on the line that is a lift
44
+ and GeodesicStartPointInfo's with start points on the line that is a lift
28
45
  of the closed geodesic, perturbs the start point away from the line
29
46
  and computes a new end point (as image of the new start point under
30
47
  the matrix associated to the geodesic line). The line segment
@@ -32,7 +49,7 @@ def perturb_geodesics(
32
49
  curve in the manifold which is guaranteed to be isotopic to the
33
50
  closed geodesic.
34
51
 
35
- If several GeodesicInfo's are given and/or there are filled
52
+ If several GeodesicStartPointInfo's are given and/or there are filled
36
53
  cusps with core curves, the system of simple closed curves
37
54
  resulting from the perturbation together with the core curves
38
55
  is guaranteed to be isotopic to the original system of closed
@@ -72,34 +89,35 @@ def perturb_geodesics(
72
89
  for g in geodesics:
73
90
  perturb_geodesic(g, r, mcomplex.verified)
74
91
 
75
-
76
92
  def compute_lower_bound_injectivity_radius(
77
93
  mcomplex : Mcomplex,
78
- geodesics : Sequence[GeodesicInfo]):
94
+ geodesics : Sequence[GeodesicStartPointInfo]):
79
95
 
80
- add_structures_necessary_for_tube(mcomplex)
96
+ if len(geodesics) == 0:
97
+ raise Exception("No geodesic tubes given")
98
+
99
+ add_triangles_to_tetrahedra(mcomplex)
81
100
 
82
- tubes = [ GeodesicTube(mcomplex, g) for g in geodesics ]
83
- for tube in tubes:
84
- tube.add_pieces_for_radius(r=0)
101
+ min_radius = mcomplex.RF(_tube_developing_radius)
85
102
 
86
- return compute_lower_bound_injectivity_radius_from_tubes(
87
- mcomplex, tubes)
103
+ distances = []
88
104
 
105
+ tet_to_lines : List[List[R13Line]] = [[] for tet in mcomplex.Tetrahedra ]
89
106
 
90
- def compute_lower_bound_injectivity_radius_from_tubes(
91
- mcomplex : Mcomplex,
92
- tubes : Sequence[GeodesicTube]):
93
- if len(tubes) == 0:
94
- raise Exception("No geodesic tubes given")
107
+ core_curve_epsilon = _compute_core_curve_epsilon(mcomplex)
95
108
 
96
- distances = []
97
-
98
- tet_to_lines : List[List[R13Line]] = [[] for tet in mcomplex.Tetrahedra]
99
- for tube in tubes:
100
- distances.append(tube.covered_radius())
101
- for p in tube.pieces:
102
- tet_to_lines[p.tet.Index].append(p.lifted_geodesic)
109
+ for geodesic in geodesics:
110
+ for tile in (
111
+ check_away_from_core_curve_iter(
112
+ compute_tiles_for_geodesic(mcomplex, geodesic),
113
+ epsilon=core_curve_epsilon,
114
+ obj_name='Geodesic %s' % geodesic.word)):
115
+ if tile.lower_bound_distance > min_radius:
116
+ distances.append(tile.lower_bound_distance)
117
+ break
118
+ tet_index = tile.lifted_tetrahedron.tet.Index
119
+ tet_to_lines[tet_index].append(
120
+ tile.inverse_lifted_geometric_object)
103
121
 
104
122
  for tet in mcomplex.Tetrahedra:
105
123
  for curve in tet.core_curves.values():
@@ -113,11 +131,11 @@ def compute_lower_bound_injectivity_radius_from_tubes(
113
131
  return correct_min(distances) / 2
114
132
 
115
133
 
116
- def perturb_geodesic(geodesic : GeodesicInfo,
134
+ def perturb_geodesic(geodesic : GeodesicStartPointInfo,
117
135
  injectivity_radius,
118
136
  verified : bool):
119
137
  if geodesic.line is None:
120
- raise ValueError("GeodesicInfo needs line to be perturbed.")
138
+ raise ValueError("GeodesicStartPointInfo needs line to be perturbed.")
121
139
 
122
140
  perturbed_point = perturb_unit_time_point(
123
141
  time_r13_normalise(geodesic.unnormalised_start_point),
@@ -138,8 +156,9 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
138
156
  RF = point.base_ring()
139
157
 
140
158
  amt = RF(0.5) * max_amt
141
- direction = vector([RF(x) for x in constants.point_perturbation_direction])
142
- perturbed_origin = vector(
159
+ direction = make_vector(
160
+ [RF(x) for x in constants.point_perturbation_direction])
161
+ perturbed_origin = make_vector(
143
162
  [ amt.cosh() ] + list(amt.sinh() * direction.normalized()))
144
163
 
145
164
  m = unit_time_vector_to_o13_hyperbolic_translation(point)
@@ -150,9 +169,9 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
150
169
 
151
170
  space_coords = [ RF(x.center()) for x in perturbed_point[1:4] ]
152
171
  time_coord = sum((x**2 for x in space_coords), RF(1)).sqrt()
153
- perturbed_point = vector([time_coord] + space_coords)
172
+ perturbed_point = make_vector([time_coord] + space_coords)
154
173
 
155
- d = distance_unit_time_r13_points(point, perturbed_point)
174
+ d = distance_r13_points(point, perturbed_point)
156
175
  if not d < RF(0.75) * max_amt:
157
176
  raise InsufficientPrecisionError(
158
177
  "Could not verify perturbed point is close enough to original "
@@ -160,3 +179,10 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
160
179
  "Increasing the precision will probably fix this.")
161
180
 
162
181
  return perturbed_point
182
+
183
+ def _compute_core_curve_epsilon(mcomplex):
184
+ if mcomplex.verified:
185
+ return 0
186
+ else:
187
+ RF = mcomplex.RF
188
+ return RF(0.5) ** (RF.prec() // 2 - 8)
@@ -0,0 +1,36 @@
1
+ from .cusps import CuspPostDrillInfo
2
+ from .barycentric import transpositions, perm_to_index, mark_subtetrahedra_about_edge
3
+
4
+ from ..snap.t3mlite import Tetrahedron, Perm4, simplex
5
+
6
+
7
+ def shorten_in_barycentric_subdivision(tetrahedra, verbose : bool = False):
8
+ while shorten_one_in_barycentric_subdivision(tetrahedra):
9
+ if verbose:
10
+ print("Shortening geodesic by sweeping across triangle.")
11
+
12
+ def shorten_one_in_barycentric_subdivision(tetrahedra):
13
+ for tet in tetrahedra:
14
+ for perm, orientation in zip(Perm4.S4(), tet.marked_subtetrahedra):
15
+ if orientation != +1:
16
+ continue
17
+ other_perm = perm * transpositions[1]
18
+ j = perm_to_index(other_perm)
19
+ if tet.marked_subtetrahedra[j] == 0:
20
+ continue
21
+ mark_subtetrahedra_about_edge(tet, perm, 0)
22
+ mark_subtetrahedra_about_edge(tet, other_perm, 0)
23
+ new_perm = perm * Perm4((1,2,0,3))
24
+ mark_subtetrahedra_about_edge(tet, new_perm)
25
+ _remove_post_drill_info_from_vertex(tet, perm.image(simplex.V0))
26
+ return True
27
+ return False
28
+
29
+ def _remove_post_drill_info_from_vertex(tet, v):
30
+ if tet.post_drill_infos[v].index is None:
31
+ return
32
+ tet.post_drill_infos[v] = CuspPostDrillInfo()
33
+ for f in simplex.FacesAroundVertexCounterclockwise[v]:
34
+ _remove_post_drill_info_from_vertex(
35
+ tet.Neighbor[f],
36
+ tet.Gluing[f].image(v))
@@ -1,6 +1,5 @@
1
1
  from .moves import one_four_move, two_three_move
2
2
  from .tracing import GeodesicPiece, GeodesicPieceTracker
3
- from .exceptions import GeodesicStartingPiecesCrossSameFaceError
4
3
 
5
4
  from . import debug
6
5
 
@@ -138,10 +137,6 @@ def _traverse_geodesic_to_subdivide(
138
137
  # pointed to by a variable we are interested in where the name
139
138
  # the variable if it is not just "piece".
140
139
 
141
- if (start_piece.prev.endpoints[0].subsimplex ==
142
- start_piece.endpoints[1].subsimplex):
143
- raise GeodesicStartingPiecesCrossSameFaceError()
144
-
145
140
  # Following trace_geodesic, we start with
146
141
  #
147
142
  # start_piece.prev
@@ -0,0 +1,23 @@
1
+ from snappy import testing
2
+ import snappy
3
+
4
+ from snappy import drilling
5
+ import snappy.drilling.test_cases
6
+
7
+ modules = [
8
+ drilling,
9
+ drilling.test_cases
10
+ ]
11
+
12
+ def run_doctests(verbose=False, print_info=True):
13
+ globs = {'Manifold' : snappy.Manifold,
14
+ 'ManifoldHP': snappy.ManifoldHP}
15
+ return testing.doctest_modules(modules,
16
+ verbose=verbose,
17
+ print_info=print_info,
18
+ extraglobs=globs)
19
+
20
+ run_doctests.__name__ = drilling.__name__
21
+
22
+ if __name__ == '__main__':
23
+ testing.run_doctests_as_main(run_doctests)
@@ -0,0 +1,126 @@
1
+ """
2
+ IMPORTANT: Python only recognises this as a doc string if there is
3
+ nothing before it. In particular, add any includes after the doc string.
4
+
5
+ Test with manifold without symmetry. Note that the code in drilling is
6
+ deterministic but the SnapPea kernel code to remove the finite vertices
7
+ and simplify is not. Thus, we need canonical_retriangulation() to get
8
+ a consistent result:
9
+
10
+ >>> from snappy.drilling.exceptions import GeodesicSystemNotSimpleError
11
+ >>> M = Manifold("v2986")
12
+ >>> M.drill_word('gB').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
13
+ 'kLvvAQQkbhijhghgjijxxacvcccccv_baBaaBDbBa'
14
+
15
+ Test non-simple geodesic and verified computation:
16
+
17
+ sage: M = ManifoldHP("m004")
18
+ sage: try:
19
+ ... M.drill_word('bbCC', verified = True)
20
+ ... except GeodesicSystemNotSimpleError as e:
21
+ ... print("Not simple")
22
+ Not simple
23
+
24
+ Tests drilling one geodesic that intersects 1-skeleton::
25
+
26
+ >>> M = Manifold("m125")
27
+ >>> M.drill_word('d').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
28
+ 'svLvLQLAzQMMQdifhjmlknlopnqpqrrroaaaaaaoaaaaaaoaaao_aBbaBaaBeDBb'
29
+
30
+ Tests drilling two geodesics that intersect each other:
31
+
32
+ >>> try: # doctest: +NUMERIC9
33
+ ... M.drill_words(['d','Ad'])
34
+ ... except GeodesicSystemNotSimpleError as e:
35
+ ... print("Max tube radius:", e.maximal_tube_radius)
36
+ Max tube radius: 0.0000000000
37
+
38
+ Tests drilling geodesics that are entirely in the 2-skeleton::
39
+
40
+ >>> M.drill_words(['a','acAADa']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
41
+ 'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBbabbab'
42
+
43
+ Same test as verified computation::
44
+
45
+ sage: M.drill_words(['a','acAADa'], verified = True).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
46
+ 'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBbabbab'
47
+
48
+ Test error when drilling something close to core curve::
49
+
50
+ >>> M = Manifold("m125")
51
+ >>> MM = M.drill_word('d')
52
+ >>> MM.dehn_fill((1,0),2)
53
+ >>> bad_word = 'bc'
54
+ >>> MM.drill_word(bad_word) # doctest: +ELLIPSIS
55
+ Traceback (most recent call last):
56
+ ...
57
+ snappy.geometric_structure.geodesic.check_away_from_core_curve.ObjectCloseToCoreCurve: Geodesic bc is very close to the core curve of cusp 2 and might intersect it. Distance: ...
58
+
59
+ There are two places where we detect whether the geodesic is close
60
+ to a core curve (rather than tiling forever). Test the other place
61
+ in the GeodesicTube code used to determine the maximal amount we can
62
+ perturb the geodesic:
63
+
64
+ >>> drill_words_implementation(MM, [bad_word], verified = False, bits_prec = 53, perturb = True) # doctest: +ELLIPSIS
65
+ Traceback (most recent call last):
66
+ ...
67
+ snappy.geometric_structure.geodesic.check_away_from_core_curve.ObjectCloseToCoreCurve: Geodesic bc is very close to the core curve of cusp 2 and might intersect it. Distance: ...
68
+
69
+ A particular tricky case in terms testing that the start piece is correctly
70
+ handled by 2-3 moves (in particular, commit f9879d04 introduced a bug):
71
+
72
+ >>> Manifold("m004").drill_words(['CAC','CCbC']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
73
+ 'qLvvLvAMQQQkcgimopkllmpkonnnpixcaelchapewetvrn_bcaaBbBBbaBaBbB'
74
+
75
+
76
+ An interesting case where geodesic intersects triangulation in only one tetrahedron:
77
+
78
+ >>> Manifold("m019").drill_word('A').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
79
+ 'gLLPQccdefffqffqqof_BaaBdcbb'
80
+
81
+ A bug in an earlier implementation found by Nathan Dunfield (where putting the words in one order caused a failure):
82
+
83
+ >>> import sys
84
+ >>> original_limit = sys.getrecursionlimit()
85
+ >>> sys.setrecursionlimit(100000)
86
+ >>> def drilled_isosig(M, words):
87
+ ... for i in range(10):
88
+ ... try:
89
+ ... F = M.drill_words(words).filled_triangulation()
90
+ ... return F.canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
91
+ ... except RuntimeError:
92
+ ... pass
93
+ >>> drilled_isosig(Manifold('K11n34(0,1)'), ['iFcdbEiFJ', 'iFJ'])
94
+ 'zLLvLLwzAwPQMQzzQkcdgijkjplssrnrotqruvwyxyxyhsgnnighueqdniblsipklpxgcr_BcbDbBba'
95
+ >>> drilled_isosig(Manifold('K11n34(0,1)'), ['iFJ', 'iFcdbEiFJ'])
96
+ 'zLLvLLwzAwPQMQzzQkcdgijkjplssrnrotqruvwyxyxyhsgnnighueqdniblsipklpxgcr_babBbaBcaB'
97
+ >>> sys.setrecursionlimit(original_limit)
98
+
99
+ Stress test by using large perturbation. In particular, this is testing the
100
+ case where two geodesic pieces are adjacent to the same triangle and we
101
+ need to shorten before crushing. We do white-box testing (verbose = True)
102
+ to make sure we really hit the shortening case.
103
+
104
+ >>> from snappy.drilling import perturb
105
+ >>> original_radius = perturb._tube_developing_radius
106
+ >>> perturb._tube_developing_radius = 1
107
+ >>> Manifold("m307").drill_word('dadadabCdada', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
108
+ Tubes lower bound injectivity radius: 0.380575727320247
109
+ Number of geodesic pieces: [9]
110
+ Number of tets after subdividing: 45
111
+ Shortening geodesic by sweeping across triangle.
112
+ 'oLLwQvvPQQcbeefgemnllnmnmlhhaaaaaahaaaaah_bBbabaab'
113
+ >>> Manifold("m320").drill_word('daaacDA', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
114
+ Tubes lower bound injectivity radius: 0.397319067589326
115
+ Number of geodesic pieces: [9]
116
+ Number of tets after subdividing: 49
117
+ Shortening geodesic by sweeping across triangle.
118
+ 'rLLPwAPvvPQQcccdfehgjiqpooqppqoqffaaaaaaaqaaaqaaa_bBbabaab'
119
+ >>> perturb._tube_developing_radius = original_radius
120
+
121
+ """
122
+
123
+ from . import drill_words_implementation
124
+
125
+ if not __doc__:
126
+ raise Exception("doc string with tests was not recognized.")
@@ -1,5 +1,3 @@
1
- from .geodesic_info import GeodesicInfo
2
- from .line import R13LineWithMatrix, distance_r13_lines
3
1
  from . import constants
4
2
  from . import epsilons
5
3
  from . import exceptions
@@ -7,6 +5,9 @@ from . import exceptions
7
5
  from ..snap.t3mlite import simplex, Tetrahedron, Mcomplex # type: ignore
8
6
 
9
7
  from ..hyperboloid import r13_dot # type: ignore
8
+ from ..geometric_structure.geodesic.geodesic_start_point_info import GeodesicStartPointInfo
9
+ from ..geometric_structure.geodesic.line import R13LineWithMatrix
10
+ from ..geometric_structure.geodesic.check_away_from_core_curve import check_away_from_core_curve
10
11
  from ..exceptions import InsufficientPrecisionError # type: ignore
11
12
 
12
13
  from typing import Sequence, Optional, List
@@ -188,7 +189,7 @@ def compute_plane_intersection_param(
188
189
  return num / denom
189
190
 
190
191
 
191
- def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
192
+ def trace_geodesic(geodesic : GeodesicStartPointInfo, verified : bool):
192
193
  """
193
194
  Traces line segment through the tetrahedra in the hyperboloid
194
195
  model (though using time-like but not necessarily unit time-like vectors)
@@ -206,6 +207,8 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
206
207
  too close to a core curve.
207
208
  """
208
209
 
210
+ obj_name = "Geodesic %s" % geodesic.word
211
+
209
212
  if geodesic.tet is None:
210
213
  raise ValueError(
211
214
  "Expected geodesic with tetrahedron to start tracing.")
@@ -290,7 +293,9 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
290
293
  "problem.")
291
294
 
292
295
  # Check geodesic does not intersect core curve - if line is given.
293
- _verify_away_from_core_curve(line, tet, hit_face, epsilon)
296
+ if line is not None:
297
+ check_away_from_core_curve(
298
+ line.r13_line, tet, hit_face, epsilon, obj_name)
294
299
 
295
300
  # The crossing of the ray with the exit face is beyond the given
296
301
  # end point. Thus, we are at the last piece.
@@ -344,36 +349,3 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
344
349
 
345
350
  raise exceptions.UnfinishedTraceGeodesicError(
346
351
  constants.trace_max_steps)
347
-
348
-
349
- def _verify_away_from_core_curve(line : Optional[R13LineWithMatrix],
350
- tet : Tetrahedron,
351
- face : int,
352
- epsilon):
353
- """
354
- If the geodesic is intersecting a core curve, the tracing would
355
- fail in that it would never reach the intersection point and thus
356
- either hit the iteration limit or breaking down because of
357
- rounding-errors.
358
-
359
- This function is catching this case to give a meaningful exception
360
- faster. It does so by computing the distance between the lift of
361
- the geodesic we are tracing and the lifts of the core curve
362
- corresponding to the vertices of the tetrahedra adjacent to the
363
- given face.
364
- """
365
-
366
- if line is None:
367
- return
368
-
369
- for v in simplex.ZeroSubsimplices:
370
- if not simplex.is_subset(v, face):
371
- continue
372
- core_curve : Optional[R13LineWithMatrix] = tet.core_curves.get(v)
373
- if core_curve is None:
374
- continue
375
- d = distance_r13_lines(core_curve.r13_line,
376
- line.r13_line)
377
-
378
- if not d > epsilon:
379
- raise exceptions.GeodesicCloseToCoreCurve()
snappy/exceptions.py CHANGED
@@ -1,13 +1,26 @@
1
- # Exceptions from the SnapPea kernel
2
1
  class SnapPeaFatalError(Exception):
3
2
  """
4
- This exception is raised by SnapPy when the SnapPea kernel
5
- encounters a fatal error.
3
+ Exception raised by SnapPy when the SnapPea kernel encounters a fatal
4
+ error.
6
5
  """
7
6
 
8
7
 
9
8
  class InsufficientPrecisionError(Exception):
10
9
  """
11
- This exception is raised when a computation fails and is likely
12
- to succeed if higher precision is used.
10
+ Exception raised when a computation fails and is likely to succeed if
11
+ higher precision is used.
13
12
  """
13
+
14
+
15
+ class NonorientableManifoldError(ValueError):
16
+ """
17
+ Exception raised when a non-orientable manifold is given to a method
18
+ only supporting orientable manifolds.
19
+ """
20
+ def __init__(self, method_name, manifold):
21
+ self.method_name = method_name
22
+ self.manifold = manifold
23
+
24
+ def __str__(self):
25
+ return ('%s only supports orientable manifolds but %s is '
26
+ 'non-orientable.') % (self.method_name, self.manifold)
@@ -252,9 +252,7 @@ class BarycentricArc(Arc):
252
252
  zeros_e = self.end.zero_coordinates()
253
253
  if len(zeros_s) > 1 or len(zeros_e) > 1:
254
254
  return True
255
- if len(set(zeros_s) & set(zeros_e)) > 0:
256
- return True
257
- return False
255
+ return bool(set(zeros_s) & set(zeros_e))
258
256
 
259
257
  def max_denom(self):
260
258
  rationals = list(self.start.vector) + list(self.end.vector)
@@ -344,7 +342,7 @@ class TetrahedronEmbedding():
344
342
 
345
343
  class TetrahedronEmbeddingCache():
346
344
  def __init__(self):
347
- self.cache = dict()
345
+ self.cache = {}
348
346
 
349
347
  def __call__(self, arrow, vertex_images, bdry_map=None):
350
348
  if bdry_map is None:
@@ -3,6 +3,7 @@ Defines the main function `exterior_to_link`.
3
3
  """
4
4
 
5
5
  import random
6
+ import typing
6
7
  from .exceptions import ExteriorToLinkError
7
8
  from .simplify_to_base_tri import good_simplification
8
9
  from . import put_in_S3
@@ -40,13 +41,13 @@ def filled_is_3sphere(manifold):
40
41
 
41
42
 
42
43
  def exterior_to_link(manifold,
43
- verbose=False,
44
- check_input=True,
45
- check_answer=True,
46
- careful_perturbation=True,
47
- simplify_link=True,
48
- pachner_search_tries=10,
49
- seed=None):
44
+ verbose : bool = False,
45
+ check_input : bool = True,
46
+ check_answer : bool = True,
47
+ careful_perturbation : bool = True,
48
+ simplify_link : bool = True,
49
+ pachner_search_tries :int = 10,
50
+ seed : typing.Optional[int] = None) -> 'Link':
50
51
  """
51
52
  For a triangulation of the exterior of a link in the 3-sphere,
52
53
  return a planar diagram for the link. The peripheral curves whose
@@ -155,7 +155,7 @@ def straighten_arcs(arcs):
155
155
  # keep track of where we most recently had success.
156
156
  offset = 0
157
157
  # We also keep track of arcs obstructing a given triangle
158
- obstructions = dict()
158
+ obstructions = {}
159
159
  # Every success reduces the number of arcs by one, so
160
160
  # terminates.
161
161
  while success:
@@ -590,7 +590,7 @@ def add_core_arc_in_one_tet_solid_torus(mcomplex, tet):
590
590
  assert no_fixed_point(tet.Gluing[F2]) and no_fixed_point(tet.Gluing[F3])
591
591
  # c0, c1, c2, c3 = [QQ(x) for x in ['1/5', '1/7', '0', '23/35']] # original
592
592
  # c0, c1, c2, c3 = [QQ(x) for x in ['21874/65536', '21841/65536', '0', '21821/65536']]
593
- c0, c1, c2, c3 = [QQ(x) for x in ['1/3', '1/3', '0', '1/3']]
593
+ c0, c1, c2, c3 = (QQ(x) for x in ['1/3', '1/3', '0', '1/3'])
594
594
  p1 = BarycentricPoint(c0, c1, c2, c3)
595
595
  p2 = p1.permute(tet.Gluing[F2])
596
596
  tet.arcs = [BarycentricArc(p1, p2)]
@@ -17,7 +17,7 @@ use_pari_even_inside_sage = False
17
17
  from .. import sage_helper
18
18
 
19
19
  if sage_helper._within_sage and not use_pari_even_inside_sage:
20
- from sage.all import QQ, RR, vector, matrix, VectorSpace
20
+ from ..sage_helper import QQ, RR, vector, matrix, VectorSpace
21
21
 
22
22
  def rational_sqrt(x):
23
23
  """
@@ -16,7 +16,7 @@ Notes:
16
16
  This file is not currently used by SnapPy, but is kept for possible
17
17
  future reference.
18
18
  """
19
- from sage.all import QQ, vector, matrix, VectorSpace
19
+ from ..sage_helper import QQ, vector, matrix, VectorSpace
20
20
 
21
21
 
22
22
  class Vector:
@@ -1,43 +1,31 @@
1
+ from snappy import testing
1
2
  import snappy
2
- import sys
3
- import getopt
4
- from . import (rational_linear_algebra,
5
- pl_utils,
6
- barycentric_geometry,
7
- hyp_utils,
8
- link_projection,
9
- mcomplex_with_memory,
10
- mcomplex_with_expansion,
11
- mcomplex_with_link,
12
- simplify_to_base_tri,
13
- put_in_S3,
14
- main)
15
3
 
16
- modules = [rational_linear_algebra,
17
- pl_utils,
18
- barycentric_geometry,
19
- hyp_utils,
20
- link_projection,
21
- mcomplex_with_memory,
22
- mcomplex_with_expansion,
23
- mcomplex_with_link,
24
- simplify_to_base_tri,
25
- put_in_S3,
26
- main]
4
+ from snappy import exterior_to_link
27
5
 
6
+ modules = [
7
+ exterior_to_link.rational_linear_algebra,
8
+ exterior_to_link.pl_utils,
9
+ exterior_to_link.barycentric_geometry,
10
+ exterior_to_link.hyp_utils,
11
+ exterior_to_link.link_projection,
12
+ exterior_to_link.mcomplex_with_memory,
13
+ exterior_to_link.mcomplex_with_expansion,
14
+ exterior_to_link.mcomplex_with_link,
15
+ exterior_to_link.simplify_to_base_tri,
16
+ exterior_to_link.put_in_S3,
17
+ exterior_to_link.main
18
+ ]
28
19
 
29
20
  def run_doctests(verbose=False, print_info=True):
30
21
  globs = {'Manifold': snappy.Manifold,
31
22
  'Triangulation': snappy.Triangulation}
32
- results = snappy.sage_helper.doctest_modules(modules,
33
- verbose=verbose,
34
- extraglobs=globs,
35
- print_info=print_info)
36
- return results
23
+ return testing.doctest_modules(modules,
24
+ verbose=verbose,
25
+ print_info=print_info,
26
+ extraglobs=globs)
37
27
 
28
+ run_doctests.__name__ = exterior_to_link.__name__
38
29
 
39
30
  if __name__ == '__main__':
40
- optlist, args = getopt.getopt(sys.argv[1:], 'v', ['verbose'])
41
- verbose = len(optlist) > 0
42
- results = run_doctests(verbose)
43
- sys.exit(results.failed)
31
+ testing.run_doctests_as_main(run_doctests)