snappy 3.1.1__cp312-cp312-macosx_11_0_arm64.whl → 3.2__cp312-cp312-macosx_11_0_arm64.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (461) hide show
  1. snappy/CyOpenGL.cpython-312-darwin.so +0 -0
  2. snappy/SnapPy.cpython-312-darwin.so +0 -0
  3. snappy/SnapPyHP.cpython-312-darwin.so +0 -0
  4. snappy/__init__.py +271 -401
  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/development.rst.txt +66 -46
  25. snappy/doc/_sources/index.rst.txt +72 -5
  26. snappy/doc/_sources/installing.rst.txt +145 -162
  27. snappy/doc/_sources/news.rst.txt +73 -1
  28. snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
  29. snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
  30. snappy/doc/_sources/triangulation.rst.txt +2 -2
  31. snappy/doc/_sources/verify.rst.txt +89 -29
  32. snappy/doc/_sources/verify_internals.rst.txt +5 -16
  33. snappy/doc/_static/basic.css +1 -1
  34. snappy/doc/_static/css/badge_only.css +1 -1
  35. snappy/doc/_static/css/theme.css +1 -1
  36. snappy/doc/_static/doctools.js +1 -1
  37. snappy/doc/_static/documentation_options.js +1 -1
  38. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  39. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  40. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  41. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  42. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  43. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  44. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  45. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  46. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  47. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  48. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  49. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  50. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  51. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  52. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  53. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  54. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  55. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  56. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  57. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  58. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  59. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  60. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  61. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  62. snappy/doc/_static/js/versions.js +228 -0
  63. snappy/doc/_static/language_data.js +2 -2
  64. snappy/doc/_static/searchtools.js +108 -62
  65. snappy/doc/additional_classes.html +209 -40
  66. snappy/doc/bugs.html +16 -19
  67. snappy/doc/censuses.html +19 -38
  68. snappy/doc/credits.html +16 -19
  69. snappy/doc/development.html +84 -64
  70. snappy/doc/genindex.html +65 -144
  71. snappy/doc/index.html +81 -26
  72. snappy/doc/installing.html +158 -176
  73. snappy/doc/manifold.html +1119 -507
  74. snappy/doc/manifoldhp.html +16 -19
  75. snappy/doc/news.html +90 -32
  76. snappy/doc/objects.inv +0 -0
  77. snappy/doc/other.html +17 -19
  78. snappy/doc/platonic_census.html +16 -19
  79. snappy/doc/plink.html +16 -19
  80. snappy/doc/ptolemy.html +17 -19
  81. snappy/doc/ptolemy_classes.html +31 -34
  82. snappy/doc/ptolemy_examples1.html +23 -25
  83. snappy/doc/ptolemy_examples2.html +16 -19
  84. snappy/doc/ptolemy_examples3.html +18 -21
  85. snappy/doc/ptolemy_examples4.html +16 -19
  86. snappy/doc/ptolemy_prelim.html +17 -20
  87. snappy/doc/py-modindex.html +16 -19
  88. snappy/doc/screenshots.html +18 -20
  89. snappy/doc/search.html +15 -18
  90. snappy/doc/searchindex.js +1 -1
  91. snappy/doc/snap.html +16 -19
  92. snappy/doc/snappy.html +17 -19
  93. snappy/doc/spherogram.html +29 -32
  94. snappy/doc/todo.html +16 -19
  95. snappy/doc/triangulation.html +299 -190
  96. snappy/doc/tutorial.html +16 -19
  97. snappy/doc/verify.html +97 -43
  98. snappy/doc/verify_internals.html +59 -516
  99. snappy/drilling/__init__.py +153 -235
  100. snappy/drilling/barycentric.py +103 -0
  101. snappy/drilling/constants.py +0 -2
  102. snappy/drilling/crush.py +56 -130
  103. snappy/drilling/cusps.py +12 -6
  104. snappy/drilling/debug.py +2 -1
  105. snappy/drilling/exceptions.py +7 -40
  106. snappy/drilling/moves.py +302 -243
  107. snappy/drilling/perturb.py +63 -37
  108. snappy/drilling/shorten.py +36 -0
  109. snappy/drilling/subdivide.py +0 -5
  110. snappy/drilling/test.py +23 -0
  111. snappy/drilling/test_cases.py +126 -0
  112. snappy/drilling/tracing.py +9 -37
  113. snappy/exceptions.py +18 -5
  114. snappy/exterior_to_link/barycentric_geometry.py +2 -4
  115. snappy/exterior_to_link/main.py +8 -7
  116. snappy/exterior_to_link/mcomplex_with_link.py +2 -2
  117. snappy/exterior_to_link/rational_linear_algebra.py +1 -1
  118. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
  119. snappy/exterior_to_link/test.py +21 -33
  120. snappy/geometric_structure/__init__.py +212 -0
  121. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  122. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  123. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  124. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  125. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  126. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  127. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  128. snappy/geometric_structure/geodesic/__init__.py +0 -0
  129. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  130. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  131. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  132. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  133. snappy/geometric_structure/geodesic/constants.py +6 -0
  134. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  135. snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
  136. snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
  137. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  138. snappy/geometric_structure/geodesic/line.py +30 -0
  139. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  140. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  141. snappy/geometric_structure/test.py +22 -0
  142. snappy/gui.py +23 -13
  143. snappy/horoviewer.py +7 -7
  144. snappy/hyperboloid/__init__.py +96 -31
  145. snappy/hyperboloid/distances.py +245 -0
  146. snappy/hyperboloid/horoball.py +19 -0
  147. snappy/hyperboloid/line.py +35 -0
  148. snappy/hyperboloid/point.py +9 -0
  149. snappy/hyperboloid/triangle.py +29 -0
  150. snappy/isometry_signature.py +382 -0
  151. snappy/len_spec/__init__.py +596 -0
  152. snappy/len_spec/geodesic_info.py +110 -0
  153. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  154. snappy/len_spec/geodesic_piece.py +143 -0
  155. snappy/len_spec/geometric_structure.py +182 -0
  156. snappy/len_spec/geometry.py +80 -0
  157. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  158. snappy/len_spec/spine.py +206 -0
  159. snappy/len_spec/test.py +24 -0
  160. snappy/len_spec/test_cases.py +69 -0
  161. snappy/len_spec/tile.py +275 -0
  162. snappy/len_spec/word.py +86 -0
  163. snappy/math_basics.py +39 -13
  164. snappy/matrix.py +52 -9
  165. snappy/number.py +12 -6
  166. snappy/numeric_output_checker.py +2 -3
  167. snappy/pari.py +6 -3
  168. snappy/polyviewer.py +8 -8
  169. snappy/ptolemy/__init__.py +1 -1
  170. snappy/ptolemy/component.py +2 -2
  171. snappy/ptolemy/coordinates.py +25 -25
  172. snappy/ptolemy/findLoops.py +9 -9
  173. snappy/ptolemy/manifoldMethods.py +27 -29
  174. snappy/ptolemy/polynomial.py +50 -57
  175. snappy/ptolemy/processFileBase.py +60 -0
  176. snappy/ptolemy/ptolemyVariety.py +109 -41
  177. snappy/ptolemy/reginaWrapper.py +4 -4
  178. snappy/ptolemy/rur.py +1 -1
  179. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
  180. snappy/ptolemy/test.py +99 -54
  181. snappy/ptolemy/utilities.py +1 -1
  182. snappy/raytracing/__init__.py +64 -0
  183. snappy/raytracing/additional_horospheres.py +64 -0
  184. snappy/raytracing/additional_len_spec_choices.py +63 -0
  185. snappy/raytracing/cohomology_fractal.py +0 -3
  186. snappy/raytracing/eyeball.py +123 -0
  187. snappy/raytracing/finite_raytracing_data.py +17 -17
  188. snappy/raytracing/finite_viewer.py +15 -15
  189. snappy/raytracing/geodesic_tube_info.py +93 -63
  190. snappy/raytracing/geodesics.py +94 -64
  191. snappy/raytracing/geodesics_window.py +56 -34
  192. snappy/raytracing/gui_utilities.py +21 -6
  193. snappy/raytracing/hyperboloid_navigation.py +29 -4
  194. snappy/raytracing/hyperboloid_utilities.py +73 -73
  195. snappy/raytracing/ideal_raytracing_data.py +121 -91
  196. snappy/raytracing/inside_viewer.py +199 -66
  197. snappy/raytracing/pack.py +22 -0
  198. snappy/raytracing/raytracing_data.py +37 -25
  199. snappy/raytracing/raytracing_view.py +70 -65
  200. snappy/raytracing/shaders/Eye.png +0 -0
  201. snappy/raytracing/shaders/NonGeometric.png +0 -0
  202. snappy/raytracing/shaders/__init__.py +39 -3
  203. snappy/raytracing/shaders/fragment.glsl +451 -133
  204. snappy/raytracing/test.py +29 -0
  205. snappy/raytracing/tooltip.py +146 -0
  206. snappy/raytracing/upper_halfspace_utilities.py +42 -9
  207. snappy/sage_helper.py +67 -134
  208. snappy/settings.py +90 -77
  209. snappy/shell.py +2 -0
  210. snappy/snap/character_varieties.py +2 -2
  211. snappy/snap/find_field.py +4 -3
  212. snappy/snap/fundamental_polyhedron.py +2 -2
  213. snappy/snap/kernel_structures.py +5 -1
  214. snappy/snap/nsagetools.py +9 -8
  215. snappy/snap/peripheral/dual_cellulation.py +4 -3
  216. snappy/snap/peripheral/peripheral.py +2 -2
  217. snappy/snap/peripheral/surface.py +5 -5
  218. snappy/snap/peripheral/test.py +1 -1
  219. snappy/snap/polished_reps.py +8 -8
  220. snappy/snap/slice_obs_HKL.py +16 -14
  221. snappy/snap/t3mlite/arrow.py +3 -3
  222. snappy/snap/t3mlite/edge.py +3 -3
  223. snappy/snap/t3mlite/homology.py +2 -2
  224. snappy/snap/t3mlite/mcomplex.py +3 -3
  225. snappy/snap/t3mlite/simplex.py +12 -0
  226. snappy/snap/t3mlite/spun.py +18 -17
  227. snappy/snap/t3mlite/test_vs_regina.py +4 -4
  228. snappy/snap/test.py +37 -53
  229. snappy/snap/utilities.py +4 -5
  230. snappy/test.py +121 -138
  231. snappy/test_cases.py +263 -0
  232. snappy/testing.py +131 -0
  233. snappy/tiling/__init__.py +2 -0
  234. snappy/tiling/canonical_key_dict.py +59 -0
  235. snappy/tiling/dict_based_set.py +79 -0
  236. snappy/tiling/floor.py +49 -0
  237. snappy/tiling/hyperboloid_dict.py +54 -0
  238. snappy/tiling/iter_utils.py +78 -0
  239. snappy/tiling/lifted_tetrahedron.py +22 -0
  240. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  241. snappy/tiling/real_hash_dict.py +164 -0
  242. snappy/tiling/test.py +23 -0
  243. snappy/tiling/tile.py +215 -0
  244. snappy/tiling/triangle.py +33 -0
  245. snappy/tkterminal.py +113 -84
  246. snappy/twister/main.py +1 -7
  247. snappy/twister/twister_core.cpython-312-darwin.so +0 -0
  248. snappy/upper_halfspace/__init__.py +78 -17
  249. snappy/verify/__init__.py +3 -7
  250. snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
  251. snappy/verify/complex_volume/adjust_torsion.py +1 -2
  252. snappy/verify/complex_volume/closed.py +13 -13
  253. snappy/verify/complex_volume/cusped.py +6 -6
  254. snappy/verify/complex_volume/extended_bloch.py +5 -8
  255. snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
  256. snappy/verify/edge_equations.py +80 -0
  257. snappy/verify/exceptions.py +0 -55
  258. snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
  259. snappy/verify/interval_newton_shapes_engine.py +7 -5
  260. snappy/verify/interval_tree.py +5 -5
  261. snappy/verify/krawczyk_shapes_engine.py +17 -18
  262. snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
  263. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
  264. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
  265. snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
  266. snappy/verify/shapes.py +5 -3
  267. snappy/verify/short_slopes.py +39 -41
  268. snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
  269. snappy/verify/test.py +57 -60
  270. snappy/verify/upper_halfspace/extended_matrix.py +1 -1
  271. snappy/verify/upper_halfspace/finite_point.py +3 -4
  272. snappy/verify/upper_halfspace/ideal_point.py +9 -9
  273. snappy/verify/volume.py +2 -2
  274. snappy/version.py +2 -2
  275. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/METADATA +25 -11
  276. snappy-3.2.dist-info/RECORD +503 -0
  277. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  278. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  279. snappy/__pycache__/__init__.cpython-312.pyc +0 -0
  280. snappy/__pycache__/browser.cpython-312.pyc +0 -0
  281. snappy/__pycache__/cache.cpython-312.pyc +0 -0
  282. snappy/__pycache__/database.cpython-312.pyc +0 -0
  283. snappy/__pycache__/db_utilities.cpython-312.pyc +0 -0
  284. snappy/__pycache__/decorated_isosig.cpython-312.pyc +0 -0
  285. snappy/__pycache__/exceptions.cpython-312.pyc +0 -0
  286. snappy/__pycache__/export_stl.cpython-312.pyc +0 -0
  287. snappy/__pycache__/filedialog.cpython-312.pyc +0 -0
  288. snappy/__pycache__/gui.cpython-312.pyc +0 -0
  289. snappy/__pycache__/horoviewer.cpython-312.pyc +0 -0
  290. snappy/__pycache__/infowindow.cpython-312.pyc +0 -0
  291. snappy/__pycache__/math_basics.cpython-312.pyc +0 -0
  292. snappy/__pycache__/matrix.cpython-312.pyc +0 -0
  293. snappy/__pycache__/number.cpython-312.pyc +0 -0
  294. snappy/__pycache__/numeric_output_checker.cpython-312.pyc +0 -0
  295. snappy/__pycache__/pari.cpython-312.pyc +0 -0
  296. snappy/__pycache__/polyviewer.cpython-312.pyc +0 -0
  297. snappy/__pycache__/sage_helper.cpython-312.pyc +0 -0
  298. snappy/__pycache__/version.cpython-312.pyc +0 -0
  299. snappy/doc/_sources/verify_canon.rst.txt +0 -90
  300. snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
  301. snappy/doc/_static/js/html5shiv.min.js +0 -4
  302. snappy/doc/verify_canon.html +0 -304
  303. snappy/drilling/__pycache__/__init__.cpython-312.pyc +0 -0
  304. snappy/drilling/__pycache__/constants.cpython-312.pyc +0 -0
  305. snappy/drilling/__pycache__/crush.cpython-312.pyc +0 -0
  306. snappy/drilling/__pycache__/cusps.cpython-312.pyc +0 -0
  307. snappy/drilling/__pycache__/debug.cpython-312.pyc +0 -0
  308. snappy/drilling/__pycache__/epsilons.cpython-312.pyc +0 -0
  309. snappy/drilling/__pycache__/exceptions.cpython-312.pyc +0 -0
  310. snappy/drilling/__pycache__/fixed_points.cpython-312.pyc +0 -0
  311. snappy/drilling/__pycache__/geodesic_info.cpython-312.pyc +0 -0
  312. snappy/drilling/__pycache__/geodesic_tube.cpython-312.pyc +0 -0
  313. snappy/drilling/__pycache__/geometric_structure.cpython-312.pyc +0 -0
  314. snappy/drilling/__pycache__/line.cpython-312.pyc +0 -0
  315. snappy/drilling/__pycache__/moves.cpython-312.pyc +0 -0
  316. snappy/drilling/__pycache__/peripheral_curves.cpython-312.pyc +0 -0
  317. snappy/drilling/__pycache__/perturb.cpython-312.pyc +0 -0
  318. snappy/drilling/__pycache__/quotient_space.cpython-312.pyc +0 -0
  319. snappy/drilling/__pycache__/spatial_dict.cpython-312.pyc +0 -0
  320. snappy/drilling/__pycache__/subdivide.cpython-312.pyc +0 -0
  321. snappy/drilling/__pycache__/tracing.cpython-312.pyc +0 -0
  322. snappy/drilling/geodesic_tube.py +0 -441
  323. snappy/drilling/geometric_structure.py +0 -366
  324. snappy/drilling/line.py +0 -122
  325. snappy/drilling/quotient_space.py +0 -94
  326. snappy/drilling/spatial_dict.py +0 -128
  327. snappy/exterior_to_link/__pycache__/__init__.cpython-312.pyc +0 -0
  328. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-312.pyc +0 -0
  329. snappy/exterior_to_link/__pycache__/exceptions.cpython-312.pyc +0 -0
  330. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-312.pyc +0 -0
  331. snappy/exterior_to_link/__pycache__/link_projection.cpython-312.pyc +0 -0
  332. snappy/exterior_to_link/__pycache__/main.cpython-312.pyc +0 -0
  333. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-312.pyc +0 -0
  334. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-312.pyc +0 -0
  335. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-312.pyc +0 -0
  336. snappy/exterior_to_link/__pycache__/pl_utils.cpython-312.pyc +0 -0
  337. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-312.pyc +0 -0
  338. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-312.pyc +0 -0
  339. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-312.pyc +0 -0
  340. snappy/exterior_to_link/__pycache__/stored_moves.cpython-312.pyc +0 -0
  341. snappy/hyperboloid/__pycache__/__init__.cpython-312.pyc +0 -0
  342. snappy/manifolds/__pycache__/__init__.cpython-312.pyc +0 -0
  343. snappy/ptolemy/__pycache__/__init__.cpython-312.pyc +0 -0
  344. snappy/ptolemy/__pycache__/component.cpython-312.pyc +0 -0
  345. snappy/ptolemy/__pycache__/coordinates.cpython-312.pyc +0 -0
  346. snappy/ptolemy/__pycache__/fieldExtensions.cpython-312.pyc +0 -0
  347. snappy/ptolemy/__pycache__/findLoops.cpython-312.pyc +0 -0
  348. snappy/ptolemy/__pycache__/homology.cpython-312.pyc +0 -0
  349. snappy/ptolemy/__pycache__/manifoldMethods.cpython-312.pyc +0 -0
  350. snappy/ptolemy/__pycache__/matrix.cpython-312.pyc +0 -0
  351. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-312.pyc +0 -0
  352. snappy/ptolemy/__pycache__/polynomial.cpython-312.pyc +0 -0
  353. snappy/ptolemy/__pycache__/processComponents.cpython-312.pyc +0 -0
  354. snappy/ptolemy/__pycache__/processFileBase.cpython-312.pyc +0 -0
  355. snappy/ptolemy/__pycache__/processFileDispatch.cpython-312.pyc +0 -0
  356. snappy/ptolemy/__pycache__/processMagmaFile.cpython-312.pyc +0 -0
  357. snappy/ptolemy/__pycache__/processRurFile.cpython-312.pyc +0 -0
  358. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-312.pyc +0 -0
  359. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-312.pyc +0 -0
  360. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-312.pyc +0 -0
  361. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
  362. snappy/ptolemy/__pycache__/rur.cpython-312.pyc +0 -0
  363. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
  364. snappy/ptolemy/__pycache__/utilities.cpython-312.pyc +0 -0
  365. snappy/raytracing/__pycache__/__init__.cpython-312.pyc +0 -0
  366. snappy/raytracing/__pycache__/finite_raytracing_data.cpython-312.pyc +0 -0
  367. snappy/raytracing/__pycache__/gui_utilities.cpython-312.pyc +0 -0
  368. snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-312.pyc +0 -0
  369. snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-312.pyc +0 -0
  370. snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-312.pyc +0 -0
  371. snappy/raytracing/__pycache__/inside_viewer.cpython-312.pyc +0 -0
  372. snappy/raytracing/__pycache__/raytracing_data.cpython-312.pyc +0 -0
  373. snappy/raytracing/__pycache__/raytracing_view.cpython-312.pyc +0 -0
  374. snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-312.pyc +0 -0
  375. snappy/raytracing/__pycache__/view_scale_controller.cpython-312.pyc +0 -0
  376. snappy/raytracing/zoom_slider/__pycache__/__init__.cpython-312.pyc +0 -0
  377. snappy/snap/__pycache__/__init__.cpython-312.pyc +0 -0
  378. snappy/snap/__pycache__/character_varieties.cpython-312.pyc +0 -0
  379. snappy/snap/__pycache__/fundamental_polyhedron.cpython-312.pyc +0 -0
  380. snappy/snap/__pycache__/interval_reps.cpython-312.pyc +0 -0
  381. snappy/snap/__pycache__/kernel_structures.cpython-312.pyc +0 -0
  382. snappy/snap/__pycache__/mcomplex_base.cpython-312.pyc +0 -0
  383. snappy/snap/__pycache__/nsagetools.cpython-312.pyc +0 -0
  384. snappy/snap/__pycache__/polished_reps.cpython-312.pyc +0 -0
  385. snappy/snap/__pycache__/shapes.cpython-312.pyc +0 -0
  386. snappy/snap/__pycache__/slice_obs_HKL.cpython-312.pyc +0 -0
  387. snappy/snap/__pycache__/utilities.cpython-312.pyc +0 -0
  388. snappy/snap/peripheral/__pycache__/__init__.cpython-312.pyc +0 -0
  389. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-312.pyc +0 -0
  390. snappy/snap/peripheral/__pycache__/link.cpython-312.pyc +0 -0
  391. snappy/snap/peripheral/__pycache__/peripheral.cpython-312.pyc +0 -0
  392. snappy/snap/peripheral/__pycache__/surface.cpython-312.pyc +0 -0
  393. snappy/snap/t3mlite/__pycache__/__init__.cpython-312.pyc +0 -0
  394. snappy/snap/t3mlite/__pycache__/arrow.cpython-312.pyc +0 -0
  395. snappy/snap/t3mlite/__pycache__/corner.cpython-312.pyc +0 -0
  396. snappy/snap/t3mlite/__pycache__/edge.cpython-312.pyc +0 -0
  397. snappy/snap/t3mlite/__pycache__/face.cpython-312.pyc +0 -0
  398. snappy/snap/t3mlite/__pycache__/files.cpython-312.pyc +0 -0
  399. snappy/snap/t3mlite/__pycache__/homology.cpython-312.pyc +0 -0
  400. snappy/snap/t3mlite/__pycache__/linalg.cpython-312.pyc +0 -0
  401. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-312.pyc +0 -0
  402. snappy/snap/t3mlite/__pycache__/perm4.cpython-312.pyc +0 -0
  403. snappy/snap/t3mlite/__pycache__/simplex.cpython-312.pyc +0 -0
  404. snappy/snap/t3mlite/__pycache__/spun.cpython-312.pyc +0 -0
  405. snappy/snap/t3mlite/__pycache__/surface.cpython-312.pyc +0 -0
  406. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-312.pyc +0 -0
  407. snappy/snap/t3mlite/__pycache__/vertex.cpython-312.pyc +0 -0
  408. snappy/togl/__init__.py +0 -3
  409. snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
  410. snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
  411. snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  412. snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
  413. snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
  414. snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
  415. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  416. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
  417. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  418. snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
  419. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
  420. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
  421. snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  422. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  423. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
  424. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
  425. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  426. snappy/twister/__pycache__/__init__.cpython-312.pyc +0 -0
  427. snappy/twister/__pycache__/main.cpython-312.pyc +0 -0
  428. snappy/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
  429. snappy/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
  430. snappy/verify/__pycache__/__init__.cpython-312.pyc +0 -0
  431. snappy/verify/__pycache__/cuspCrossSection.cpython-312.pyc +0 -0
  432. snappy/verify/__pycache__/cuspTranslations.cpython-312.pyc +0 -0
  433. snappy/verify/__pycache__/cusp_areas.cpython-312.pyc +0 -0
  434. snappy/verify/__pycache__/cusp_shapes.cpython-312.pyc +0 -0
  435. snappy/verify/__pycache__/exceptions.cpython-312.pyc +0 -0
  436. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-312.pyc +0 -0
  437. snappy/verify/__pycache__/interval_tree.cpython-312.pyc +0 -0
  438. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-312.pyc +0 -0
  439. snappy/verify/__pycache__/realAlgebra.cpython-312.pyc +0 -0
  440. snappy/verify/__pycache__/shapes.cpython-312.pyc +0 -0
  441. snappy/verify/__pycache__/short_slopes.cpython-312.pyc +0 -0
  442. snappy/verify/__pycache__/squareExtensions.cpython-312.pyc +0 -0
  443. snappy/verify/__pycache__/verifyCanonical.cpython-312.pyc +0 -0
  444. snappy/verify/__pycache__/verifyHyperbolicity.cpython-312.pyc +0 -0
  445. snappy/verify/__pycache__/volume.cpython-312.pyc +0 -0
  446. snappy/verify/complex_volume/__pycache__/__init__.cpython-312.pyc +0 -0
  447. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-312.pyc +0 -0
  448. snappy/verify/complex_volume/__pycache__/closed.cpython-312.pyc +0 -0
  449. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-312.pyc +0 -0
  450. snappy/verify/complex_volume/__pycache__/cusped.cpython-312.pyc +0 -0
  451. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-312.pyc +0 -0
  452. snappy/verify/cuspCrossSection.py +0 -1422
  453. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-312.pyc +0 -0
  454. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-312.pyc +0 -0
  455. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-312.pyc +0 -0
  456. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
  457. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-312.pyc +0 -0
  458. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-312.pyc +0 -0
  459. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
  460. snappy-3.1.1.dist-info/RECORD +0 -585
  461. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -0,0 +1,101 @@
