snappy 3.1.1__cp312-cp312-win_amd64.whl → 3.2__cp312-cp312-win_amd64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cp312-win_amd64.pyd +0 -0
- snappy/SnapPy.cp312-win_amd64.pyd +0 -0
- snappy/SnapPyHP.cp312-win_amd64.pyd +0 -0
- snappy/__init__.py +271 -401
- 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 -924
- 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 -12
- 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 -74
- snappy/doc/_static/searchtools.js +108 -62
- snappy/doc/_static/snappy_furo.css +33 -33
- snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -42
- 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 +6 -3
- 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.cp312-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 +25 -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-312.pyc +0 -0
- snappy/__pycache__/browser.cpython-312.pyc +0 -0
- snappy/__pycache__/cache.cpython-312.pyc +0 -0
- snappy/__pycache__/database.cpython-312.pyc +0 -0
- snappy/__pycache__/db_utilities.cpython-312.pyc +0 -0
- snappy/__pycache__/decorated_isosig.cpython-312.pyc +0 -0
- snappy/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/__pycache__/export_stl.cpython-312.pyc +0 -0
- snappy/__pycache__/filedialog.cpython-312.pyc +0 -0
- snappy/__pycache__/gui.cpython-312.pyc +0 -0
- snappy/__pycache__/horoviewer.cpython-312.pyc +0 -0
- snappy/__pycache__/math_basics.cpython-312.pyc +0 -0
- snappy/__pycache__/matrix.cpython-312.pyc +0 -0
- snappy/__pycache__/number.cpython-312.pyc +0 -0
- snappy/__pycache__/numeric_output_checker.cpython-312.pyc +0 -0
- snappy/__pycache__/pari.cpython-312.pyc +0 -0
- snappy/__pycache__/polyviewer.cpython-312.pyc +0 -0
- snappy/__pycache__/sage_helper.cpython-312.pyc +0 -0
- snappy/__pycache__/version.cpython-312.pyc +0 -0
- snappy/doc/_sources/verify_canon.rst.txt +0 -90
- snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
- snappy/doc/_static/js/html5shiv.min.js +0 -4
- snappy/doc/verify_canon.html +0 -304
- snappy/drilling/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/constants.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/crush.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/cusps.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/debug.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/epsilons.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/fixed_points.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_info.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_tube.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/geometric_structure.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/line.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/moves.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/peripheral_curves.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/perturb.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/quotient_space.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/spatial_dict.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/subdivide.cpython-312.pyc +0 -0
- snappy/drilling/__pycache__/tracing.cpython-312.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-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/hyp_utils.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/link_projection.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/main.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/pl_utils.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/put_in_S3.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-312.pyc +0 -0
- snappy/exterior_to_link/__pycache__/stored_moves.cpython-312.pyc +0 -0
- snappy/hyperboloid/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/manifolds/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/component.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/coordinates.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/fieldExtensions.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/findLoops.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/homology.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/manifoldMethods.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/matrix.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/polynomial.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processComponents.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileBase.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileDispatch.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processMagmaFile.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/processRurFile.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVariety.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/rur.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
- snappy/ptolemy/__pycache__/utilities.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/character_varieties.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/fundamental_polyhedron.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/interval_reps.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/kernel_structures.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/mcomplex_base.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/nsagetools.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/polished_reps.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/shapes.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/slice_obs_HKL.cpython-312.pyc +0 -0
- snappy/snap/__pycache__/utilities.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/link.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/peripheral.cpython-312.pyc +0 -0
- snappy/snap/peripheral/__pycache__/surface.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/arrow.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/corner.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/edge.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/face.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/files.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/homology.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/linalg.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/mcomplex.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/perm4.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/simplex.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/spun.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/surface.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-312.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/vertex.cpython-312.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-312.pyc +0 -0
- snappy/twister/__pycache__/main.cpython-312.pyc +0 -0
- snappy/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cuspCrossSection.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cuspTranslations.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cusp_areas.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/cusp_shapes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/exceptions.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/interval_tree.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/realAlgebra.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/shapes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/short_slopes.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/squareExtensions.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/verifyCanonical.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/verifyHyperbolicity.cpython-312.pyc +0 -0
- snappy/verify/__pycache__/volume.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/closed.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/cusped.cpython-312.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-312.pyc +0 -0
- snappy/verify/cuspCrossSection.py +0 -1422
- snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-312.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-312.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
- snappy-3.1.1.dist-info/RECORD +0 -572
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
snappy/drilling/perturb.py
CHANGED
@@ -1,30 +1,47 @@
|
|
1
1
|
from . import constants
|
2
2
|
from . import epsilons
|
3
3
|
from . import exceptions
|
4
|
-
from .geodesic_tube import add_structures_necessary_for_tube, GeodesicTube
|
5
|
-
from .geodesic_info import GeodesicInfo
|
6
|
-
from .line import R13Line, distance_r13_lines
|
7
4
|
|
5
|
+
from ..geometric_structure.geodesic.tiles_for_geodesic import compute_tiles_for_geodesic
|
6
|
+
from ..geometric_structure.geodesic.geodesic_start_point_info import GeodesicStartPointInfo
|
7
|
+
from ..geometric_structure.geodesic.check_away_from_core_curve import check_away_from_core_curve_iter
|
8
8
|
from ..hyperboloid import ( # type: ignore
|
9
9
|
unit_time_vector_to_o13_hyperbolic_translation,
|
10
10
|
r13_dot,
|
11
|
-
time_r13_normalise
|
12
|
-
|
11
|
+
time_r13_normalise)
|
12
|
+
from ..hyperboloid.line import R13Line
|
13
|
+
from ..hyperboloid.distances import distance_r13_lines, distance_r13_points
|
14
|
+
from ..tiling.triangle import add_triangles_to_tetrahedra
|
13
15
|
from ..snap.t3mlite import Mcomplex # type: ignore
|
14
16
|
from ..exceptions import InsufficientPrecisionError # type: ignore
|
15
|
-
from ..matrix import
|
17
|
+
from ..matrix import make_vector # type: ignore
|
16
18
|
from ..math_basics import correct_min # type: ignore
|
17
19
|
|
18
|
-
from typing import Sequence, List
|
19
|
-
|
20
|
+
from typing import Sequence, Tuple, List, Any
|
21
|
+
|
22
|
+
# For perturbing, it is sufficient to just find some non-trivial
|
23
|
+
# lower bound for the embedding radius of a tube about a geodesic.
|
24
|
+
# To just any such bound, set _tube_developing_radius = 0.
|
25
|
+
# This will develop the tube just to the point where we can verify
|
26
|
+
# that it has positive radius.
|
27
|
+
#
|
28
|
+
# To stress-test our code, we can develop the tube further, by
|
29
|
+
# setting _tube_developing_radius > 0. The isotopy type of
|
30
|
+
# the drilled curve will not change no matter how large
|
31
|
+
# _tube_developing_radius is. In other words, we still compute
|
32
|
+
# a lower bound for the embedding radius which eventually will
|
33
|
+
# be the embedding radius up to rounding errors as
|
34
|
+
# _tube_developing_radius increases.
|
35
|
+
#
|
36
|
+
_tube_developing_radius = 0
|
20
37
|
|
21
38
|
def perturb_geodesics(
|
22
39
|
mcomplex : Mcomplex,
|
23
|
-
geodesics : Sequence[
|
40
|
+
geodesics : Sequence[GeodesicStartPointInfo],
|
24
41
|
verbose=False):
|
25
42
|
"""
|
26
43
|
Given a triangulation with structures added by add_r13_geometry
|
27
|
-
and
|
44
|
+
and GeodesicStartPointInfo's with start points on the line that is a lift
|
28
45
|
of the closed geodesic, perturbs the start point away from the line
|
29
46
|
and computes a new end point (as image of the new start point under
|
30
47
|
the matrix associated to the geodesic line). The line segment
|
@@ -32,7 +49,7 @@ def perturb_geodesics(
|
|
32
49
|
curve in the manifold which is guaranteed to be isotopic to the
|
33
50
|
closed geodesic.
|
34
51
|
|
35
|
-
If several
|
52
|
+
If several GeodesicStartPointInfo's are given and/or there are filled
|
36
53
|
cusps with core curves, the system of simple closed curves
|
37
54
|
resulting from the perturbation together with the core curves
|
38
55
|
is guaranteed to be isotopic to the original system of closed
|
@@ -72,34 +89,35 @@ def perturb_geodesics(
|
|
72
89
|
for g in geodesics:
|
73
90
|
perturb_geodesic(g, r, mcomplex.verified)
|
74
91
|
|
75
|
-
|
76
92
|
def compute_lower_bound_injectivity_radius(
|
77
93
|
mcomplex : Mcomplex,
|
78
|
-
geodesics : Sequence[
|
94
|
+
geodesics : Sequence[GeodesicStartPointInfo]):
|
79
95
|
|
80
|
-
|
96
|
+
if len(geodesics) == 0:
|
97
|
+
raise Exception("No geodesic tubes given")
|
98
|
+
|
99
|
+
add_triangles_to_tetrahedra(mcomplex)
|
81
100
|
|
82
|
-
|
83
|
-
for tube in tubes:
|
84
|
-
tube.add_pieces_for_radius(r=0)
|
101
|
+
min_radius = mcomplex.RF(_tube_developing_radius)
|
85
102
|
|
86
|
-
|
87
|
-
mcomplex, tubes)
|
103
|
+
distances = []
|
88
104
|
|
105
|
+
tet_to_lines : List[List[R13Line]] = [[] for tet in mcomplex.Tetrahedra ]
|
89
106
|
|
90
|
-
|
91
|
-
mcomplex : Mcomplex,
|
92
|
-
tubes : Sequence[GeodesicTube]):
|
93
|
-
if len(tubes) == 0:
|
94
|
-
raise Exception("No geodesic tubes given")
|
107
|
+
core_curve_epsilon = _compute_core_curve_epsilon(mcomplex)
|
95
108
|
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
109
|
+
for geodesic in geodesics:
|
110
|
+
for tile in (
|
111
|
+
check_away_from_core_curve_iter(
|
112
|
+
compute_tiles_for_geodesic(mcomplex, geodesic),
|
113
|
+
epsilon=core_curve_epsilon,
|
114
|
+
obj_name='Geodesic %s' % geodesic.word)):
|
115
|
+
if tile.lower_bound_distance > min_radius:
|
116
|
+
distances.append(tile.lower_bound_distance)
|
117
|
+
break
|
118
|
+
tet_index = tile.lifted_tetrahedron.tet.Index
|
119
|
+
tet_to_lines[tet_index].append(
|
120
|
+
tile.inverse_lifted_geometric_object)
|
103
121
|
|
104
122
|
for tet in mcomplex.Tetrahedra:
|
105
123
|
for curve in tet.core_curves.values():
|
@@ -113,11 +131,11 @@ def compute_lower_bound_injectivity_radius_from_tubes(
|
|
113
131
|
return correct_min(distances) / 2
|
114
132
|
|
115
133
|
|
116
|
-
def perturb_geodesic(geodesic :
|
134
|
+
def perturb_geodesic(geodesic : GeodesicStartPointInfo,
|
117
135
|
injectivity_radius,
|
118
136
|
verified : bool):
|
119
137
|
if geodesic.line is None:
|
120
|
-
raise ValueError("
|
138
|
+
raise ValueError("GeodesicStartPointInfo needs line to be perturbed.")
|
121
139
|
|
122
140
|
perturbed_point = perturb_unit_time_point(
|
123
141
|
time_r13_normalise(geodesic.unnormalised_start_point),
|
@@ -138,8 +156,9 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
|
|
138
156
|
RF = point.base_ring()
|
139
157
|
|
140
158
|
amt = RF(0.5) * max_amt
|
141
|
-
direction =
|
142
|
-
|
159
|
+
direction = make_vector(
|
160
|
+
[RF(x) for x in constants.point_perturbation_direction])
|
161
|
+
perturbed_origin = make_vector(
|
143
162
|
[ amt.cosh() ] + list(amt.sinh() * direction.normalized()))
|
144
163
|
|
145
164
|
m = unit_time_vector_to_o13_hyperbolic_translation(point)
|
@@ -150,9 +169,9 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
|
|
150
169
|
|
151
170
|
space_coords = [ RF(x.center()) for x in perturbed_point[1:4] ]
|
152
171
|
time_coord = sum((x**2 for x in space_coords), RF(1)).sqrt()
|
153
|
-
perturbed_point =
|
172
|
+
perturbed_point = make_vector([time_coord] + space_coords)
|
154
173
|
|
155
|
-
d =
|
174
|
+
d = distance_r13_points(point, perturbed_point)
|
156
175
|
if not d < RF(0.75) * max_amt:
|
157
176
|
raise InsufficientPrecisionError(
|
158
177
|
"Could not verify perturbed point is close enough to original "
|
@@ -160,3 +179,10 @@ def perturb_unit_time_point(point, max_amt, verified : bool):
|
|
160
179
|
"Increasing the precision will probably fix this.")
|
161
180
|
|
162
181
|
return perturbed_point
|
182
|
+
|
183
|
+
def _compute_core_curve_epsilon(mcomplex):
|
184
|
+
if mcomplex.verified:
|
185
|
+
return 0
|
186
|
+
else:
|
187
|
+
RF = mcomplex.RF
|
188
|
+
return RF(0.5) ** (RF.prec() // 2 - 8)
|
@@ -0,0 +1,36 @@
|
|
1
|
+
from .cusps import CuspPostDrillInfo
|
2
|
+
from .barycentric import transpositions, perm_to_index, mark_subtetrahedra_about_edge
|
3
|
+
|
4
|
+
from ..snap.t3mlite import Tetrahedron, Perm4, simplex
|
5
|
+
|
6
|
+
|
7
|
+
def shorten_in_barycentric_subdivision(tetrahedra, verbose : bool = False):
|
8
|
+
while shorten_one_in_barycentric_subdivision(tetrahedra):
|
9
|
+
if verbose:
|
10
|
+
print("Shortening geodesic by sweeping across triangle.")
|
11
|
+
|
12
|
+
def shorten_one_in_barycentric_subdivision(tetrahedra):
|
13
|
+
for tet in tetrahedra:
|
14
|
+
for perm, orientation in zip(Perm4.S4(), tet.marked_subtetrahedra):
|
15
|
+
if orientation != +1:
|
16
|
+
continue
|
17
|
+
other_perm = perm * transpositions[1]
|
18
|
+
j = perm_to_index(other_perm)
|
19
|
+
if tet.marked_subtetrahedra[j] == 0:
|
20
|
+
continue
|
21
|
+
mark_subtetrahedra_about_edge(tet, perm, 0)
|
22
|
+
mark_subtetrahedra_about_edge(tet, other_perm, 0)
|
23
|
+
new_perm = perm * Perm4((1,2,0,3))
|
24
|
+
mark_subtetrahedra_about_edge(tet, new_perm)
|
25
|
+
_remove_post_drill_info_from_vertex(tet, perm.image(simplex.V0))
|
26
|
+
return True
|
27
|
+
return False
|
28
|
+
|
29
|
+
def _remove_post_drill_info_from_vertex(tet, v):
|
30
|
+
if tet.post_drill_infos[v].index is None:
|
31
|
+
return
|
32
|
+
tet.post_drill_infos[v] = CuspPostDrillInfo()
|
33
|
+
for f in simplex.FacesAroundVertexCounterclockwise[v]:
|
34
|
+
_remove_post_drill_info_from_vertex(
|
35
|
+
tet.Neighbor[f],
|
36
|
+
tet.Gluing[f].image(v))
|
snappy/drilling/subdivide.py
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
from .moves import one_four_move, two_three_move
|
2
2
|
from .tracing import GeodesicPiece, GeodesicPieceTracker
|
3
|
-
from .exceptions import GeodesicStartingPiecesCrossSameFaceError
|
4
3
|
|
5
4
|
from . import debug
|
6
5
|
|
@@ -138,10 +137,6 @@ def _traverse_geodesic_to_subdivide(
|
|
138
137
|
# pointed to by a variable we are interested in where the name
|
139
138
|
# the variable if it is not just "piece".
|
140
139
|
|
141
|
-
if (start_piece.prev.endpoints[0].subsimplex ==
|
142
|
-
start_piece.endpoints[1].subsimplex):
|
143
|
-
raise GeodesicStartingPiecesCrossSameFaceError()
|
144
|
-
|
145
140
|
# Following trace_geodesic, we start with
|
146
141
|
#
|
147
142
|
# start_piece.prev
|
snappy/drilling/test.py
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
from snappy import testing
|
2
|
+
import snappy
|
3
|
+
|
4
|
+
from snappy import drilling
|
5
|
+
import snappy.drilling.test_cases
|
6
|
+
|
7
|
+
modules = [
|
8
|
+
drilling,
|
9
|
+
drilling.test_cases
|
10
|
+
]
|
11
|
+
|
12
|
+
def run_doctests(verbose=False, print_info=True):
|
13
|
+
globs = {'Manifold' : snappy.Manifold,
|
14
|
+
'ManifoldHP': snappy.ManifoldHP}
|
15
|
+
return testing.doctest_modules(modules,
|
16
|
+
verbose=verbose,
|
17
|
+
print_info=print_info,
|
18
|
+
extraglobs=globs)
|
19
|
+
|
20
|
+
run_doctests.__name__ = drilling.__name__
|
21
|
+
|
22
|
+
if __name__ == '__main__':
|
23
|
+
testing.run_doctests_as_main(run_doctests)
|
@@ -0,0 +1,126 @@
|
|
1
|
+
"""
|
2
|
+
IMPORTANT: Python only recognises this as a doc string if there is
|
3
|
+
nothing before it. In particular, add any includes after the doc string.
|
4
|
+
|
5
|
+
Test with manifold without symmetry. Note that the code in drilling is
|
6
|
+
deterministic but the SnapPea kernel code to remove the finite vertices
|
7
|
+
and simplify is not. Thus, we need canonical_retriangulation() to get
|
8
|
+
a consistent result:
|
9
|
+
|
10
|
+
>>> from snappy.drilling.exceptions import GeodesicSystemNotSimpleError
|
11
|
+
>>> M = Manifold("v2986")
|
12
|
+
>>> M.drill_word('gB').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
13
|
+
'kLvvAQQkbhijhghgjijxxacvcccccv_baBaaBDbBa'
|
14
|
+
|
15
|
+
Test non-simple geodesic and verified computation:
|
16
|
+
|
17
|
+
sage: M = ManifoldHP("m004")
|
18
|
+
sage: try:
|
19
|
+
... M.drill_word('bbCC', verified = True)
|
20
|
+
... except GeodesicSystemNotSimpleError as e:
|
21
|
+
... print("Not simple")
|
22
|
+
Not simple
|
23
|
+
|
24
|
+
Tests drilling one geodesic that intersects 1-skeleton::
|
25
|
+
|
26
|
+
>>> M = Manifold("m125")
|
27
|
+
>>> M.drill_word('d').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
28
|
+
'svLvLQLAzQMMQdifhjmlknlopnqpqrrroaaaaaaoaaaaaaoaaao_aBbaBaaBeDBb'
|
29
|
+
|
30
|
+
Tests drilling two geodesics that intersect each other:
|
31
|
+
|
32
|
+
>>> try: # doctest: +NUMERIC9
|
33
|
+
... M.drill_words(['d','Ad'])
|
34
|
+
... except GeodesicSystemNotSimpleError as e:
|
35
|
+
... print("Max tube radius:", e.maximal_tube_radius)
|
36
|
+
Max tube radius: 0.0000000000
|
37
|
+
|
38
|
+
Tests drilling geodesics that are entirely in the 2-skeleton::
|
39
|
+
|
40
|
+
>>> M.drill_words(['a','acAADa']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
41
|
+
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBbabbab'
|
42
|
+
|
43
|
+
Same test as verified computation::
|
44
|
+
|
45
|
+
sage: M.drill_words(['a','acAADa'], verified = True).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
46
|
+
'ivvPQQcfhghgfghfaaaaaaaaa_BabBBbBaBBbabbab'
|
47
|
+
|
48
|
+
Test error when drilling something close to core curve::
|
49
|
+
|
50
|
+
>>> M = Manifold("m125")
|
51
|
+
>>> MM = M.drill_word('d')
|
52
|
+
>>> MM.dehn_fill((1,0),2)
|
53
|
+
>>> bad_word = 'bc'
|
54
|
+
>>> MM.drill_word(bad_word) # doctest: +ELLIPSIS
|
55
|
+
Traceback (most recent call last):
|
56
|
+
...
|
57
|
+
snappy.geometric_structure.geodesic.check_away_from_core_curve.ObjectCloseToCoreCurve: Geodesic bc is very close to the core curve of cusp 2 and might intersect it. Distance: ...
|
58
|
+
|
59
|
+
There are two places where we detect whether the geodesic is close
|
60
|
+
to a core curve (rather than tiling forever). Test the other place
|
61
|
+
in the GeodesicTube code used to determine the maximal amount we can
|
62
|
+
perturb the geodesic:
|
63
|
+
|
64
|
+
>>> drill_words_implementation(MM, [bad_word], verified = False, bits_prec = 53, perturb = True) # doctest: +ELLIPSIS
|
65
|
+
Traceback (most recent call last):
|
66
|
+
...
|
67
|
+
snappy.geometric_structure.geodesic.check_away_from_core_curve.ObjectCloseToCoreCurve: Geodesic bc is very close to the core curve of cusp 2 and might intersect it. Distance: ...
|
68
|
+
|
69
|
+
A particular tricky case in terms testing that the start piece is correctly
|
70
|
+
handled by 2-3 moves (in particular, commit f9879d04 introduced a bug):
|
71
|
+
|
72
|
+
>>> Manifold("m004").drill_words(['CAC','CCbC']).canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
73
|
+
'qLvvLvAMQQQkcgimopkllmpkonnnpixcaelchapewetvrn_bcaaBbBBbaBaBbB'
|
74
|
+
|
75
|
+
|
76
|
+
An interesting case where geodesic intersects triangulation in only one tetrahedron:
|
77
|
+
|
78
|
+
>>> Manifold("m019").drill_word('A').canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
79
|
+
'gLLPQccdefffqffqqof_BaaBdcbb'
|
80
|
+
|
81
|
+
A bug in an earlier implementation found by Nathan Dunfield (where putting the words in one order caused a failure):
|
82
|
+
|
83
|
+
>>> import sys
|
84
|
+
>>> original_limit = sys.getrecursionlimit()
|
85
|
+
>>> sys.setrecursionlimit(100000)
|
86
|
+
>>> def drilled_isosig(M, words):
|
87
|
+
... for i in range(10):
|
88
|
+
... try:
|
89
|
+
... F = M.drill_words(words).filled_triangulation()
|
90
|
+
... return F.canonical_retriangulation().triangulation_isosig(ignore_orientation=False)
|
91
|
+
... except RuntimeError:
|
92
|
+
... pass
|
93
|
+
>>> drilled_isosig(Manifold('K11n34(0,1)'), ['iFcdbEiFJ', 'iFJ'])
|
94
|
+
'zLLvLLwzAwPQMQzzQkcdgijkjplssrnrotqruvwyxyxyhsgnnighueqdniblsipklpxgcr_BcbDbBba'
|
95
|
+
>>> drilled_isosig(Manifold('K11n34(0,1)'), ['iFJ', 'iFcdbEiFJ'])
|
96
|
+
'zLLvLLwzAwPQMQzzQkcdgijkjplssrnrotqruvwyxyxyhsgnnighueqdniblsipklpxgcr_babBbaBcaB'
|
97
|
+
>>> sys.setrecursionlimit(original_limit)
|
98
|
+
|
99
|
+
Stress test by using large perturbation. In particular, this is testing the
|
100
|
+
case where two geodesic pieces are adjacent to the same triangle and we
|
101
|
+
need to shorten before crushing. We do white-box testing (verbose = True)
|
102
|
+
to make sure we really hit the shortening case.
|
103
|
+
|
104
|
+
>>> from snappy.drilling import perturb
|
105
|
+
>>> original_radius = perturb._tube_developing_radius
|
106
|
+
>>> perturb._tube_developing_radius = 1
|
107
|
+
>>> Manifold("m307").drill_word('dadadabCdada', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
|
108
|
+
Tubes lower bound injectivity radius: 0.380575727320247
|
109
|
+
Number of geodesic pieces: [9]
|
110
|
+
Number of tets after subdividing: 45
|
111
|
+
Shortening geodesic by sweeping across triangle.
|
112
|
+
'oLLwQvvPQQcbeefgemnllnmnmlhhaaaaaahaaaaah_bBbabaab'
|
113
|
+
>>> Manifold("m320").drill_word('daaacDA', verbose=True).isometry_signature(of_link=True) # doctest: +NUMERIC9
|
114
|
+
Tubes lower bound injectivity radius: 0.397319067589326
|
115
|
+
Number of geodesic pieces: [9]
|
116
|
+
Number of tets after subdividing: 49
|
117
|
+
Shortening geodesic by sweeping across triangle.
|
118
|
+
'rLLPwAPvvPQQcccdfehgjiqpooqppqoqffaaaaaaaqaaaqaaa_bBbabaab'
|
119
|
+
>>> perturb._tube_developing_radius = original_radius
|
120
|
+
|
121
|
+
"""
|
122
|
+
|
123
|
+
from . import drill_words_implementation
|
124
|
+
|
125
|
+
if not __doc__:
|
126
|
+
raise Exception("doc string with tests was not recognized.")
|
snappy/drilling/tracing.py
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
from .geodesic_info import GeodesicInfo
|
2
|
-
from .line import R13LineWithMatrix, distance_r13_lines
|
3
1
|
from . import constants
|
4
2
|
from . import epsilons
|
5
3
|
from . import exceptions
|
@@ -7,6 +5,9 @@ from . import exceptions
|
|
7
5
|
from ..snap.t3mlite import simplex, Tetrahedron, Mcomplex # type: ignore
|
8
6
|
|
9
7
|
from ..hyperboloid import r13_dot # type: ignore
|
8
|
+
from ..geometric_structure.geodesic.geodesic_start_point_info import GeodesicStartPointInfo
|
9
|
+
from ..geometric_structure.geodesic.line import R13LineWithMatrix
|
10
|
+
from ..geometric_structure.geodesic.check_away_from_core_curve import check_away_from_core_curve
|
10
11
|
from ..exceptions import InsufficientPrecisionError # type: ignore
|
11
12
|
|
12
13
|
from typing import Sequence, Optional, List
|
@@ -188,7 +189,7 @@ def compute_plane_intersection_param(
|
|
188
189
|
return num / denom
|
189
190
|
|
190
191
|
|
191
|
-
def trace_geodesic(geodesic :
|
192
|
+
def trace_geodesic(geodesic : GeodesicStartPointInfo, verified : bool):
|
192
193
|
"""
|
193
194
|
Traces line segment through the tetrahedra in the hyperboloid
|
194
195
|
model (though using time-like but not necessarily unit time-like vectors)
|
@@ -206,6 +207,8 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
|
|
206
207
|
too close to a core curve.
|
207
208
|
"""
|
208
209
|
|
210
|
+
obj_name = "Geodesic %s" % geodesic.word
|
211
|
+
|
209
212
|
if geodesic.tet is None:
|
210
213
|
raise ValueError(
|
211
214
|
"Expected geodesic with tetrahedron to start tracing.")
|
@@ -290,7 +293,9 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
|
|
290
293
|
"problem.")
|
291
294
|
|
292
295
|
# Check geodesic does not intersect core curve - if line is given.
|
293
|
-
|
296
|
+
if line is not None:
|
297
|
+
check_away_from_core_curve(
|
298
|
+
line.r13_line, tet, hit_face, epsilon, obj_name)
|
294
299
|
|
295
300
|
# The crossing of the ray with the exit face is beyond the given
|
296
301
|
# end point. Thus, we are at the last piece.
|
@@ -344,36 +349,3 @@ def trace_geodesic(geodesic : GeodesicInfo, verified : bool):
|
|
344
349
|
|
345
350
|
raise exceptions.UnfinishedTraceGeodesicError(
|
346
351
|
constants.trace_max_steps)
|
347
|
-
|
348
|
-
|
349
|
-
def _verify_away_from_core_curve(line : Optional[R13LineWithMatrix],
|
350
|
-
tet : Tetrahedron,
|
351
|
-
face : int,
|
352
|
-
epsilon):
|
353
|
-
"""
|
354
|
-
If the geodesic is intersecting a core curve, the tracing would
|
355
|
-
fail in that it would never reach the intersection point and thus
|
356
|
-
either hit the iteration limit or breaking down because of
|
357
|
-
rounding-errors.
|
358
|
-
|
359
|
-
This function is catching this case to give a meaningful exception
|
360
|
-
faster. It does so by computing the distance between the lift of
|
361
|
-
the geodesic we are tracing and the lifts of the core curve
|
362
|
-
corresponding to the vertices of the tetrahedra adjacent to the
|
363
|
-
given face.
|
364
|
-
"""
|
365
|
-
|
366
|
-
if line is None:
|
367
|
-
return
|
368
|
-
|
369
|
-
for v in simplex.ZeroSubsimplices:
|
370
|
-
if not simplex.is_subset(v, face):
|
371
|
-
continue
|
372
|
-
core_curve : Optional[R13LineWithMatrix] = tet.core_curves.get(v)
|
373
|
-
if core_curve is None:
|
374
|
-
continue
|
375
|
-
d = distance_r13_lines(core_curve.r13_line,
|
376
|
-
line.r13_line)
|
377
|
-
|
378
|
-
if not d > epsilon:
|
379
|
-
raise exceptions.GeodesicCloseToCoreCurve()
|
snappy/exceptions.py
CHANGED
@@ -1,13 +1,26 @@
|
|
1
|
-
# Exceptions from the SnapPea kernel
|
2
1
|
class SnapPeaFatalError(Exception):
|
3
2
|
"""
|
4
|
-
|
5
|
-
|
3
|
+
Exception raised by SnapPy when the SnapPea kernel encounters a fatal
|
4
|
+
error.
|
6
5
|
"""
|
7
6
|
|
8
7
|
|
9
8
|
class InsufficientPrecisionError(Exception):
|
10
9
|
"""
|
11
|
-
|
12
|
-
|
10
|
+
Exception raised when a computation fails and is likely to succeed if
|
11
|
+
higher precision is used.
|
13
12
|
"""
|
13
|
+
|
14
|
+
|
15
|
+
class NonorientableManifoldError(ValueError):
|
16
|
+
"""
|
17
|
+
Exception raised when a non-orientable manifold is given to a method
|
18
|
+
only supporting orientable manifolds.
|
19
|
+
"""
|
20
|
+
def __init__(self, method_name, manifold):
|
21
|
+
self.method_name = method_name
|
22
|
+
self.manifold = manifold
|
23
|
+
|
24
|
+
def __str__(self):
|
25
|
+
return ('%s only supports orientable manifolds but %s is '
|
26
|
+
'non-orientable.') % (self.method_name, self.manifold)
|
@@ -252,9 +252,7 @@ class BarycentricArc(Arc):
|
|
252
252
|
zeros_e = self.end.zero_coordinates()
|
253
253
|
if len(zeros_s) > 1 or len(zeros_e) > 1:
|
254
254
|
return True
|
255
|
-
|
256
|
-
return True
|
257
|
-
return False
|
255
|
+
return bool(set(zeros_s) & set(zeros_e))
|
258
256
|
|
259
257
|
def max_denom(self):
|
260
258
|
rationals = list(self.start.vector) + list(self.end.vector)
|
@@ -344,7 +342,7 @@ class TetrahedronEmbedding():
|
|
344
342
|
|
345
343
|
class TetrahedronEmbeddingCache():
|
346
344
|
def __init__(self):
|
347
|
-
self.cache =
|
345
|
+
self.cache = {}
|
348
346
|
|
349
347
|
def __call__(self, arrow, vertex_images, bdry_map=None):
|
350
348
|
if bdry_map is None:
|
snappy/exterior_to_link/main.py
CHANGED
@@ -3,6 +3,7 @@ Defines the main function `exterior_to_link`.
|
|
3
3
|
"""
|
4
4
|
|
5
5
|
import random
|
6
|
+
import typing
|
6
7
|
from .exceptions import ExteriorToLinkError
|
7
8
|
from .simplify_to_base_tri import good_simplification
|
8
9
|
from . import put_in_S3
|
@@ -40,13 +41,13 @@ def filled_is_3sphere(manifold):
|
|
40
41
|
|
41
42
|
|
42
43
|
def exterior_to_link(manifold,
|
43
|
-
verbose=False,
|
44
|
-
check_input=True,
|
45
|
-
check_answer=True,
|
46
|
-
careful_perturbation=True,
|
47
|
-
simplify_link=True,
|
48
|
-
pachner_search_tries=10,
|
49
|
-
seed=None):
|
44
|
+
verbose : bool = False,
|
45
|
+
check_input : bool = True,
|
46
|
+
check_answer : bool = True,
|
47
|
+
careful_perturbation : bool = True,
|
48
|
+
simplify_link : bool = True,
|
49
|
+
pachner_search_tries :int = 10,
|
50
|
+
seed : typing.Optional[int] = None) -> 'Link':
|
50
51
|
"""
|
51
52
|
For a triangulation of the exterior of a link in the 3-sphere,
|
52
53
|
return a planar diagram for the link. The peripheral curves whose
|
@@ -155,7 +155,7 @@ def straighten_arcs(arcs):
|
|
155
155
|
# keep track of where we most recently had success.
|
156
156
|
offset = 0
|
157
157
|
# We also keep track of arcs obstructing a given triangle
|
158
|
-
obstructions =
|
158
|
+
obstructions = {}
|
159
159
|
# Every success reduces the number of arcs by one, so
|
160
160
|
# terminates.
|
161
161
|
while success:
|
@@ -590,7 +590,7 @@ def add_core_arc_in_one_tet_solid_torus(mcomplex, tet):
|
|
590
590
|
assert no_fixed_point(tet.Gluing[F2]) and no_fixed_point(tet.Gluing[F3])
|
591
591
|
# c0, c1, c2, c3 = [QQ(x) for x in ['1/5', '1/7', '0', '23/35']] # original
|
592
592
|
# c0, c1, c2, c3 = [QQ(x) for x in ['21874/65536', '21841/65536', '0', '21821/65536']]
|
593
|
-
c0, c1, c2, c3 =
|
593
|
+
c0, c1, c2, c3 = (QQ(x) for x in ['1/3', '1/3', '0', '1/3'])
|
594
594
|
p1 = BarycentricPoint(c0, c1, c2, c3)
|
595
595
|
p2 = p1.permute(tet.Gluing[F2])
|
596
596
|
tet.arcs = [BarycentricArc(p1, p2)]
|
@@ -17,7 +17,7 @@ use_pari_even_inside_sage = False
|
|
17
17
|
from .. import sage_helper
|
18
18
|
|
19
19
|
if sage_helper._within_sage and not use_pari_even_inside_sage:
|
20
|
-
from
|
20
|
+
from ..sage_helper import QQ, RR, vector, matrix, VectorSpace
|
21
21
|
|
22
22
|
def rational_sqrt(x):
|
23
23
|
"""
|
snappy/exterior_to_link/test.py
CHANGED
@@ -1,43 +1,31 @@
|
|
1
|
+
from snappy import testing
|
1
2
|
import snappy
|
2
|
-
import sys
|
3
|
-
import getopt
|
4
|
-
from . import (rational_linear_algebra,
|
5
|
-
pl_utils,
|
6
|
-
barycentric_geometry,
|
7
|
-
hyp_utils,
|
8
|
-
link_projection,
|
9
|
-
mcomplex_with_memory,
|
10
|
-
mcomplex_with_expansion,
|
11
|
-
mcomplex_with_link,
|
12
|
-
simplify_to_base_tri,
|
13
|
-
put_in_S3,
|
14
|
-
main)
|
15
3
|
|
16
|
-
|
17
|
-
pl_utils,
|
18
|
-
barycentric_geometry,
|
19
|
-
hyp_utils,
|
20
|
-
link_projection,
|
21
|
-
mcomplex_with_memory,
|
22
|
-
mcomplex_with_expansion,
|
23
|
-
mcomplex_with_link,
|
24
|
-
simplify_to_base_tri,
|
25
|
-
put_in_S3,
|
26
|
-
main]
|
4
|
+
from snappy import exterior_to_link
|
27
5
|
|
6
|
+
modules = [
|
7
|
+
exterior_to_link.rational_linear_algebra,
|
8
|
+
exterior_to_link.pl_utils,
|
9
|
+
exterior_to_link.barycentric_geometry,
|
10
|
+
exterior_to_link.hyp_utils,
|
11
|
+
exterior_to_link.link_projection,
|
12
|
+
exterior_to_link.mcomplex_with_memory,
|
13
|
+
exterior_to_link.mcomplex_with_expansion,
|
14
|
+
exterior_to_link.mcomplex_with_link,
|
15
|
+
exterior_to_link.simplify_to_base_tri,
|
16
|
+
exterior_to_link.put_in_S3,
|
17
|
+
exterior_to_link.main
|
18
|
+
]
|
28
19
|
|
29
20
|
def run_doctests(verbose=False, print_info=True):
|
30
21
|
globs = {'Manifold': snappy.Manifold,
|
31
22
|
'Triangulation': snappy.Triangulation}
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
return results
|
23
|
+
return testing.doctest_modules(modules,
|
24
|
+
verbose=verbose,
|
25
|
+
print_info=print_info,
|
26
|
+
extraglobs=globs)
|
37
27
|
|
28
|
+
run_doctests.__name__ = exterior_to_link.__name__
|
38
29
|
|
39
30
|
if __name__ == '__main__':
|
40
|
-
|
41
|
-
verbose = len(optlist) > 0
|
42
|
-
results = run_doctests(verbose)
|
43
|
-
sys.exit(results.failed)
|
31
|
+
testing.run_doctests_as_main(run_doctests)
|