snappy 3.1.1__cp312-cp312-macosx_11_0_arm64.whl → 3.2__cp312-cp312-macosx_11_0_arm64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cpython-312-darwin.so +0 -0
- snappy/SnapPy.cpython-312-darwin.so +0 -0
- snappy/SnapPyHP.cpython-312-darwin.so +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/development.rst.txt +66 -46
- snappy/doc/_sources/index.rst.txt +72 -5
- snappy/doc/_sources/installing.rst.txt +145 -162
- snappy/doc/_sources/news.rst.txt +73 -1
- snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
- snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
- snappy/doc/_sources/triangulation.rst.txt +2 -2
- snappy/doc/_sources/verify.rst.txt +89 -29
- snappy/doc/_sources/verify_internals.rst.txt +5 -16
- snappy/doc/_static/basic.css +1 -1
- 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 +1 -1
- 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 +2 -2
- snappy/doc/_static/searchtools.js +108 -62
- snappy/doc/additional_classes.html +209 -40
- snappy/doc/bugs.html +16 -19
- snappy/doc/censuses.html +19 -38
- snappy/doc/credits.html +16 -19
- snappy/doc/development.html +84 -64
- snappy/doc/genindex.html +65 -144
- snappy/doc/index.html +81 -26
- snappy/doc/installing.html +158 -176
- snappy/doc/manifold.html +1119 -507
- snappy/doc/manifoldhp.html +16 -19
- snappy/doc/news.html +90 -32
- snappy/doc/objects.inv +0 -0
- snappy/doc/other.html +17 -19
- snappy/doc/platonic_census.html +16 -19
- snappy/doc/plink.html +16 -19
- snappy/doc/ptolemy.html +17 -19
- snappy/doc/ptolemy_classes.html +31 -34
- snappy/doc/ptolemy_examples1.html +23 -25
- snappy/doc/ptolemy_examples2.html +16 -19
- snappy/doc/ptolemy_examples3.html +18 -21
- snappy/doc/ptolemy_examples4.html +16 -19
- snappy/doc/ptolemy_prelim.html +17 -20
- snappy/doc/py-modindex.html +16 -19
- snappy/doc/screenshots.html +18 -20
- snappy/doc/search.html +15 -18
- snappy/doc/searchindex.js +1 -1
- snappy/doc/snap.html +16 -19
- snappy/doc/snappy.html +17 -19
- snappy/doc/spherogram.html +29 -32
- snappy/doc/todo.html +16 -19
- snappy/doc/triangulation.html +299 -190
- snappy/doc/tutorial.html +16 -19
- snappy/doc/verify.html +97 -43
- snappy/doc/verify_internals.html +59 -516
- 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.cpython-312-darwin.so +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__/infowindow.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/raytracing/__pycache__/__init__.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/finite_raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/gui_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/inside_viewer.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/raytracing_data.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/raytracing_view.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-312.pyc +0 -0
- snappy/raytracing/__pycache__/view_scale_controller.cpython-312.pyc +0 -0
- snappy/raytracing/zoom_slider/__pycache__/__init__.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 -585
- {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
snappy/doc/_static/doctools.js
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,228 @@
|
|
1
|
+
const themeFlyoutDisplay = "hidden";
|
2
|
+
const themeVersionSelector = true;
|
3
|
+
const themeLanguageSelector = true;
|
4
|
+
|
5
|
+
if (themeFlyoutDisplay === "attached") {
|
6
|
+
function renderLanguages(config) {
|
7
|
+
if (!config.projects.translations.length) {
|
8
|
+
return "";
|
9
|
+
}
|
10
|
+
|
11
|
+
// Insert the current language to the options on the selector
|
12
|
+
let languages = config.projects.translations.concat(config.projects.current);
|
13
|
+
languages = languages.sort((a, b) => a.language.name.localeCompare(b.language.name));
|
14
|
+
|
15
|
+
const languagesHTML = `
|
16
|
+
<dl>
|
17
|
+
<dt>Languages</dt>
|
18
|
+
${languages
|
19
|
+
.map(
|
20
|
+
(translation) => `
|
21
|
+
<dd ${translation.slug == config.projects.current.slug ? 'class="rtd-current-item"' : ""}>
|
22
|
+
<a href="${translation.urls.documentation}">${translation.language.code}</a>
|
23
|
+
</dd>
|
24
|
+
`,
|
25
|
+
)
|
26
|
+
.join("\n")}
|
27
|
+
</dl>
|
28
|
+
`;
|
29
|
+
return languagesHTML;
|
30
|
+
}
|
31
|
+
|
32
|
+
function renderVersions(config) {
|
33
|
+
if (!config.versions.active.length) {
|
34
|
+
return "";
|
35
|
+
}
|
36
|
+
const versionsHTML = `
|
37
|
+
<dl>
|
38
|
+
<dt>Versions</dt>
|
39
|
+
${config.versions.active
|
40
|
+
.map(
|
41
|
+
(version) => `
|
42
|
+
<dd ${version.slug === config.versions.current.slug ? 'class="rtd-current-item"' : ""}>
|
43
|
+
<a href="${version.urls.documentation}">${version.slug}</a>
|
44
|
+
</dd>
|
45
|
+
`,
|
46
|
+
)
|
47
|
+
.join("\n")}
|
48
|
+
</dl>
|
49
|
+
`;
|
50
|
+
return versionsHTML;
|
51
|
+
}
|
52
|
+
|
53
|
+
function renderDownloads(config) {
|
54
|
+
if (!Object.keys(config.versions.current.downloads).length) {
|
55
|
+
return "";
|
56
|
+
}
|
57
|
+
const downloadsNameDisplay = {
|
58
|
+
pdf: "PDF",
|
59
|
+
epub: "Epub",
|
60
|
+
htmlzip: "HTML",
|
61
|
+
};
|
62
|
+
|
63
|
+
const downloadsHTML = `
|
64
|
+
<dl>
|
65
|
+
<dt>Downloads</dt>
|
66
|
+
${Object.entries(config.versions.current.downloads)
|
67
|
+
.map(
|
68
|
+
([name, url]) => `
|
69
|
+
<dd>
|
70
|
+
<a href="${url}">${downloadsNameDisplay[name]}</a>
|
71
|
+
</dd>
|
72
|
+
`,
|
73
|
+
)
|
74
|
+
.join("\n")}
|
75
|
+
</dl>
|
76
|
+
`;
|
77
|
+
return downloadsHTML;
|
78
|
+
}
|
79
|
+
|
80
|
+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
81
|
+
const config = event.detail.data();
|
82
|
+
|
83
|
+
const flyout = `
|
84
|
+
<div class="rst-versions" data-toggle="rst-versions" role="note">
|
85
|
+
<span class="rst-current-version" data-toggle="rst-current-version">
|
86
|
+
<span class="fa fa-book"> Read the Docs</span>
|
87
|
+
v: ${config.versions.current.slug}
|
88
|
+
<span class="fa fa-caret-down"></span>
|
89
|
+
</span>
|
90
|
+
<div class="rst-other-versions">
|
91
|
+
<div class="injected">
|
92
|
+
${renderLanguages(config)}
|
93
|
+
${renderVersions(config)}
|
94
|
+
${renderDownloads(config)}
|
95
|
+
<dl>
|
96
|
+
<dt>On Read the Docs</dt>
|
97
|
+
<dd>
|
98
|
+
<a href="${config.projects.current.urls.home}">Project Home</a>
|
99
|
+
</dd>
|
100
|
+
<dd>
|
101
|
+
<a href="${config.projects.current.urls.builds}">Builds</a>
|
102
|
+
</dd>
|
103
|
+
<dd>
|
104
|
+
<a href="${config.projects.current.urls.downloads}">Downloads</a>
|
105
|
+
</dd>
|
106
|
+
</dl>
|
107
|
+
<dl>
|
108
|
+
<dt>Search</dt>
|
109
|
+
<dd>
|
110
|
+
<form id="flyout-search-form">
|
111
|
+
<input
|
112
|
+
class="wy-form"
|
113
|
+
type="text"
|
114
|
+
name="q"
|
115
|
+
aria-label="Search docs"
|
116
|
+
placeholder="Search docs"
|
117
|
+
/>
|
118
|
+
</form>
|
119
|
+
</dd>
|
120
|
+
</dl>
|
121
|
+
<hr />
|
122
|
+
<small>
|
123
|
+
<span>Hosted by <a href="https://about.readthedocs.org/?utm_source=&utm_content=flyout">Read the Docs</a></span>
|
124
|
+
</small>
|
125
|
+
</div>
|
126
|
+
</div>
|
127
|
+
`;
|
128
|
+
|
129
|
+
// Inject the generated flyout into the body HTML element.
|
130
|
+
document.body.insertAdjacentHTML("beforeend", flyout);
|
131
|
+
|
132
|
+
// Trigger the Read the Docs Addons Search modal when clicking on the "Search docs" input from inside the flyout.
|
133
|
+
document
|
134
|
+
.querySelector("#flyout-search-form")
|
135
|
+
.addEventListener("focusin", () => {
|
136
|
+
const event = new CustomEvent("readthedocs-search-show");
|
137
|
+
document.dispatchEvent(event);
|
138
|
+
});
|
139
|
+
})
|
140
|
+
}
|
141
|
+
|
142
|
+
if (themeLanguageSelector || themeVersionSelector) {
|
143
|
+
function onSelectorSwitch(event) {
|
144
|
+
const option = event.target.selectedIndex;
|
145
|
+
const item = event.target.options[option];
|
146
|
+
window.location.href = item.dataset.url;
|
147
|
+
}
|
148
|
+
|
149
|
+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
150
|
+
const config = event.detail.data();
|
151
|
+
|
152
|
+
const versionSwitch = document.querySelector(
|
153
|
+
"div.switch-menus > div.version-switch",
|
154
|
+
);
|
155
|
+
if (themeVersionSelector) {
|
156
|
+
let versions = config.versions.active;
|
157
|
+
if (config.versions.current.hidden || config.versions.current.type === "external") {
|
158
|
+
versions.unshift(config.versions.current);
|
159
|
+
}
|
160
|
+
const versionSelect = `
|
161
|
+
<select>
|
162
|
+
${versions
|
163
|
+
.map(
|
164
|
+
(version) => `
|
165
|
+
<option
|
166
|
+
value="${version.slug}"
|
167
|
+
${config.versions.current.slug === version.slug ? 'selected="selected"' : ""}
|
168
|
+
data-url="${version.urls.documentation}">
|
169
|
+
${version.slug}
|
170
|
+
</option>`,
|
171
|
+
)
|
172
|
+
.join("\n")}
|
173
|
+
</select>
|
174
|
+
`;
|
175
|
+
|
176
|
+
versionSwitch.innerHTML = versionSelect;
|
177
|
+
versionSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
|
178
|
+
}
|
179
|
+
|
180
|
+
const languageSwitch = document.querySelector(
|
181
|
+
"div.switch-menus > div.language-switch",
|
182
|
+
);
|
183
|
+
|
184
|
+
if (themeLanguageSelector) {
|
185
|
+
if (config.projects.translations.length) {
|
186
|
+
// Add the current language to the options on the selector
|
187
|
+
let languages = config.projects.translations.concat(
|
188
|
+
config.projects.current,
|
189
|
+
);
|
190
|
+
languages = languages.sort((a, b) =>
|
191
|
+
a.language.name.localeCompare(b.language.name),
|
192
|
+
);
|
193
|
+
|
194
|
+
const languageSelect = `
|
195
|
+
<select>
|
196
|
+
${languages
|
197
|
+
.map(
|
198
|
+
(language) => `
|
199
|
+
<option
|
200
|
+
value="${language.language.code}"
|
201
|
+
${config.projects.current.slug === language.slug ? 'selected="selected"' : ""}
|
202
|
+
data-url="${language.urls.documentation}">
|
203
|
+
${language.language.name}
|
204
|
+
</option>`,
|
205
|
+
)
|
206
|
+
.join("\n")}
|
207
|
+
</select>
|
208
|
+
`;
|
209
|
+
|
210
|
+
languageSwitch.innerHTML = languageSelect;
|
211
|
+
languageSwitch.firstElementChild.addEventListener("change", onSelectorSwitch);
|
212
|
+
}
|
213
|
+
else {
|
214
|
+
languageSwitch.remove();
|
215
|
+
}
|
216
|
+
}
|
217
|
+
});
|
218
|
+
}
|
219
|
+
|
220
|
+
document.addEventListener("readthedocs-addons-data-ready", function (event) {
|
221
|
+
// Trigger the Read the Docs Addons Search modal when clicking on "Search docs" input from the topnav.
|
222
|
+
document
|
223
|
+
.querySelector("[role='search'] input")
|
224
|
+
.addEventListener("focusin", () => {
|
225
|
+
const event = new CustomEvent("readthedocs-search-show");
|
226
|
+
document.dispatchEvent(event);
|
227
|
+
});
|
228
|
+
});
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* This script contains the language-specific data used by searchtools.js,
|
6
6
|
* namely the list of stopwords, stemmer, scorer and splitter.
|
7
7
|
*
|
8
|
-
* :copyright: Copyright 2007-
|
8
|
+
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
9
9
|
* :license: BSD, see LICENSE for details.
|
10
10
|
*
|
11
11
|
*/
|
@@ -13,7 +13,7 @@
|
|
13
13
|
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
|
14
14
|
|
15
15
|
|
16
|
-
/* Non-minified version is copied as a separate JS file,
|
16
|
+
/* Non-minified version is copied as a separate JS file, if available */
|
17
17
|
|
18
18
|
/**
|
19
19
|
* Porter Stemmer
|
@@ -4,7 +4,7 @@
|
|
4
4
|
*
|
5
5
|
* Sphinx JavaScript utilities for the full-text search.
|
6
6
|
*
|
7
|
-
* :copyright: Copyright 2007-
|
7
|
+
* :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
|
8
8
|
* :license: BSD, see LICENSE for details.
|
9
9
|
*
|
10
10
|
*/
|
@@ -99,7 +99,7 @@ const _displayItem = (item, searchTerms, highlightTerms) => {
|
|
99
99
|
.then((data) => {
|
100
100
|
if (data)
|
101
101
|
listItem.appendChild(
|
102
|
-
Search.makeSearchSummary(data, searchTerms)
|
102
|
+
Search.makeSearchSummary(data, searchTerms, anchor)
|
103
103
|
);
|
104
104
|
// highlight search terms in the summary
|
105
105
|
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
|
@@ -116,8 +116,8 @@ const _finishSearch = (resultCount) => {
|
|
116
116
|
);
|
117
117
|
else
|
118
118
|
Search.status.innerText = _(
|
119
|
-
|
120
|
-
);
|
119
|
+
"Search finished, found ${resultCount} page(s) matching the search query."
|
120
|
+
).replace('${resultCount}', resultCount);
|
121
121
|
};
|
122
122
|
const _displayNextItem = (
|
123
123
|
results,
|
@@ -137,6 +137,22 @@ const _displayNextItem = (
|
|
137
137
|
// search finished, update title and status message
|
138
138
|
else _finishSearch(resultCount);
|
139
139
|
};
|
140
|
+
// Helper function used by query() to order search results.
|
141
|
+
// Each input is an array of [docname, title, anchor, descr, score, filename].
|
142
|
+
// Order the results by score (in opposite order of appearance, since the
|
143
|
+
// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically.
|
144
|
+
const _orderResultsByScoreThenName = (a, b) => {
|
145
|
+
const leftScore = a[4];
|
146
|
+
const rightScore = b[4];
|
147
|
+
if (leftScore === rightScore) {
|
148
|
+
// same score: sort alphabetically
|
149
|
+
const leftTitle = a[1].toLowerCase();
|
150
|
+
const rightTitle = b[1].toLowerCase();
|
151
|
+
if (leftTitle === rightTitle) return 0;
|
152
|
+
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
153
|
+
}
|
154
|
+
return leftScore > rightScore ? 1 : -1;
|
155
|
+
};
|
140
156
|
|
141
157
|
/**
|
142
158
|
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
|
@@ -160,13 +176,26 @@ const Search = {
|
|
160
176
|
_queued_query: null,
|
161
177
|
_pulse_status: -1,
|
162
178
|
|
163
|
-
htmlToText: (htmlString) => {
|
179
|
+
htmlToText: (htmlString, anchor) => {
|
164
180
|
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
165
|
-
|
181
|
+
for (const removalQuery of [".headerlink", "script", "style"]) {
|
182
|
+
htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() });
|
183
|
+
}
|
184
|
+
if (anchor) {
|
185
|
+
const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`);
|
186
|
+
if (anchorContent) return anchorContent.textContent;
|
187
|
+
|
188
|
+
console.warn(
|
189
|
+
`Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.`
|
190
|
+
);
|
191
|
+
}
|
192
|
+
|
193
|
+
// if anchor not specified or not found, fall back to main content
|
166
194
|
const docContent = htmlElement.querySelector('[role="main"]');
|
167
|
-
if (docContent
|
195
|
+
if (docContent) return docContent.textContent;
|
196
|
+
|
168
197
|
console.warn(
|
169
|
-
"Content block not found. Sphinx search tries to obtain it via '[role=main]'.
|
198
|
+
"Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template."
|
170
199
|
);
|
171
200
|
return "";
|
172
201
|
},
|
@@ -239,16 +268,7 @@ const Search = {
|
|
239
268
|
else Search.deferQuery(query);
|
240
269
|
},
|
241
270
|
|
242
|
-
|
243
|
-
* execute search (requires search index to be loaded)
|
244
|
-
*/
|
245
|
-
query: (query) => {
|
246
|
-
const filenames = Search._index.filenames;
|
247
|
-
const docNames = Search._index.docnames;
|
248
|
-
const titles = Search._index.titles;
|
249
|
-
const allTitles = Search._index.alltitles;
|
250
|
-
const indexEntries = Search._index.indexentries;
|
251
|
-
|
271
|
+
_parseQuery: (query) => {
|
252
272
|
// stem the search terms and add them to the correct list
|
253
273
|
const stemmer = new Stemmer();
|
254
274
|
const searchTerms = new Set();
|
@@ -284,21 +304,38 @@ const Search = {
|
|
284
304
|
// console.info("required: ", [...searchTerms]);
|
285
305
|
// console.info("excluded: ", [...excludedTerms]);
|
286
306
|
|
287
|
-
|
288
|
-
|
307
|
+
return [query, searchTerms, excludedTerms, highlightTerms, objectTerms];
|
308
|
+
},
|
309
|
+
|
310
|
+
/**
|
311
|
+
* execute search (requires search index to be loaded)
|
312
|
+
*/
|
313
|
+
_performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => {
|
314
|
+
const filenames = Search._index.filenames;
|
315
|
+
const docNames = Search._index.docnames;
|
316
|
+
const titles = Search._index.titles;
|
317
|
+
const allTitles = Search._index.alltitles;
|
318
|
+
const indexEntries = Search._index.indexentries;
|
319
|
+
|
320
|
+
// Collect multiple result groups to be sorted separately and then ordered.
|
321
|
+
// Each is an array of [docname, title, anchor, descr, score, filename].
|
322
|
+
const normalResults = [];
|
323
|
+
const nonMainIndexResults = [];
|
324
|
+
|
289
325
|
_removeChildren(document.getElementById("search-progress"));
|
290
326
|
|
291
|
-
const queryLower = query.toLowerCase();
|
327
|
+
const queryLower = query.toLowerCase().trim();
|
292
328
|
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
293
|
-
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
329
|
+
if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
294
330
|
for (const [file, id] of foundTitles) {
|
295
|
-
|
296
|
-
|
331
|
+
const score = Math.round(Scorer.title * queryLower.length / title.length);
|
332
|
+
const boost = titles[file] === title ? 1 : 0; // add a boost for document titles
|
333
|
+
normalResults.push([
|
297
334
|
docNames[file],
|
298
335
|
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
299
336
|
id !== null ? "#" + id : "",
|
300
337
|
null,
|
301
|
-
score,
|
338
|
+
score + boost,
|
302
339
|
filenames[file],
|
303
340
|
]);
|
304
341
|
}
|
@@ -308,46 +345,47 @@ const Search = {
|
|
308
345
|
// search for explicit entries in index directives
|
309
346
|
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
|
310
347
|
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
|
311
|
-
for (const [file, id] of foundEntries) {
|
312
|
-
|
313
|
-
|
348
|
+
for (const [file, id, isMain] of foundEntries) {
|
349
|
+
const score = Math.round(100 * queryLower.length / entry.length);
|
350
|
+
const result = [
|
314
351
|
docNames[file],
|
315
352
|
titles[file],
|
316
353
|
id ? "#" + id : "",
|
317
354
|
null,
|
318
355
|
score,
|
319
356
|
filenames[file],
|
320
|
-
]
|
357
|
+
];
|
358
|
+
if (isMain) {
|
359
|
+
normalResults.push(result);
|
360
|
+
} else {
|
361
|
+
nonMainIndexResults.push(result);
|
362
|
+
}
|
321
363
|
}
|
322
364
|
}
|
323
365
|
}
|
324
366
|
|
325
367
|
// lookup as object
|
326
368
|
objectTerms.forEach((term) =>
|
327
|
-
|
369
|
+
normalResults.push(...Search.performObjectSearch(term, objectTerms))
|
328
370
|
);
|
329
371
|
|
330
372
|
// lookup as search terms in fulltext
|
331
|
-
|
373
|
+
normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms));
|
332
374
|
|
333
375
|
// let the scorer override scores with a custom scoring function
|
334
|
-
if (Scorer.score)
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
results
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
348
|
-
}
|
349
|
-
return leftScore > rightScore ? 1 : -1;
|
350
|
-
});
|
376
|
+
if (Scorer.score) {
|
377
|
+
normalResults.forEach((item) => (item[4] = Scorer.score(item)));
|
378
|
+
nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item)));
|
379
|
+
}
|
380
|
+
|
381
|
+
// Sort each group of results by score and then alphabetically by name.
|
382
|
+
normalResults.sort(_orderResultsByScoreThenName);
|
383
|
+
nonMainIndexResults.sort(_orderResultsByScoreThenName);
|
384
|
+
|
385
|
+
// Combine the result groups in (reverse) order.
|
386
|
+
// Non-main index entries are typically arbitrary cross-references,
|
387
|
+
// so display them after other results.
|
388
|
+
let results = [...nonMainIndexResults, ...normalResults];
|
351
389
|
|
352
390
|
// remove duplicate search results
|
353
391
|
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
|
@@ -361,7 +399,12 @@ const Search = {
|
|
361
399
|
return acc;
|
362
400
|
}, []);
|
363
401
|
|
364
|
-
|
402
|
+
return results.reverse();
|
403
|
+
},
|
404
|
+
|
405
|
+
query: (query) => {
|
406
|
+
const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query);
|
407
|
+
const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms);
|
365
408
|
|
366
409
|
// for debugging
|
367
410
|
//Search.lastresults = results.slice(); // a copy
|
@@ -466,14 +509,18 @@ const Search = {
|
|
466
509
|
// add support for partial matches
|
467
510
|
if (word.length > 2) {
|
468
511
|
const escapedWord = _escapeRegExp(word);
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
512
|
+
if (!terms.hasOwnProperty(word)) {
|
513
|
+
Object.keys(terms).forEach((term) => {
|
514
|
+
if (term.match(escapedWord))
|
515
|
+
arr.push({ files: terms[term], score: Scorer.partialTerm });
|
516
|
+
});
|
517
|
+
}
|
518
|
+
if (!titleTerms.hasOwnProperty(word)) {
|
519
|
+
Object.keys(titleTerms).forEach((term) => {
|
520
|
+
if (term.match(escapedWord))
|
521
|
+
arr.push({ files: titleTerms[term], score: Scorer.partialTitle });
|
522
|
+
});
|
523
|
+
}
|
477
524
|
}
|
478
525
|
|
479
526
|
// no match but word was a required one
|
@@ -496,9 +543,8 @@ const Search = {
|
|
496
543
|
|
497
544
|
// create the mapping
|
498
545
|
files.forEach((file) => {
|
499
|
-
if (fileMap.has(file)
|
500
|
-
|
501
|
-
else fileMap.set(file, [word]);
|
546
|
+
if (!fileMap.has(file)) fileMap.set(file, [word]);
|
547
|
+
else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word);
|
502
548
|
});
|
503
549
|
});
|
504
550
|
|
@@ -549,8 +595,8 @@ const Search = {
|
|
549
595
|
* search summary for a given text. keywords is a list
|
550
596
|
* of stemmed words.
|
551
597
|
*/
|
552
|
-
makeSearchSummary: (htmlText, keywords) => {
|
553
|
-
const text = Search.htmlToText(htmlText);
|
598
|
+
makeSearchSummary: (htmlText, keywords, anchor) => {
|
599
|
+
const text = Search.htmlToText(htmlText, anchor);
|
554
600
|
if (text === "") return null;
|
555
601
|
|
556
602
|
const textLower = text.toLowerCase();
|