1
+ from .maximal_cusp_area_matrix import maximal_cusp_area_matrix
2
+ from .trig_cusp_area_matrix import triangulation_dependent_cusp_area_matrix
3
+ from ..verify.maximal_cusp_area_matrix import legacy_verified_maximal_cusp_area_matrix
4
+
5
+ from typing import Optional
6
+
7
+ def cusp_area_matrix(
8
+ manifold,
9
+ method : str = 'maximal',
10
+ verified : bool = False,
11
+ bits_prec : Optional[int] = None):
12
+ """
13
+ Returns the maximal cusp area matrix :math:`(A_{ij})` where
14
+ :math:`A_{ij}` is defined as follows.
15
+ Let :math:`C_i` and :math:`C_j` be the (open) cusp neighborhoods about cusp
16
+ :math:`i` and :math:`j`. Let :math:`A(C_i)` and :math:`A(C_j)` be the
17
+ areas of :math:`C_i` and :math:`C_j`, respectively. Then, :math:`C_i`
18
+ and :math:`C_j` are embedded (if :math:`i = j`) or disjoint (otherwise)
19
+ if and only if :math:`A(C_i)A(C_j) \\leq A_{ij}`.
20
+
21
+ Here is an example::
22
+
23
+ >>> M = Manifold("L6a5")
24
+ >>> M.cusp_area_matrix() # doctest: +NUMERIC12
25
+ [27.9999999999996 7.00000000000000 7.00000000000000]
26
+ [7.00000000000000 27.9999999999999 7.00000000000000]
27
+ [7.00000000000000 7.00000000000000 28.0000000000001]
28
+
29
+
30
+ **Faster lower bounds**
31
+
32
+ This section can be skipped by most users!
33
+
34
+ Prior to SnapPy version 3.2, the algorithm to compute the maximal cusp
35
+ area matrix was much slower and required :attr:`verified = True` and
36
+ SageMath. Thus, in prior versions, :attr:`method` defaulted to
37
+ ``trigDependentTryCanonize``. This meant, that, by default,
38
+ :meth:`~snappy.Manifold.cusp_area_matrix` only returned
39
+ (some) lower bounds for the maximal cusp area matrix entries.
40
+
41
+ These lower bounds can still be accessed::
42
+
43
+ >>> M.cusp_area_matrix(method = 'trigDependentTryCanonize') # doctest: +NUMERIC12
44
+ [21.4375000000000 7.00000000000000 7.00000000000000]
45
+ [7.00000000000000 28.0000000000000 7.00000000000000]
46
+ [7.00000000000000 7.00000000000000 28.0000000000000]
47
+
48
+ If :attr:`method = 'trigDependent'` or
49
+ :attr:`method = 'trigDependenyTryCanonize'`, the result is triangulation
50
+ dependent or not even deterministic, respectively.
51
+ Furthermore, if :attr:`verified = True` is also set, while the left
52
+ endpoints of the intervals are lower bounds for the maximal cusp area
53
+ matrix entries, the right endpoints are meaningless and could be smaller
54
+ or larger than the maximal cusp area matrix entries.
55
+
56
+ **Verified computation**
57
+
58
+ If :attr:`verified = False`, floating-point issues can arise resulting in
59
+ incorrect values. The method can be made
60
+ :ref:`verified <verify-primer>` by passing :attr:`verified = True`::
61
+
62
+ sage: M.cusp_area_matrix(verified=True) # doctest: +NUMERIC3
63
+ [ 28.0000? 7.000000000000? 7.00000000000?]
64
+ [7.000000000000? 28.000000? 7.00000000000?]
65
+ [ 7.00000000000? 7.00000000000? 28.00000?]
66
+
67
+ :param verified:
68
+ Use :ref:`verified computation <verify-primer>`.
69
+ :param bits_prec:
70
+ Precision used for computation. Increase if computation
71
+ did not succeed or a more precise result is desired.
72
+ :param method:
73
+ Switches to older algorithms giving lower bounds when
74
+ ``trigDependentTryCanonize`` and ``trigDependent``.
75
+ :return:
76
+ Maximal cusp area matrix (default) or lower bounds
77
+ (if :attr:`method` switches to older algorithm).
78
+ """
79
+
80
+ if method == 'maximal':
81
+ return maximal_cusp_area_matrix(
82
+ manifold, bits_prec=bits_prec, verified=verified)
83
+ if method == 'maximalLegacy':
84
+ if not verified:
85
+ raise NotImplementedError("Maximal cusp area matrix only "
86
+ "available as verified computation. "
87
+ "Pass verified = True.")
88
+ return legacy_verified_maximal_cusp_area_matrix(
89
+ manifold, bits_prec=bits_prec)
90
+ if method in ['trigDependent', 'trigDependentTryCanonize']:
91
+ if method == 'trigDependentTryCanonize':
92
+ manifold = manifold.copy()
93
+ manifold.canonize()
94
+
95
+ return triangulation_dependent_cusp_area_matrix(
96
+ manifold, bits_prec=bits_prec, verified=verified)
97
+
98
+ raise ValueError("method passed to cusp_area_matrix must be "
99
+ "'trigDependent', 'trigDependentTryCanonize', "
100
+ "or 'maximal'.")
101
+
@@ -1,26 +1,8 @@
1
- from ..sage_helper import _within_sage
2
1
  from ..math_basics import correct_min, is_RealIntervalFieldElement
