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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (461) hide show
  1. snappy/CyOpenGL.cpython-312-darwin.so +0 -0
  2. snappy/SnapPy.cpython-312-darwin.so +0 -0
  3. snappy/SnapPyHP.cpython-312-darwin.so +0 -0
  4. snappy/__init__.py +271 -401
  5. snappy/app.py +70 -20
  6. snappy/browser.py +18 -17
  7. snappy/canonical.py +249 -0
  8. snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
  9. snappy/cusps/cusp_area_matrix.py +101 -0
  10. snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
  11. snappy/cusps/maximal_cusp_area_matrix.py +136 -0
  12. snappy/cusps/test.py +21 -0
  13. snappy/cusps/trig_cusp_area_matrix.py +63 -0
  14. snappy/database.py +10 -9
  15. snappy/decorated_isosig.py +337 -114
  16. snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
  17. snappy/dev/extended_ptolemy/extended.py +3 -3
  18. snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
  19. snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
  20. snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
  21. snappy/doc/_images/m125_paper_plane.jpg +0 -0
  22. snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
  23. snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
  24. snappy/doc/_sources/development.rst.txt +66 -46
  25. snappy/doc/_sources/index.rst.txt +72 -5
  26. snappy/doc/_sources/installing.rst.txt +145 -162
  27. snappy/doc/_sources/news.rst.txt +73 -1
  28. snappy/doc/_sources/ptolemy_examples1.rst.txt +8 -7
  29. snappy/doc/_sources/ptolemy_examples3.rst.txt +2 -2
  30. snappy/doc/_sources/triangulation.rst.txt +2 -2
  31. snappy/doc/_sources/verify.rst.txt +89 -29
  32. snappy/doc/_sources/verify_internals.rst.txt +5 -16
  33. snappy/doc/_static/basic.css +1 -1
  34. snappy/doc/_static/css/badge_only.css +1 -1
  35. snappy/doc/_static/css/theme.css +1 -1
  36. snappy/doc/_static/doctools.js +1 -1
  37. snappy/doc/_static/documentation_options.js +1 -1
  38. snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
  39. snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
  40. snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
  41. snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
  42. snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
  43. snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
  44. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
  45. snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
  46. snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
  47. snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
  48. snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
  49. snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
  50. snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
  51. snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
  52. snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
  53. snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
  54. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
  55. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
  56. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
  57. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
  58. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
  59. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
  60. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
  61. snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
  62. snappy/doc/_static/js/versions.js +228 -0
  63. snappy/doc/_static/language_data.js +2 -2
  64. snappy/doc/_static/searchtools.js +108 -62
  65. snappy/doc/additional_classes.html +209 -40
  66. snappy/doc/bugs.html +16 -19
  67. snappy/doc/censuses.html +19 -38
  68. snappy/doc/credits.html +16 -19
  69. snappy/doc/development.html +84 -64
  70. snappy/doc/genindex.html +65 -144
  71. snappy/doc/index.html +81 -26
  72. snappy/doc/installing.html +158 -176
  73. snappy/doc/manifold.html +1119 -507
  74. snappy/doc/manifoldhp.html +16 -19
  75. snappy/doc/news.html +90 -32
  76. snappy/doc/objects.inv +0 -0
  77. snappy/doc/other.html +17 -19
  78. snappy/doc/platonic_census.html +16 -19
  79. snappy/doc/plink.html +16 -19
  80. snappy/doc/ptolemy.html +17 -19
  81. snappy/doc/ptolemy_classes.html +31 -34
  82. snappy/doc/ptolemy_examples1.html +23 -25
  83. snappy/doc/ptolemy_examples2.html +16 -19
  84. snappy/doc/ptolemy_examples3.html +18 -21
  85. snappy/doc/ptolemy_examples4.html +16 -19
  86. snappy/doc/ptolemy_prelim.html +17 -20
  87. snappy/doc/py-modindex.html +16 -19
  88. snappy/doc/screenshots.html +18 -20
  89. snappy/doc/search.html +15 -18
  90. snappy/doc/searchindex.js +1 -1
  91. snappy/doc/snap.html +16 -19
  92. snappy/doc/snappy.html +17 -19
  93. snappy/doc/spherogram.html +29 -32
  94. snappy/doc/todo.html +16 -19
  95. snappy/doc/triangulation.html +299 -190
  96. snappy/doc/tutorial.html +16 -19
  97. snappy/doc/verify.html +97 -43
  98. snappy/doc/verify_internals.html +59 -516
  99. snappy/drilling/__init__.py +153 -235
  100. snappy/drilling/barycentric.py +103 -0
  101. snappy/drilling/constants.py +0 -2
  102. snappy/drilling/crush.py +56 -130
  103. snappy/drilling/cusps.py +12 -6
  104. snappy/drilling/debug.py +2 -1
  105. snappy/drilling/exceptions.py +7 -40
  106. snappy/drilling/moves.py +302 -243
  107. snappy/drilling/perturb.py +63 -37
  108. snappy/drilling/shorten.py +36 -0
  109. snappy/drilling/subdivide.py +0 -5
  110. snappy/drilling/test.py +23 -0
  111. snappy/drilling/test_cases.py +126 -0
  112. snappy/drilling/tracing.py +9 -37
  113. snappy/exceptions.py +18 -5
  114. snappy/exterior_to_link/barycentric_geometry.py +2 -4
  115. snappy/exterior_to_link/main.py +8 -7
  116. snappy/exterior_to_link/mcomplex_with_link.py +2 -2
  117. snappy/exterior_to_link/rational_linear_algebra.py +1 -1
  118. snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
  119. snappy/exterior_to_link/test.py +21 -33
  120. snappy/geometric_structure/__init__.py +212 -0
  121. snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
  122. snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
  123. snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
  124. snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
  125. snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
  126. snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
  127. snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
  128. snappy/geometric_structure/geodesic/__init__.py +0 -0
  129. snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
  130. snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
  131. snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
  132. snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
  133. snappy/geometric_structure/geodesic/constants.py +6 -0
  134. snappy/geometric_structure/geodesic/exceptions.py +22 -0
  135. snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
  136. snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
  137. snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
  138. snappy/geometric_structure/geodesic/line.py +30 -0
  139. snappy/geometric_structure/geodesic/multiplicity.py +127 -0
  140. snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
  141. snappy/geometric_structure/test.py +22 -0
  142. snappy/gui.py +23 -13
  143. snappy/horoviewer.py +7 -7
  144. snappy/hyperboloid/__init__.py +96 -31
  145. snappy/hyperboloid/distances.py +245 -0
  146. snappy/hyperboloid/horoball.py +19 -0
  147. snappy/hyperboloid/line.py +35 -0
  148. snappy/hyperboloid/point.py +9 -0
  149. snappy/hyperboloid/triangle.py +29 -0
  150. snappy/isometry_signature.py +382 -0
  151. snappy/len_spec/__init__.py +596 -0
  152. snappy/len_spec/geodesic_info.py +110 -0
  153. snappy/len_spec/geodesic_key_info_dict.py +117 -0
  154. snappy/len_spec/geodesic_piece.py +143 -0
  155. snappy/len_spec/geometric_structure.py +182 -0
  156. snappy/len_spec/geometry.py +80 -0
  157. snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
  158. snappy/len_spec/spine.py +206 -0
  159. snappy/len_spec/test.py +24 -0
  160. snappy/len_spec/test_cases.py +69 -0
  161. snappy/len_spec/tile.py +275 -0
  162. snappy/len_spec/word.py +86 -0
  163. snappy/math_basics.py +39 -13
  164. snappy/matrix.py +52 -9
  165. snappy/number.py +12 -6
  166. snappy/numeric_output_checker.py +2 -3
  167. snappy/pari.py +6 -3
  168. snappy/polyviewer.py +8 -8
  169. snappy/ptolemy/__init__.py +1 -1
  170. snappy/ptolemy/component.py +2 -2
  171. snappy/ptolemy/coordinates.py +25 -25
  172. snappy/ptolemy/findLoops.py +9 -9
  173. snappy/ptolemy/manifoldMethods.py +27 -29
  174. snappy/ptolemy/polynomial.py +50 -57
  175. snappy/ptolemy/processFileBase.py +60 -0
  176. snappy/ptolemy/ptolemyVariety.py +109 -41
  177. snappy/ptolemy/reginaWrapper.py +4 -4
  178. snappy/ptolemy/rur.py +1 -1
  179. snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
  180. snappy/ptolemy/test.py +99 -54
  181. snappy/ptolemy/utilities.py +1 -1
  182. snappy/raytracing/__init__.py +64 -0
  183. snappy/raytracing/additional_horospheres.py +64 -0
  184. snappy/raytracing/additional_len_spec_choices.py +63 -0
  185. snappy/raytracing/cohomology_fractal.py +0 -3
  186. snappy/raytracing/eyeball.py +123 -0
  187. snappy/raytracing/finite_raytracing_data.py +17 -17
  188. snappy/raytracing/finite_viewer.py +15 -15
  189. snappy/raytracing/geodesic_tube_info.py +93 -63
  190. snappy/raytracing/geodesics.py +94 -64
  191. snappy/raytracing/geodesics_window.py +56 -34
  192. snappy/raytracing/gui_utilities.py +21 -6
  193. snappy/raytracing/hyperboloid_navigation.py +29 -4
  194. snappy/raytracing/hyperboloid_utilities.py +73 -73
  195. snappy/raytracing/ideal_raytracing_data.py +121 -91
  196. snappy/raytracing/inside_viewer.py +199 -66
  197. snappy/raytracing/pack.py +22 -0
  198. snappy/raytracing/raytracing_data.py +37 -25
  199. snappy/raytracing/raytracing_view.py +70 -65
  200. snappy/raytracing/shaders/Eye.png +0 -0
  201. snappy/raytracing/shaders/NonGeometric.png +0 -0
  202. snappy/raytracing/shaders/__init__.py +39 -3
  203. snappy/raytracing/shaders/fragment.glsl +451 -133
  204. snappy/raytracing/test.py +29 -0
  205. snappy/raytracing/tooltip.py +146 -0
  206. snappy/raytracing/upper_halfspace_utilities.py +42 -9
  207. snappy/sage_helper.py +67 -134
  208. snappy/settings.py +90 -77
  209. snappy/shell.py +2 -0
  210. snappy/snap/character_varieties.py +2 -2
  211. snappy/snap/find_field.py +4 -3
  212. snappy/snap/fundamental_polyhedron.py +2 -2
  213. snappy/snap/kernel_structures.py +5 -1
  214. snappy/snap/nsagetools.py +9 -8
  215. snappy/snap/peripheral/dual_cellulation.py +4 -3
  216. snappy/snap/peripheral/peripheral.py +2 -2
  217. snappy/snap/peripheral/surface.py +5 -5
  218. snappy/snap/peripheral/test.py +1 -1
  219. snappy/snap/polished_reps.py +8 -8
  220. snappy/snap/slice_obs_HKL.py +16 -14
  221. snappy/snap/t3mlite/arrow.py +3 -3
  222. snappy/snap/t3mlite/edge.py +3 -3
  223. snappy/snap/t3mlite/homology.py +2 -2
  224. snappy/snap/t3mlite/mcomplex.py +3 -3
  225. snappy/snap/t3mlite/simplex.py +12 -0
  226. snappy/snap/t3mlite/spun.py +18 -17
  227. snappy/snap/t3mlite/test_vs_regina.py +4 -4
  228. snappy/snap/test.py +37 -53
  229. snappy/snap/utilities.py +4 -5
  230. snappy/test.py +121 -138
  231. snappy/test_cases.py +263 -0
  232. snappy/testing.py +131 -0
  233. snappy/tiling/__init__.py +2 -0
  234. snappy/tiling/canonical_key_dict.py +59 -0
  235. snappy/tiling/dict_based_set.py +79 -0
  236. snappy/tiling/floor.py +49 -0
  237. snappy/tiling/hyperboloid_dict.py +54 -0
  238. snappy/tiling/iter_utils.py +78 -0
  239. snappy/tiling/lifted_tetrahedron.py +22 -0
  240. snappy/tiling/lifted_tetrahedron_set.py +54 -0
  241. snappy/tiling/real_hash_dict.py +164 -0
  242. snappy/tiling/test.py +23 -0
  243. snappy/tiling/tile.py +215 -0
  244. snappy/tiling/triangle.py +33 -0
  245. snappy/tkterminal.py +113 -84
  246. snappy/twister/main.py +1 -7
  247. snappy/twister/twister_core.cpython-312-darwin.so +0 -0
  248. snappy/upper_halfspace/__init__.py +78 -17
  249. snappy/verify/__init__.py +3 -7
  250. snappy/verify/{verifyCanonical.py → canonical.py} +78 -70
  251. snappy/verify/complex_volume/adjust_torsion.py +1 -2
  252. snappy/verify/complex_volume/closed.py +13 -13
  253. snappy/verify/complex_volume/cusped.py +6 -6
  254. snappy/verify/complex_volume/extended_bloch.py +5 -8
  255. snappy/verify/{cuspTranslations.py → cusp_translations.py} +1 -1
  256. snappy/verify/edge_equations.py +80 -0
  257. snappy/verify/exceptions.py +0 -55
  258. snappy/verify/{verifyHyperbolicity.py → hyperbolicity.py} +3 -3
  259. snappy/verify/interval_newton_shapes_engine.py +7 -5
  260. snappy/verify/interval_tree.py +5 -5
  261. snappy/verify/krawczyk_shapes_engine.py +17 -18
  262. snappy/verify/maximal_cusp_area_matrix/__init__.py +7 -74
  263. snappy/verify/maximal_cusp_area_matrix/cusp_tiling_engine.py +3 -4
  264. snappy/verify/maximal_cusp_area_matrix/cusp_translate_engine.py +1 -1
  265. snappy/verify/{realAlgebra.py → real_algebra.py} +1 -1
  266. snappy/verify/shapes.py +5 -3
  267. snappy/verify/short_slopes.py +39 -41
  268. snappy/verify/{squareExtensions.py → square_extensions.py} +14 -11
  269. snappy/verify/test.py +57 -60
  270. snappy/verify/upper_halfspace/extended_matrix.py +1 -1
  271. snappy/verify/upper_halfspace/finite_point.py +3 -4
  272. snappy/verify/upper_halfspace/ideal_point.py +9 -9
  273. snappy/verify/volume.py +2 -2
  274. snappy/version.py +2 -2
  275. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/METADATA +25 -11
  276. snappy-3.2.dist-info/RECORD +503 -0
  277. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
  278. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
  279. snappy/__pycache__/__init__.cpython-312.pyc +0 -0
  280. snappy/__pycache__/browser.cpython-312.pyc +0 -0
  281. snappy/__pycache__/cache.cpython-312.pyc +0 -0
  282. snappy/__pycache__/database.cpython-312.pyc +0 -0
  283. snappy/__pycache__/db_utilities.cpython-312.pyc +0 -0
  284. snappy/__pycache__/decorated_isosig.cpython-312.pyc +0 -0
  285. snappy/__pycache__/exceptions.cpython-312.pyc +0 -0
  286. snappy/__pycache__/export_stl.cpython-312.pyc +0 -0
  287. snappy/__pycache__/filedialog.cpython-312.pyc +0 -0
  288. snappy/__pycache__/gui.cpython-312.pyc +0 -0
  289. snappy/__pycache__/horoviewer.cpython-312.pyc +0 -0
  290. snappy/__pycache__/infowindow.cpython-312.pyc +0 -0
  291. snappy/__pycache__/math_basics.cpython-312.pyc +0 -0
  292. snappy/__pycache__/matrix.cpython-312.pyc +0 -0
  293. snappy/__pycache__/number.cpython-312.pyc +0 -0
  294. snappy/__pycache__/numeric_output_checker.cpython-312.pyc +0 -0
  295. snappy/__pycache__/pari.cpython-312.pyc +0 -0
  296. snappy/__pycache__/polyviewer.cpython-312.pyc +0 -0
  297. snappy/__pycache__/sage_helper.cpython-312.pyc +0 -0
  298. snappy/__pycache__/version.cpython-312.pyc +0 -0
  299. snappy/doc/_sources/verify_canon.rst.txt +0 -90
  300. snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
  301. snappy/doc/_static/js/html5shiv.min.js +0 -4
  302. snappy/doc/verify_canon.html +0 -304
  303. snappy/drilling/__pycache__/__init__.cpython-312.pyc +0 -0
  304. snappy/drilling/__pycache__/constants.cpython-312.pyc +0 -0
  305. snappy/drilling/__pycache__/crush.cpython-312.pyc +0 -0
  306. snappy/drilling/__pycache__/cusps.cpython-312.pyc +0 -0
  307. snappy/drilling/__pycache__/debug.cpython-312.pyc +0 -0
  308. snappy/drilling/__pycache__/epsilons.cpython-312.pyc +0 -0
  309. snappy/drilling/__pycache__/exceptions.cpython-312.pyc +0 -0
  310. snappy/drilling/__pycache__/fixed_points.cpython-312.pyc +0 -0
  311. snappy/drilling/__pycache__/geodesic_info.cpython-312.pyc +0 -0
  312. snappy/drilling/__pycache__/geodesic_tube.cpython-312.pyc +0 -0
  313. snappy/drilling/__pycache__/geometric_structure.cpython-312.pyc +0 -0
  314. snappy/drilling/__pycache__/line.cpython-312.pyc +0 -0
  315. snappy/drilling/__pycache__/moves.cpython-312.pyc +0 -0
  316. snappy/drilling/__pycache__/peripheral_curves.cpython-312.pyc +0 -0
  317. snappy/drilling/__pycache__/perturb.cpython-312.pyc +0 -0
  318. snappy/drilling/__pycache__/quotient_space.cpython-312.pyc +0 -0
  319. snappy/drilling/__pycache__/spatial_dict.cpython-312.pyc +0 -0
  320. snappy/drilling/__pycache__/subdivide.cpython-312.pyc +0 -0
  321. snappy/drilling/__pycache__/tracing.cpython-312.pyc +0 -0
  322. snappy/drilling/geodesic_tube.py +0 -441
  323. snappy/drilling/geometric_structure.py +0 -366
  324. snappy/drilling/line.py +0 -122
  325. snappy/drilling/quotient_space.py +0 -94
  326. snappy/drilling/spatial_dict.py +0 -128
  327. snappy/exterior_to_link/__pycache__/__init__.cpython-312.pyc +0 -0
  328. snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-312.pyc +0 -0
  329. snappy/exterior_to_link/__pycache__/exceptions.cpython-312.pyc +0 -0
  330. snappy/exterior_to_link/__pycache__/hyp_utils.cpython-312.pyc +0 -0
  331. snappy/exterior_to_link/__pycache__/link_projection.cpython-312.pyc +0 -0
  332. snappy/exterior_to_link/__pycache__/main.cpython-312.pyc +0 -0
  333. snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-312.pyc +0 -0
  334. snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-312.pyc +0 -0
  335. snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-312.pyc +0 -0
  336. snappy/exterior_to_link/__pycache__/pl_utils.cpython-312.pyc +0 -0
  337. snappy/exterior_to_link/__pycache__/put_in_S3.cpython-312.pyc +0 -0
  338. snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-312.pyc +0 -0
  339. snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-312.pyc +0 -0
  340. snappy/exterior_to_link/__pycache__/stored_moves.cpython-312.pyc +0 -0
  341. snappy/hyperboloid/__pycache__/__init__.cpython-312.pyc +0 -0
  342. snappy/manifolds/__pycache__/__init__.cpython-312.pyc +0 -0
  343. snappy/ptolemy/__pycache__/__init__.cpython-312.pyc +0 -0
  344. snappy/ptolemy/__pycache__/component.cpython-312.pyc +0 -0
  345. snappy/ptolemy/__pycache__/coordinates.cpython-312.pyc +0 -0
  346. snappy/ptolemy/__pycache__/fieldExtensions.cpython-312.pyc +0 -0
  347. snappy/ptolemy/__pycache__/findLoops.cpython-312.pyc +0 -0
  348. snappy/ptolemy/__pycache__/homology.cpython-312.pyc +0 -0
  349. snappy/ptolemy/__pycache__/manifoldMethods.cpython-312.pyc +0 -0
  350. snappy/ptolemy/__pycache__/matrix.cpython-312.pyc +0 -0
  351. snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-312.pyc +0 -0
  352. snappy/ptolemy/__pycache__/polynomial.cpython-312.pyc +0 -0
  353. snappy/ptolemy/__pycache__/processComponents.cpython-312.pyc +0 -0
  354. snappy/ptolemy/__pycache__/processFileBase.cpython-312.pyc +0 -0
  355. snappy/ptolemy/__pycache__/processFileDispatch.cpython-312.pyc +0 -0
  356. snappy/ptolemy/__pycache__/processMagmaFile.cpython-312.pyc +0 -0
  357. snappy/ptolemy/__pycache__/processRurFile.cpython-312.pyc +0 -0
  358. snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-312.pyc +0 -0
  359. snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-312.pyc +0 -0
  360. snappy/ptolemy/__pycache__/ptolemyVariety.cpython-312.pyc +0 -0
  361. snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
  362. snappy/ptolemy/__pycache__/rur.cpython-312.pyc +0 -0
  363. snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-312.pyc +0 -0
  364. snappy/ptolemy/__pycache__/utilities.cpython-312.pyc +0 -0
  365. snappy/raytracing/__pycache__/__init__.cpython-312.pyc +0 -0
  366. snappy/raytracing/__pycache__/finite_raytracing_data.cpython-312.pyc +0 -0
  367. snappy/raytracing/__pycache__/gui_utilities.cpython-312.pyc +0 -0
  368. snappy/raytracing/__pycache__/hyperboloid_navigation.cpython-312.pyc +0 -0
  369. snappy/raytracing/__pycache__/hyperboloid_utilities.cpython-312.pyc +0 -0
  370. snappy/raytracing/__pycache__/ideal_raytracing_data.cpython-312.pyc +0 -0
  371. snappy/raytracing/__pycache__/inside_viewer.cpython-312.pyc +0 -0
  372. snappy/raytracing/__pycache__/raytracing_data.cpython-312.pyc +0 -0
  373. snappy/raytracing/__pycache__/raytracing_view.cpython-312.pyc +0 -0
  374. snappy/raytracing/__pycache__/upper_halfspace_utilities.cpython-312.pyc +0 -0
  375. snappy/raytracing/__pycache__/view_scale_controller.cpython-312.pyc +0 -0
  376. snappy/raytracing/zoom_slider/__pycache__/__init__.cpython-312.pyc +0 -0
  377. snappy/snap/__pycache__/__init__.cpython-312.pyc +0 -0
  378. snappy/snap/__pycache__/character_varieties.cpython-312.pyc +0 -0
  379. snappy/snap/__pycache__/fundamental_polyhedron.cpython-312.pyc +0 -0
  380. snappy/snap/__pycache__/interval_reps.cpython-312.pyc +0 -0
  381. snappy/snap/__pycache__/kernel_structures.cpython-312.pyc +0 -0
  382. snappy/snap/__pycache__/mcomplex_base.cpython-312.pyc +0 -0
  383. snappy/snap/__pycache__/nsagetools.cpython-312.pyc +0 -0
  384. snappy/snap/__pycache__/polished_reps.cpython-312.pyc +0 -0
  385. snappy/snap/__pycache__/shapes.cpython-312.pyc +0 -0
  386. snappy/snap/__pycache__/slice_obs_HKL.cpython-312.pyc +0 -0
  387. snappy/snap/__pycache__/utilities.cpython-312.pyc +0 -0
  388. snappy/snap/peripheral/__pycache__/__init__.cpython-312.pyc +0 -0
  389. snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-312.pyc +0 -0
  390. snappy/snap/peripheral/__pycache__/link.cpython-312.pyc +0 -0
  391. snappy/snap/peripheral/__pycache__/peripheral.cpython-312.pyc +0 -0
  392. snappy/snap/peripheral/__pycache__/surface.cpython-312.pyc +0 -0
  393. snappy/snap/t3mlite/__pycache__/__init__.cpython-312.pyc +0 -0
  394. snappy/snap/t3mlite/__pycache__/arrow.cpython-312.pyc +0 -0
  395. snappy/snap/t3mlite/__pycache__/corner.cpython-312.pyc +0 -0
  396. snappy/snap/t3mlite/__pycache__/edge.cpython-312.pyc +0 -0
  397. snappy/snap/t3mlite/__pycache__/face.cpython-312.pyc +0 -0
  398. snappy/snap/t3mlite/__pycache__/files.cpython-312.pyc +0 -0
  399. snappy/snap/t3mlite/__pycache__/homology.cpython-312.pyc +0 -0
  400. snappy/snap/t3mlite/__pycache__/linalg.cpython-312.pyc +0 -0
  401. snappy/snap/t3mlite/__pycache__/mcomplex.cpython-312.pyc +0 -0
  402. snappy/snap/t3mlite/__pycache__/perm4.cpython-312.pyc +0 -0
  403. snappy/snap/t3mlite/__pycache__/simplex.cpython-312.pyc +0 -0
  404. snappy/snap/t3mlite/__pycache__/spun.cpython-312.pyc +0 -0
  405. snappy/snap/t3mlite/__pycache__/surface.cpython-312.pyc +0 -0
  406. snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-312.pyc +0 -0
  407. snappy/snap/t3mlite/__pycache__/vertex.cpython-312.pyc +0 -0
  408. snappy/togl/__init__.py +0 -3
  409. snappy/togl/darwin-tk8.6/Togl2.1/LICENSE +0 -28
  410. snappy/togl/darwin-tk8.6/Togl2.1/libTogl2.1.dylib +0 -0
  411. snappy/togl/darwin-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  412. snappy/togl/darwin-tk8.7/Togl2.1/LICENSE +0 -28
  413. snappy/togl/darwin-tk8.7/Togl2.1/libTogl2.1.dylib +0 -0
  414. snappy/togl/darwin-tk8.7/Togl2.1/pkgIndex.tcl +0 -5
  415. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  416. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/libTogl2.1.so +0 -0
  417. snappy/togl/linux2-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -5
  418. snappy/togl/win32VC-tk8.6/Togl2.1/LICENSE +0 -28
  419. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.dll +0 -0
  420. snappy/togl/win32VC-tk8.6/Togl2.1/Togl21.lib +0 -0
  421. snappy/togl/win32VC-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  422. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/LICENSE +0 -28
  423. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.dll +0 -0
  424. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/Togl21.lib +0 -0
  425. snappy/togl/win32VC-x86_64-tk8.6/Togl2.1/pkgIndex.tcl +0 -6
  426. snappy/twister/__pycache__/__init__.cpython-312.pyc +0 -0
  427. snappy/twister/__pycache__/main.cpython-312.pyc +0 -0
  428. snappy/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
  429. snappy/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
  430. snappy/verify/__pycache__/__init__.cpython-312.pyc +0 -0
  431. snappy/verify/__pycache__/cuspCrossSection.cpython-312.pyc +0 -0
  432. snappy/verify/__pycache__/cuspTranslations.cpython-312.pyc +0 -0
  433. snappy/verify/__pycache__/cusp_areas.cpython-312.pyc +0 -0
  434. snappy/verify/__pycache__/cusp_shapes.cpython-312.pyc +0 -0
  435. snappy/verify/__pycache__/exceptions.cpython-312.pyc +0 -0
  436. snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-312.pyc +0 -0
  437. snappy/verify/__pycache__/interval_tree.cpython-312.pyc +0 -0
  438. snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-312.pyc +0 -0
  439. snappy/verify/__pycache__/realAlgebra.cpython-312.pyc +0 -0
  440. snappy/verify/__pycache__/shapes.cpython-312.pyc +0 -0
  441. snappy/verify/__pycache__/short_slopes.cpython-312.pyc +0 -0
  442. snappy/verify/__pycache__/squareExtensions.cpython-312.pyc +0 -0
  443. snappy/verify/__pycache__/verifyCanonical.cpython-312.pyc +0 -0
  444. snappy/verify/__pycache__/verifyHyperbolicity.cpython-312.pyc +0 -0
  445. snappy/verify/__pycache__/volume.cpython-312.pyc +0 -0
  446. snappy/verify/complex_volume/__pycache__/__init__.cpython-312.pyc +0 -0
  447. snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-312.pyc +0 -0
  448. snappy/verify/complex_volume/__pycache__/closed.cpython-312.pyc +0 -0
  449. snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-312.pyc +0 -0
  450. snappy/verify/complex_volume/__pycache__/cusped.cpython-312.pyc +0 -0
  451. snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-312.pyc +0 -0
  452. snappy/verify/cuspCrossSection.py +0 -1422
  453. snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-312.pyc +0 -0
  454. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-312.pyc +0 -0
  455. snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-312.pyc +0 -0
  456. snappy/verify/upper_halfspace/__pycache__/__init__.cpython-312.pyc +0 -0
  457. snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-312.pyc +0 -0
  458. snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-312.pyc +0 -0
  459. snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-312.pyc +0 -0
  460. snappy-3.1.1.dist-info/RECORD +0 -585
  461. {snappy-3.1.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * Base JavaScript utilities for all Sphinx HTML documentation.
6
6
  *
7
- * :copyright: Copyright 2007-2023 by the Sphinx team, see AUTHORS.
7
+ * :copyright: Copyright 2007-2024 by the Sphinx team, see AUTHORS.
8
8
  * :license: BSD, see LICENSE for details.
9
9
  *
10
10
  */
@@ -1,5 +1,5 @@
1
1
  const DOCUMENTATION_OPTIONS = {
2
- VERSION: '3.1.1',
2
+ VERSION: '3.2',
3
3
  LANGUAGE: 'en',
4
4
  COLLAPSE_INDEX: false,
5
5
  BUILDER: 'html',
@@ -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-2023 by the Sphinx team, see AUTHORS.
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, is available */
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-2023 by the Sphinx team, see AUTHORS.
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
- `Search finished, found ${resultCount} page(s) matching the search query.`
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
- htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
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 !== undefined) return docContent.textContent;
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]'. Could you check your theme or template."
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
- // array of [docname, title, anchor, descr, score, filename]
288
- let results = [];
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
- let score = Math.round(100 * queryLower.length / title.length)
296
- results.push([
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
- let score = Math.round(100 * queryLower.length / entry.length)
313
- results.push([
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
- results.push(...Search.performObjectSearch(term, objectTerms))
369
+ normalResults.push(...Search.performObjectSearch(term, objectTerms))
328
370
  );
329
371
 
330
372
  // lookup as search terms in fulltext
331
- results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
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) results.forEach((item) => (item[4] = Scorer.score(item)));
335
-
336
- // now sort the results by score (in opposite order of appearance, since the
337
- // display function below uses pop() to retrieve items) and then
338
- // alphabetically
339
- results.sort((a, b) => {
340
- const leftScore = a[4];
341
- const rightScore = b[4];
342
- if (leftScore === rightScore) {
343
- // same score: sort alphabetically
344
- const leftTitle = a[1].toLowerCase();
345
- const rightTitle = b[1].toLowerCase();
346
- if (leftTitle === rightTitle) return 0;
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
- results = results.reverse();
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
- Object.keys(terms).forEach((term) => {
470
- if (term.match(escapedWord) && !terms[word])
471
- arr.push({ files: terms[term], score: Scorer.partialTerm });
472
- });
473
- Object.keys(titleTerms).forEach((term) => {
474
- if (term.match(escapedWord) && !titleTerms[word])
475
- arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
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) && fileMap.get(file).indexOf(word) === -1)
500
- fileMap.get(file).push(word);
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();