snappy 3.1.1__cp311-cp311-win_amd64.whl → 3.2__cp311-cp311-win_amd64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cp311-win_amd64.pyd +0 -0
- snappy/SnapPy.cp311-win_amd64.pyd +0 -0
- snappy/SnapPyHP.cp311-win_amd64.pyd +0 -0
- snappy/__init__.py +299 -402
- snappy/app.py +70 -20
- snappy/browser.py +18 -17
- snappy/canonical.py +249 -0
- snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
- snappy/cusps/cusp_area_matrix.py +101 -0
- snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
- snappy/cusps/maximal_cusp_area_matrix.py +136 -0
- snappy/cusps/test.py +21 -0
- snappy/cusps/trig_cusp_area_matrix.py +63 -0
- snappy/database.py +10 -9
- snappy/decorated_isosig.py +337 -114
- snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
- snappy/dev/extended_ptolemy/extended.py +3 -3
- snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
- snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
- snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
- snappy/doc/_images/m125_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
- snappy/doc/_sources/additional_classes.rst.txt +40 -40
- snappy/doc/_sources/bugs.rst.txt +14 -14
- snappy/doc/_sources/censuses.rst.txt +51 -51
- snappy/doc/_sources/credits.rst.txt +75 -75
- snappy/doc/_sources/development.rst.txt +259 -239
- snappy/doc/_sources/index.rst.txt +182 -115
- snappy/doc/_sources/installing.rst.txt +247 -264
- snappy/doc/_sources/manifold.rst.txt +6 -6
- snappy/doc/_sources/manifoldhp.rst.txt +46 -46
- snappy/doc/_sources/news.rst.txt +355 -283
- snappy/doc/_sources/other.rst.txt +25 -25
- snappy/doc/_sources/platonic_census.rst.txt +20 -20
- snappy/doc/_sources/plink.rst.txt +102 -102
- snappy/doc/_sources/ptolemy.rst.txt +66 -66
- snappy/doc/_sources/ptolemy_classes.rst.txt +42 -42
- snappy/doc/_sources/ptolemy_examples1.rst.txt +298 -297
- snappy/doc/_sources/ptolemy_examples2.rst.txt +363 -363
- snappy/doc/_sources/ptolemy_examples3.rst.txt +301 -301
- snappy/doc/_sources/ptolemy_examples4.rst.txt +61 -61
- snappy/doc/_sources/ptolemy_prelim.rst.txt +105 -105
- snappy/doc/_sources/screenshots.rst.txt +21 -21
- snappy/doc/_sources/snap.rst.txt +87 -87
- snappy/doc/_sources/snappy.rst.txt +28 -28
- snappy/doc/_sources/spherogram.rst.txt +103 -103
- snappy/doc/_sources/todo.rst.txt +47 -47
- snappy/doc/_sources/triangulation.rst.txt +11 -11
- snappy/doc/_sources/tutorial.rst.txt +49 -49
- snappy/doc/_sources/verify.rst.txt +210 -150
- snappy/doc/_sources/verify_internals.rst.txt +79 -90
- snappy/doc/_static/basic.css +924 -902
- snappy/doc/_static/css/badge_only.css +1 -1
- snappy/doc/_static/css/theme.css +1 -1
- snappy/doc/_static/doctools.js +1 -1
- snappy/doc/_static/documentation_options.js +12 -13
- snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- snappy/doc/_static/js/versions.js +228 -0
- snappy/doc/_static/language_data.js +199 -199
- snappy/doc/_static/pygments.css +74 -73
- snappy/doc/_static/searchtools.js +125 -71
- snappy/doc/_static/snappy_furo.css +33 -33
- snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -42
- snappy/doc/_static/sphinx_highlight.js +13 -3
- snappy/doc/additional_classes.html +1499 -1330
- snappy/doc/bugs.html +131 -134
- snappy/doc/censuses.html +426 -445
- snappy/doc/credits.html +180 -183
- snappy/doc/development.html +383 -363
- snappy/doc/genindex.html +1330 -1409
- snappy/doc/index.html +261 -206
- snappy/doc/installing.html +345 -363
- snappy/doc/manifold.html +3451 -2839
- snappy/doc/manifoldhp.html +179 -182
- snappy/doc/news.html +387 -329
- snappy/doc/objects.inv +0 -0
- snappy/doc/other.html +160 -162
- snappy/doc/platonic_census.html +374 -377
- snappy/doc/plink.html +209 -212
- snappy/doc/ptolemy.html +253 -255
- snappy/doc/ptolemy_classes.html +1143 -1146
- snappy/doc/ptolemy_examples1.html +408 -410
- snappy/doc/ptolemy_examples2.html +470 -473
- snappy/doc/ptolemy_examples3.html +413 -416
- snappy/doc/ptolemy_examples4.html +194 -197
- snappy/doc/ptolemy_prelim.html +247 -250
- snappy/doc/py-modindex.html +164 -167
- snappy/doc/screenshots.html +140 -142
- snappy/doc/search.html +134 -137
- snappy/doc/searchindex.js +1 -1
- snappy/doc/snap.html +201 -204
- snappy/doc/snappy.html +180 -182
- snappy/doc/spherogram.html +1210 -1213
- snappy/doc/todo.html +165 -168
- snappy/doc/triangulation.html +1583 -1474
- snappy/doc/tutorial.html +158 -161
- snappy/doc/verify.html +329 -275
- snappy/doc/verify_internals.html +1234 -1691
- snappy/drilling/__init__.py +153 -235
- snappy/drilling/barycentric.py +103 -0
- snappy/drilling/constants.py +0 -2
- snappy/drilling/crush.py +56 -130
- snappy/drilling/cusps.py +12 -6
- snappy/drilling/debug.py +2 -1
- snappy/drilling/exceptions.py +7 -40
- snappy/drilling/moves.py +302 -243
- snappy/drilling/perturb.py +63 -37
- snappy/drilling/shorten.py +36 -0
- snappy/drilling/subdivide.py +0 -5
- snappy/drilling/test.py +23 -0
- snappy/drilling/test_cases.py +126 -0
- snappy/drilling/tracing.py +9 -37
- snappy/exceptions.py +18 -5
- snappy/exterior_to_link/barycentric_geometry.py +2 -4
- snappy/exterior_to_link/main.py +8 -7
- snappy/exterior_to_link/mcomplex_with_link.py +2 -2
- snappy/exterior_to_link/rational_linear_algebra.py +1 -1
- snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
- snappy/exterior_to_link/test.py +21 -33
- snappy/geometric_structure/__init__.py +212 -0
- snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
- snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
- snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
- snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
- snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
- snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
- snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
- snappy/geometric_structure/geodesic/__init__.py +0 -0
- snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
- snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
- snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
- snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
- snappy/geometric_structure/geodesic/constants.py +6 -0
- snappy/geometric_structure/geodesic/exceptions.py +22 -0
- snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
- snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
- snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
- snappy/geometric_structure/geodesic/line.py +30 -0
- snappy/geometric_structure/geodesic/multiplicity.py +127 -0
- snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
- snappy/geometric_structure/test.py +22 -0
- snappy/gui.py +23 -13
- snappy/horoviewer.py +7 -7
- snappy/hyperboloid/__init__.py +96 -31
- snappy/hyperboloid/distances.py +245 -0
- snappy/hyperboloid/horoball.py +19 -0
- snappy/hyperboloid/line.py +35 -0
- snappy/hyperboloid/point.py +9 -0
- snappy/hyperboloid/triangle.py +29 -0
- snappy/isometry_signature.py +382 -0
- snappy/len_spec/__init__.py +596 -0
- snappy/len_spec/geodesic_info.py +110 -0
- snappy/len_spec/geodesic_key_info_dict.py +117 -0
- snappy/len_spec/geodesic_piece.py +143 -0
- snappy/len_spec/geometric_structure.py +182 -0
- snappy/len_spec/geometry.py +80 -0
- snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
- snappy/len_spec/spine.py +206 -0
- snappy/len_spec/test.py +24 -0
- snappy/len_spec/test_cases.py +69 -0
- snappy/len_spec/tile.py +275 -0
- snappy/len_spec/word.py +86 -0
- snappy/math_basics.py +39 -13
- snappy/matrix.py +52 -9
- snappy/number.py +12 -6
- snappy/numeric_output_checker.py +2 -3
- snappy/pari.py +8 -4
- snappy/phone_home.py +2 -1
- snappy/polyviewer.py +8 -8
- snappy/ptolemy/__init__.py +1 -1
- snappy/ptolemy/component.py +2 -2
- snappy/ptolemy/coordinates.py +25 -25
- snappy/ptolemy/findLoops.py +9 -9
- snappy/ptolemy/manifoldMethods.py +27 -29
- snappy/ptolemy/polynomial.py +50 -57
- snappy/ptolemy/processFileBase.py +60 -0
- snappy/ptolemy/ptolemyVariety.py +109 -41
- snappy/ptolemy/reginaWrapper.py +4 -4
- snappy/ptolemy/rur.py +1 -1
- snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
- snappy/ptolemy/test.py +99 -54
- snappy/ptolemy/utilities.py +1 -1
- snappy/raytracing/__init__.py +64 -0
- snappy/raytracing/additional_horospheres.py +64 -0
- snappy/raytracing/additional_len_spec_choices.py +63 -0
- snappy/raytracing/cohomology_fractal.py +0 -3
- snappy/raytracing/eyeball.py +123 -0
- snappy/raytracing/finite_raytracing_data.py +17 -17
- snappy/raytracing/finite_viewer.py +15 -15
- snappy/raytracing/geodesic_tube_info.py +93 -63
- snappy/raytracing/geodesics.py +94 -64
- snappy/raytracing/geodesics_window.py +56 -34
- snappy/raytracing/gui_utilities.py +21 -6
- snappy/raytracing/hyperboloid_navigation.py +29 -4
- snappy/raytracing/hyperboloid_utilities.py +73 -73
- snappy/raytracing/ideal_raytracing_data.py +121 -91
- snappy/raytracing/inside_viewer.py +199 -66
- snappy/raytracing/pack.py +22 -0
- snappy/raytracing/raytracing_data.py +37 -25
- snappy/raytracing/raytracing_view.py +70 -65
- snappy/raytracing/shaders/Eye.png +0 -0
- snappy/raytracing/shaders/NonGeometric.png +0 -0
- snappy/raytracing/shaders/__init__.py +39 -3
- snappy/raytracing/shaders/fragment.glsl +451 -133
- snappy/raytracing/test.py +29 -0
- snappy/raytracing/tooltip.py +146 -0
- snappy/raytracing/upper_halfspace_utilities.py +42 -9
- snappy/sage_helper.py +67 -134
- snappy/settings.py +90 -77
- snappy/shell.py +2 -0
- snappy/snap/character_varieties.py +2 -2
- snappy/snap/find_field.py +4 -3
- snappy/snap/fundamental_polyhedron.py +2 -2
- snappy/snap/kernel_structures.py +5 -1
- snappy/snap/nsagetools.py +9 -8
- snappy/snap/peripheral/dual_cellulation.py +4 -3
- snappy/snap/peripheral/peripheral.py +2 -2
- snappy/snap/peripheral/surface.py +5 -5
- snappy/snap/peripheral/test.py +1 -1
- snappy/snap/polished_reps.py +8 -8
- snappy/snap/slice_obs_HKL.py +16 -14
- snappy/snap/t3mlite/arrow.py +3 -3
- snappy/snap/t3mlite/edge.py +3 -3
- snappy/snap/t3mlite/homology.py +2 -2
- snappy/snap/t3mlite/mcomplex.py +3 -3
- snappy/snap/t3mlite/simplex.py +12 -0
- snappy/snap/t3mlite/spun.py +18 -17
- snappy/snap/t3mlite/test_vs_regina.py +4 -4
- snappy/snap/test.py +37 -53
- snappy/snap/utilities.py +4 -5
- snappy/test.py +121 -138
- snappy/test_cases.py +263 -0
- snappy/testing.py +131 -0
- snappy/tiling/__init__.py +2 -0
- snappy/tiling/canonical_key_dict.py +59 -0
- snappy/tiling/dict_based_set.py +79 -0
- snappy/tiling/floor.py +49 -0
- snappy/tiling/hyperboloid_dict.py +54 -0
- snappy/tiling/iter_utils.py +78 -0
- snappy/tiling/lifted_tetrahedron.py +22 -0
- snappy/tiling/lifted_tetrahedron_set.py +54 -0
- snappy/tiling/real_hash_dict.py +164 -0
- snappy/tiling/test.py +23 -0
- snappy/tiling/tile.py +215 -0
- snappy/tiling/triangle.py +33 -0
- snappy/tkterminal.py +113 -84
- snappy/twister/main.py +1 -7
- snappy/twister/twister_core.cp311-win_amd64.pyd +0 -0
- snappy/upper_halfspace/__init__.py +78 -17
- snappy/verify/__init__.py +3 -7
- snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
- snappy/verify/complex_volume/adjust_torsion.py +1 -2
- snappy/verify/complex_volume/closed.py +13 -13
- snappy/verify/complex_volume/cusped.py +6 -6
- snappy/verify/complex_volume/extended_bloch.py +5 -8
- snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
- snappy/verify/edge_equations.py +80 -0
- snappy/verify/exceptions.py +0 -55
- snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
- snappy/verify/interval_newton_shapes_engine.py +7 -5
- snappy/verify/interval_tree.py +5 -5
- snappy/verify/krawczyk_shapes_engine.py +17 -18
- snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
- snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
- snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
- snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
- snappy/verify/shapes.py +5 -3
- snappy/verify/short_slopes.py +39 -41
- snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
- snappy/verify/test.py +57 -60
- snappy/verify/upper_halfspace/extended_matrix.py +1 -1
- snappy/verify/upper_halfspace/finite_point.py +3 -4
- snappy/verify/upper_halfspace/ideal_point.py +9 -9
- snappy/verify/volume.py +2 -2
- snappy/version.py +2 -2
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/METADATA +26 -11
- snappy-3.2.dist-info/RECORD +503 -0
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
- snappy/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/__pycache__/browser.cpython-311.pyc +0 -0
- snappy/__pycache__/cache.cpython-311.pyc +0 -0
- snappy/__pycache__/database.cpython-311.pyc +0 -0
- snappy/__pycache__/db_utilities.cpython-311.pyc +0 -0
- snappy/__pycache__/decorated_isosig.cpython-311.pyc +0 -0
- snappy/__pycache__/exceptions.cpython-311.pyc +0 -0
- snappy/__pycache__/export_stl.cpython-311.pyc +0 -0
- snappy/__pycache__/filedialog.cpython-311.pyc +0 -0
- snappy/__pycache__/gui.cpython-311.pyc +0 -0
- snappy/__pycache__/horoviewer.cpython-311.pyc +0 -0
- snappy/__pycache__/math_basics.cpython-311.pyc +0 -0
- snappy/__pycache__/matrix.cpython-311.pyc +0 -0
- snappy/__pycache__/number.cpython-311.pyc +0 -0
- snappy/__pycache__/numeric_output_checker.cpython-311.pyc +0 -0
- snappy/__pycache__/pari.cpython-311.pyc +0 -0
- snappy/__pycache__/polyviewer.cpython-311.pyc +0 -0
- snappy/__pycache__/sage_helper.cpython-311.pyc +0 -0
- snappy/__pycache__/version.cpython-311.pyc +0 -0
- snappy/doc/_sources/verify_canon.rst.txt +0 -90
- snappy/doc/_static/jquery-3.6.0.js +0 -10881
- snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
- snappy/doc/_static/js/html5shiv.min.js +0 -4
- snappy/doc/_static/underscore-1.13.1.js +0 -2042
- snappy/doc/_static/underscore.js +0 -6
- snappy/doc/verify_canon.html +0 -304
- snappy/drilling/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/constants.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/crush.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/cusps.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/debug.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/epsilons.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/exceptions.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/fixed_points.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_info.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_tube.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/geometric_structure.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/line.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/moves.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/peripheral_curves.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/perturb.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/quotient_space.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/spatial_dict.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/subdivide.cpython-311.pyc +0 -0
- snappy/drilling/__pycache__/tracing.cpython-311.pyc +0 -0
- snappy/drilling/geodesic_tube.py +0 -441
- snappy/drilling/geometric_structure.py +0 -366
- snappy/drilling/line.py +0 -122
- snappy/drilling/quotient_space.py +0 -94
- snappy/drilling/spatial_dict.py +0 -128
- snappy/exterior_to_link/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/exceptions.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/hyp_utils.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/link_projection.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/main.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/pl_utils.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/put_in_S3.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-311.pyc +0 -0
- snappy/exterior_to_link/__pycache__/stored_moves.cpython-311.pyc +0 -0
- snappy/hyperboloid/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/manifolds/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/component.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/coordinates.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/fieldExtensions.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/findLoops.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/homology.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/manifoldMethods.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/matrix.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/polynomial.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/processComponents.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileBase.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileDispatch.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/processMagmaFile.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/processRurFile.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVariety.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/rur.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-311.pyc +0 -0
- snappy/ptolemy/__pycache__/utilities.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/character_varieties.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/fundamental_polyhedron.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/interval_reps.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/kernel_structures.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/mcomplex_base.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/nsagetools.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/polished_reps.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/shapes.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/slice_obs_HKL.cpython-311.pyc +0 -0
- snappy/snap/__pycache__/utilities.cpython-311.pyc +0 -0
- snappy/snap/peripheral/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-311.pyc +0 -0
- snappy/snap/peripheral/__pycache__/link.cpython-311.pyc +0 -0
- snappy/snap/peripheral/__pycache__/peripheral.cpython-311.pyc +0 -0
- snappy/snap/peripheral/__pycache__/surface.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/arrow.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/corner.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/edge.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/face.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/files.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/homology.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/linalg.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/mcomplex.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/perm4.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/simplex.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/spun.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/surface.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-311.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/vertex.cpython-311.pyc +0 -0
- snappy/togl/__init__.py +0 -3
- snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
- snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
- snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
- snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
- snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
- snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
- snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
- snappy/twister/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/twister/__pycache__/main.cpython-311.pyc +0 -0
- snappy/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/cuspCrossSection.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/cuspTranslations.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/cusp_areas.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/cusp_shapes.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/exceptions.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/interval_tree.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/realAlgebra.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/shapes.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/short_slopes.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/squareExtensions.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/verifyCanonical.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/verifyHyperbolicity.cpython-311.pyc +0 -0
- snappy/verify/__pycache__/volume.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/closed.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/cusped.cpython-311.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-311.pyc +0 -0
- snappy/verify/cuspCrossSection.py +0 -1422
- snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-311.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-311.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/__init__.cpython-311.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-311.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-311.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-311.pyc +0 -0
- snappy-3.1.1.dist-info/RECORD +0 -575
- {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.
|
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
|
-
...
|
38
|
-
...
|
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.
|
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
|
-
...
|
63
|
-
...
|
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 =
|
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
|
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 [
|
107
|
-
|
108
|
-
|
109
|
-
|
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 * [
|
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([
|
128
|
+
stoppers_union = _union_intervals([stopper[0] for stopper in stoppers])
|
144
129
|
cusps = _get_cusps_from_stoppers(stoppers, result)
|
145
|
-
stopper_pairs =
|
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
|
25
|
+
from .sage_helper import Integer, RealDoubleElement, RealNumber
|
26
26
|
|
27
27
|
def is_int(slice):
|
28
|
-
return isinstance(slice, (
|
28
|
+
return isinstance(slice, (Integer, int))
|
29
29
|
|
30
30
|
def is_int_or_none(slice):
|
31
|
-
return isinstance(slice, (
|
31
|
+
return isinstance(slice, (Integer, int, type(None)))
|
32
32
|
|
33
33
|
def is_float_or_none(slice):
|
34
|
-
return isinstance(slice, (float,
|
35
|
-
|
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 =
|
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
|
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__ =
|
450
|
+
this_module.__test__ = {}
|
450
451
|
for name, table in new_tables.items():
|
451
452
|
this_module.__test__[name] = table.__class__
|
452
453
|
|