3
2
 
4
3
  __all__ = ['unbiased_cusp_areas_from_cusp_area_matrix',
5
4
  'greedy_cusp_areas_from_cusp_area_matrix']
6
5
 
7
- if _within_sage:
8
- # python's sqrt only work for floats
9
- # They would fail or convert to float losing precision
10
- from sage.all import sqrt
11
- else:
12
- import math
13
-
14
- # Otherwise, define our own sqrt which checks whether
15
- # the given type defines a sqrt method and fallsback
16
- # to python's log and sqrt which has the above drawback of
17
- # potentially losing precision.
18
- def sqrt(x):
19
- if hasattr(x, 'sqrt'):
20
- return x.sqrt()
21
- return math.sqrt(x)
22
-
23
-
24
6
  def unbiased_cusp_areas_from_cusp_area_matrix(cusp_area_matrix):
25
7
  """
26
8
 
@@ -32,10 +14,12 @@ def unbiased_cusp_areas_from_cusp_area_matrix(cusp_area_matrix):
32
14
  ... [RIF(6.0,6.001 ),RIF(4.0, 4.001)]]))
33
15
  [3.00?, 2.000?]
34
16
 
35
- >>> from snappy.SnapPy import matrix
17
+ >>> from snappy.number import Number, number_to_native_number
18
+ >>> def N(x): return number_to_native_number(Number(x))
19
+ >>> from snappy.matrix import make_matrix
36
20
  >>> unbiased_cusp_areas_from_cusp_area_matrix(
37
- ... matrix([[10.0, 40.0],
38
- ... [40.0, 20.0]]))
21
+ ... make_matrix([[N(10.0), N(40.0)],
22
+ ... [N(40.0), N(20.0)]])) # doctest: +NUMERIC9
39
23
  [3.1622776601683795, 4.47213595499958]
40
24
 
41
25
  """
@@ -57,10 +41,12 @@ def greedy_cusp_areas_from_cusp_area_matrix(cusp_area_matrix, first_cusps=[]):
57
41
  ... [RIF(6.0,6.001 ),RIF(10.0, 10.001)]]))
58
42
  [3.0001?, 2.000?]
59
43
 
60
- >>> from snappy.SnapPy import matrix
44
+ >>> from snappy.number import Number, number_to_native_number
45
+ >>> def N(x): return number_to_native_number(Number(x))
46
+ >>> from snappy.matrix import make_matrix
61
47
  >>> greedy_cusp_areas_from_cusp_area_matrix(
62
- ... matrix([[10.0, 40.0],
63
- ... [40.0, 20.0]]))
48
+ ... make_matrix([[N(10.0), N(40.0)],
49
+ ... [N(40.0), N(20.0)]])) # doctest: +NUMERIC9
64
50
  [3.1622776601683795, 4.47213595499958]
65
51
 
66
52
  """
@@ -74,7 +60,7 @@ def greedy_cusp_areas_from_cusp_area_matrix(cusp_area_matrix, first_cusps=[]):
74
60
  for i in range(num_cusps):
75
61
  stoppers = [ cusp_area_matrix[sigma[i], sigma[j]] / result[sigma[j]]
76
62
  for j in range(i) ]
77
- self_stopper = sqrt(cusp_area_matrix[sigma[i], sigma[i]])
63
+ self_stopper = cusp_area_matrix[sigma[i], sigma[i]].sqrt()
78
64
 
79
65
  result[sigma[i]] = correct_min(stoppers + [ self_stopper ])
80
66
 
@@ -96,17 +82,17 @@ def _interval_minimum_candidates(intervals_and_extras):
96
82
  def _find_potential_stoppers(cusp_area_matrix, assigned_areas):
97
83
  def stopper(i, j):
98
84
  if not assigned_areas[i] is None:
99
- return cusp_area_matrix[i,j] / assigned_areas[i]
85
+ return cusp_area_matrix[i, j] / assigned_areas[i]
100
86
  if not assigned_areas[j] is None:
101
- return cusp_area_matrix[i,j] / assigned_areas[j]
102
- return sqrt(cusp_area_matrix[i, j])
87
+ return cusp_area_matrix[i, j] / assigned_areas[j]
88
+ return cusp_area_matrix[i, j].sqrt()
103
89
 
104
90
  num_cusps = cusp_area_matrix.dimensions()[0]
105
91
 
106
- return [ (stopper(i, j), (i, j))
107
- for i in range(num_cusps)
108
- for j in range(i, num_cusps)
109
- if (assigned_areas[j] is None) or (assigned_areas[i] is None) ]
92
+ return [(stopper(i, j), (i, j))
93
+ for i in range(num_cusps)
94
+ for j in range(i, num_cusps)
95
+ if (assigned_areas[j] is None) or (assigned_areas[i] is None)]
110
96
 
111
97
 
112
98
  def _find_stoppers(cusp_area_matrix, assigned_areas):
@@ -130,19 +116,18 @@ def _get_cusps_from_stoppers(stoppers, assigned_areas):
130
116
  return result
131
117
 
132
118
 
133
- def _verified_unbiased_cusp_areas_from_cusp_area_matrix(
134
- cusp_area_matrix):
119
+ def _verified_unbiased_cusp_areas_from_cusp_area_matrix(cusp_area_matrix):
135
120
 
136
121
  num_cusps = cusp_area_matrix.dimensions()[0]
137
122
 
138
- result = num_cusps * [ None ]
123
+ result = num_cusps * [None]
139
124
 
140
125
  while None in result:
141
126
  stoppers = _find_stoppers(cusp_area_matrix, result)
142
127
 
143
- stoppers_union = _union_intervals([ stopper[0] for stopper in stoppers ])
128
+ stoppers_union = _union_intervals([stopper[0] for stopper in stoppers])
144
129
  cusps = _get_cusps_from_stoppers(stoppers, result)
145
- stopper_pairs = set([stopper[1] for stopper in stoppers])
130
+ stopper_pairs = {stopper[1] for stopper in stoppers}
146
131
 
147
132
  stop_size = (stoppers_union * stoppers_union) / stoppers_union
148
133
 
@@ -168,8 +153,7 @@ def _find_minimal_stopper(cusp_area_matrix, assigned_areas):
168
153
  return min(_find_potential_stoppers(cusp_area_matrix, assigned_areas))
169
154
 
170
155
 
171
- def _unverified_unbiased_cusp_areas_from_cusp_area_matrix(
172
- cusp_area_matrix):
156
+ def _unverified_unbiased_cusp_areas_from_cusp_area_matrix(cusp_area_matrix):
173
157
  num_cusps = cusp_area_matrix.dimensions()[0]
174
158
  num_pending = num_cusps
175
159
 
@@ -0,0 +1,136 @@
1
+ from ..geometric_structure.cusp_neighborhood.tiles_for_cusp_neighborhood import (
2
+ mcomplex_for_tiling_cusp_neighborhoods)
3
+ from ..tiling.tile import Tile
4
+
5
+ from ..matrix import make_matrix
6
+ from ..sage_helper import _within_sage
7
+ from ..math_basics import correct_min, is_RealIntervalFieldElement, lower
8
+
9
+ from ..hyperboloid.distances import distance_r13_horoballs
10
+
11
+ if _within_sage:
12
+ from ..sage_helper import Infinity
13
+
14
+ def maximal_cusp_area_matrix(manifold, bits_prec, verified):
15
+ """
16
+ A test case that hits both the tiling case and the early bail case
17
+ (using v.exp_self_distance_along_edges):
18
+
19
+ >>> from snappy import Manifold
20
+ >>> M = Manifold("o9_44206")
21
+ >>> maximal_cusp_area_matrix(M, bits_prec=53, verified=False) # doctest: +NUMERIC9
22
+ [88.4588035788544 14.3590180492058 11.4136568679715 9.67661682098105]
23
+ [14.3590180492058 88.4588035788533 9.67661682098102 11.4136568679705]
24
+ [11.4136568679715 9.67661682098102 88.4588035788541 14.3590180492042]
25
+ [9.67661682098105 11.4136568679705 14.3590180492042 88.4588035788038]
26
+
27
+ sage: from snappy import Manifold
28
+ sage: M = Manifold("o9_44206")
29
+ sage: maximal_cusp_area_matrix(M, bits_prec=80, verified=True) # doctest: +NUMERIC6
30
+ [ 88.458803578854197094? 14.3590180492058335371? 11.4136568679715291317? 9.6766168209810445566?]
31
+ [14.3590180492058335371? 88.4588035789? 9.676616820981044? 11.4136568680?]
32
+ [11.4136568679715291317? 9.676616820981044? 88.45880357885420? 14.35901804921?]
33
+ [ 9.6766168209810445566? 11.4136568680? 14.35901804921? 88.458803578?]
34
+ """
35
+
36
+ mcomplex = mcomplex_for_tiling_cusp_neighborhoods(
37
+ manifold, bits_prec=bits_prec, verified=verified)
38
+
39
+ n = len(mcomplex.Vertices)
40
+
41
+ lower_entries = [
42
+ [ _entry(mcomplex, i, j) for j in range(i + 1) ]
43
+ for i in range(n) ]
44
+
45
+ return make_matrix(
46
+ [[ lower_entries[i][j] if j < i else lower_entries[j][i]
47
+ for j in range(n) ]
48
+ for i in range(n) ])
49
+
50
+ def _entry(mcomplex, i, j):
51
+ p = mcomplex.Vertices[i].cusp_area * mcomplex.Vertices[j].cusp_area
52
+
53
+ if i == j:
54
+ return p * _diagonal_scale(mcomplex, i)
55
+ else:
56
+ return p * _non_diagonal_scale(mcomplex, i, j)
57
+
58
+ def _diagonal_scale(mcomplex, i):
59
+ v = mcomplex.Vertices[i]
60
+ e = v.exp_self_distance_along_edges
61
+ if not e is None:
62
+ if e < v.scale_for_std_form ** 2:
63
+ return e ** 2
64
+
65
+ if mcomplex.verified:
66
+ d = mcomplex.RF(Infinity)
67
+ else:
68
+ d = mcomplex.RF(1e20)
69
+
70
+ tet_to_lifts = [ [] for tet in mcomplex.Tetrahedra ]
71
+
72
+ for tile in v.tiles():
73
+ if tile.lower_bound_distance > d / 2:
74
+ return (2 * d).exp() # Area, so need square
75
+
76
+ new_lift = tile.inverse_lifted_geometric_object.defining_vec
77
+
78
+ tet_index = tile.lifted_tetrahedron.tet.Index
79
+
80
+ lifts = tet_to_lifts[tet_index]
81
+ for lift in lifts:
82
+ d = correct_min([d,
83
+ distance_r13_horoballs(new_lift, lift)])
84
+ lifts.append(new_lift)
85
+
86
+ def _non_diagonal_scale(mcomplex, i, j):
87
+ v0 = mcomplex.Vertices[i]
88
+ v1 = mcomplex.Vertices[j]
89
+ c = mcomplex.real_cusp_cross_section
90
+ e = c.exp_distance_neighborhoods_measured_along_edges(i, j)
91
+ if not e is None:
92
+ if e < v0.scale_for_std_form * v1.scale_for_std_form:
93
+ return e ** 2
94
+
95
+ if mcomplex.verified:
96
+ d = mcomplex.RF(Infinity)
97
+ else:
98
+ d = mcomplex.RF(1e20)
99
+
100
+ obj_to_tet_to_lifts = [ [ [] for tet in mcomplex.Tetrahedra ]
101
+ for i in range(2) ]
102
+
103
+ for tile in _merge_tiles([v0.tiles(), v1.tiles()]):
104
+ if tile.lower_bound_distance > d:
105
+ return (2 * d).exp()
106
+
107
+ new_lift = tile.inverse_lifted_geometric_object.defining_vec
108
+ tet_index = tile.lifted_tetrahedron.tet.Index
109
+
110
+ for lift in obj_to_tet_to_lifts[1 - tile.object_index][tet_index]:
111
+ d = correct_min([d,
112
+ distance_r13_horoballs(new_lift, lift)])
113
+ obj_to_tet_to_lifts[tile.object_index][tet_index].append(new_lift)
114
+
115
+ def _merge_tiles(streams_of_tiles):
116
+
117
+ iters = [ iter(s) for s in streams_of_tiles ]
118
+ tiles = [ next(iter) for iter in iters ]
119
+
120
+ while True:
121
+ i = _argmin(*(lower(tile.lower_bound_distance) for tile in tiles))
122
+ tile = tiles[i]
123
+ yield Tile(
124
+ # Relying on -inf + x = -inf
125
+ sum(t.lower_bound_distance for t in tiles),
126
+ tile.inverse_lifted_geometric_object,
127
+ tile.lifted_tetrahedron,
128
+ i)
129
+
130
+ tiles[i] = next(iters[i])
131
+
132
+ def _argmin(v0, v1):
133
+ if v0 < v1:
134
+ return 0
135
+ else:
136
+ return 1
snappy/cusps/test.py ADDED
@@ -0,0 +1,21 @@
1
+ from snappy import testing
2
+ import snappy
3
+
4
+ from snappy import cusps
5
+
6
+ modules = [
7
+ cusps.maximal_cusp_area_matrix,
8
+ cusps.cusp_areas_from_matrix
9
+ ]
10
+
11
+ def run_doctests(verbose=False, print_info=True):
12
+ globs = {'Manifold': snappy.Manifold}
13
+ return testing.doctest_modules(modules,
14
+ verbose=verbose,
15
+ print_info=print_info,
16
+ extraglobs=globs)
17
+
18
+ run_doctests.__name__ = cusps.__name__
19
+
20
+ if __name__ == '__main__':
21
+ testing.run_doctests_as_main(run_doctests)
@@ -0,0 +1,63 @@
1
+ from ..geometric_structure.cusp_neighborhood.real_cusp_cross_section import RealCuspCrossSection
2
+ from ..math_basics import correct_min
3
+ from ..verify.shapes import compute_hyperbolic_shapes
4
+ from ..matrix import make_matrix
5
+
6
+ __all__ = ['triangulation_dependent_cusp_area_matrix',
7
+ 'triangulation_dependent_cusp_area_matrix_from_cusp_cross_section']
8
+
9
+ def triangulation_dependent_cusp_area_matrix(
10
+ snappy_manifold, bits_prec, verified):
11
+ """
12
+ Interesting case: t12521
13
+
14
+ Maximal cusp area matrix:
15
+
16
+ [ 77.5537626509970512653317518641810890989543820290380458409? 11.40953140648583915022197187043644048603871960228564151087?]
17
+ [11.40953140648583915022197187043644048603871960228564151087? 91.1461442179608339668518063027198489593908228325190920?]
18
+
19
+ This result:
20
+
21
+ [ 77.553762651? 11.409531407?]
22
+ [ 11.409531407? 5.508968850234?]
23
+
24
+ After M.canonize:
25
+
26
+ [ 62.42018359? 11.409531407?]
27
+ [ 11.409531407? 15.1140644993?]
28
+ """
29
+ # Get shapes, as intervals if requested
30
+ shapes = compute_hyperbolic_shapes(
31
+ snappy_manifold, verified=verified, bits_prec=bits_prec)
32
+
33
+ # Compute cusp cross section, the code is agnostic about whether
34
+ # the numbers are floating-point or intervals.
35
+ #
36
+ # Note that the constructed cusp cross section will always be too "large"
37
+ # and we need to scale them down (since during construction the
38
+ # cross-section of each cusp will have one edge of length 1, the
39
+ # corresponding tetrahedron does not intersect in "standard" form.)
40
+
41
+ return triangulation_dependent_cusp_area_matrix_from_cusp_cross_section(
42
+ RealCuspCrossSection.fromManifoldAndShapes(snappy_manifold, shapes))
43
+
44
+ def triangulation_dependent_cusp_area_matrix_from_cusp_cross_section(c):
45
+
46
+ # Scale (up or down) all the cusps so that they are in standard form.
47
+ c.ensure_std_form(allow_scaling_up=True)
48
+
49
+ areas = c.cusp_areas()
50
+ RIF = areas[0].parent()
51
+
52
+ def entry(i, j):
53
+ result = areas[i] * areas[j]
54
+
55
+ d = c.exp_distance_neighborhoods_measured_along_edges(i, j)
56
+ if d is not None:
57
+ result *= correct_min([ RIF(1), d ]) ** 2
58
+ return result
59
+
60
+ n = len(areas)
61
+
62
+ return make_matrix([[entry(i, j) for i in range(n)]
63
+ for j in range(n)])
snappy/database.py CHANGED
@@ -22,17 +22,17 @@ import importlib
22
22
  import collections
23
23
 
24
24
  if _within_sage:
25
- import sage.all
25
+ from .sage_helper import Integer, RealDoubleElement, RealNumber
26
26
 
27
27
  def is_int(slice):
28
- return isinstance(slice, (sage.all.Integer, int))
28
+ return isinstance(slice, (Integer, int))
29
29
 
30
30
  def is_int_or_none(slice):
31
- return isinstance(slice, (sage.all.Integer, int, type(None)))
31
+ return isinstance(slice, (Integer, int, type(None)))
32
32
 
33
33
  def is_float_or_none(slice):
34
- return isinstance(slice, (float, sage.all.RealDoubleElement,
35
- sage.rings.real_mpfr.RealNumber, type(None)))
34
+ return isinstance(slice, (float, RealDoubleElement,
35
+ RealNumber, type(None)))
36
36
  else:
37
37
  def is_int(slice):
38
38
  return isinstance(slice, int)
@@ -98,6 +98,7 @@ class ManifoldTable():
98
98
  mfld_hash=mfld_hash, **filter_args):
99
99
  self._table = table
100
100
  self.mfld_hash = mfld_hash
101
+ self._db_path = db_path
101
102
  self._connection = connect_to_db(db_path)
102
103
  self._cursor = self._connection.cursor()
103
104
  self._set_schema()
@@ -110,7 +111,7 @@ class ManifoldTable():
110
111
  def _set_schema(self):
111
112
  cursor, table = self._cursor, self._table
112
113
  rows = cursor.execute("pragma table_info('%s')" % table).fetchall()
113
- self.schema = dict([(row[1], row[2].lower()) for row in rows])
114
+ self.schema = {row[1]: row[2].lower() for row in rows}
114
115
 
115
116
  def _check_schema(self):
116
117
  assert (self.schema['name'] == 'text' and
@@ -390,7 +391,7 @@ class ManifoldTable():
390
391
  except RuntimeError:
391
392
  pass
392
393
 
393
- mfld = mflds[0]
394
+ mfld = Triangulation(mflds[0]) # Drop the hyperbolic structure
394
395
  # Check for identical triangulations.
395
396
  if (False not in mfld.cusp_info('is_complete')) and not extends_to_link:
396
397
  for n in range(100):
@@ -431,7 +432,7 @@ def add_tables_from_package(package_name, must_succeed=True):
431
432
  package = importlib.import_module(package_name)
432
433
  except ImportError:
433
434
  if not must_succeed:
434
- return dict()
435
+ return {}
435
436
  else:
436
437
  raise ImportError('ManifoldTable package %s not found'
437
438
  % package_name)
@@ -446,7 +447,7 @@ def add_tables_from_package(package_name, must_succeed=True):
446
447
  # We also store the tables here so that their doctests can be
447
448
  # checked.
448
449
  if not hasattr(this_module, '__test__'):
449
- this_module.__test__ = dict()
450
+ this_module.__test__ = {}
450
451
  for name, table in new_tables.items():
451
452
  this_module.__test__[name] = table.__class__
452
453