snappy 3.1__cp39-cp39-win_amd64.whl → 3.2__cp39-cp39-win_amd64.whl
Sign up to get free protection for your applications and to get access to all the features.
- snappy/CyOpenGL.cp39-win_amd64.pyd +0 -0
- snappy/SnapPy.cp39-win_amd64.pyd +0 -0
- snappy/SnapPyHP.cp39-win_amd64.pyd +0 -0
- snappy/__init__.py +299 -402
- snappy/app.py +70 -20
- snappy/browser.py +18 -17
- snappy/canonical.py +249 -0
- snappy/{verify/cusp_shapes.py → cusps/__init__.py} +8 -18
- snappy/cusps/cusp_area_matrix.py +101 -0
- snappy/{verify/cusp_areas.py → cusps/cusp_areas_from_matrix.py} +23 -39
- snappy/cusps/maximal_cusp_area_matrix.py +136 -0
- snappy/cusps/test.py +21 -0
- snappy/cusps/trig_cusp_area_matrix.py +63 -0
- snappy/database.py +10 -9
- snappy/decorated_isosig.py +337 -114
- snappy/dev/extended_ptolemy/complexVolumesClosed.py +40 -7
- snappy/dev/extended_ptolemy/extended.py +3 -3
- snappy/dev/extended_ptolemy/phc_wrapper.py +10 -10
- snappy/dev/vericlosed/oneVertexTruncatedComplex.py +1 -1
- snappy/doc/_images/m004_paper_plane_on_systole.jpg +0 -0
- snappy/doc/_images/m125_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane.jpg +0 -0
- snappy/doc/_images/o9_00000_systole_paper_plane_closer.jpg +0 -0
- snappy/doc/_sources/additional_classes.rst.txt +40 -40
- snappy/doc/_sources/bugs.rst.txt +14 -14
- snappy/doc/_sources/censuses.rst.txt +51 -51
- snappy/doc/_sources/credits.rst.txt +75 -70
- snappy/doc/_sources/development.rst.txt +259 -239
- snappy/doc/_sources/index.rst.txt +182 -115
- snappy/doc/_sources/installing.rst.txt +247 -264
- snappy/doc/_sources/manifold.rst.txt +6 -6
- snappy/doc/_sources/manifoldhp.rst.txt +46 -46
- snappy/doc/_sources/news.rst.txt +355 -283
- snappy/doc/_sources/other.rst.txt +25 -25
- snappy/doc/_sources/platonic_census.rst.txt +20 -20
- snappy/doc/_sources/plink.rst.txt +102 -102
- snappy/doc/_sources/ptolemy.rst.txt +66 -66
- snappy/doc/_sources/ptolemy_classes.rst.txt +42 -42
- snappy/doc/_sources/ptolemy_examples1.rst.txt +298 -297
- snappy/doc/_sources/ptolemy_examples2.rst.txt +363 -363
- snappy/doc/_sources/ptolemy_examples3.rst.txt +301 -301
- snappy/doc/_sources/ptolemy_examples4.rst.txt +61 -61
- snappy/doc/_sources/ptolemy_prelim.rst.txt +105 -105
- snappy/doc/_sources/screenshots.rst.txt +21 -21
- snappy/doc/_sources/snap.rst.txt +87 -87
- snappy/doc/_sources/snappy.rst.txt +28 -28
- snappy/doc/_sources/spherogram.rst.txt +103 -103
- snappy/doc/_sources/todo.rst.txt +47 -47
- snappy/doc/_sources/triangulation.rst.txt +11 -11
- snappy/doc/_sources/tutorial.rst.txt +49 -49
- snappy/doc/_sources/verify.rst.txt +210 -150
- snappy/doc/_sources/verify_internals.rst.txt +79 -90
- snappy/doc/_static/basic.css +924 -902
- snappy/doc/_static/css/badge_only.css +1 -1
- snappy/doc/_static/css/theme.css +1 -1
- snappy/doc/_static/doctools.js +1 -1
- snappy/doc/_static/documentation_options.js +12 -13
- snappy/doc/_static/fonts/Lato/lato-bold.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bold.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-bolditalic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-italic.woff2 +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.eot +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.ttf +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff +0 -0
- snappy/doc/_static/fonts/Lato/lato-regular.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-bold.woff2 +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.eot +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.ttf +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff +0 -0
- snappy/doc/_static/fonts/RobotoSlab/roboto-slab-v7-regular.woff2 +0 -0
- snappy/doc/_static/js/versions.js +228 -0
- snappy/doc/_static/language_data.js +199 -199
- snappy/doc/_static/pygments.css +74 -73
- snappy/doc/_static/searchtools.js +125 -71
- snappy/doc/_static/snappy_furo.css +33 -33
- snappy/doc/_static/snappy_sphinx_rtd_theme.css +42 -42
- snappy/doc/_static/sphinx_highlight.js +13 -3
- snappy/doc/additional_classes.html +1499 -1330
- snappy/doc/bugs.html +131 -134
- snappy/doc/censuses.html +426 -445
- snappy/doc/credits.html +180 -180
- snappy/doc/development.html +383 -363
- snappy/doc/genindex.html +1330 -1409
- snappy/doc/index.html +261 -206
- snappy/doc/installing.html +345 -363
- snappy/doc/manifold.html +3451 -2839
- snappy/doc/manifoldhp.html +179 -182
- snappy/doc/news.html +387 -329
- snappy/doc/objects.inv +0 -0
- snappy/doc/other.html +160 -162
- snappy/doc/platonic_census.html +374 -377
- snappy/doc/plink.html +209 -212
- snappy/doc/ptolemy.html +253 -255
- snappy/doc/ptolemy_classes.html +1143 -1146
- snappy/doc/ptolemy_examples1.html +408 -410
- snappy/doc/ptolemy_examples2.html +470 -473
- snappy/doc/ptolemy_examples3.html +413 -416
- snappy/doc/ptolemy_examples4.html +194 -197
- snappy/doc/ptolemy_prelim.html +247 -250
- snappy/doc/py-modindex.html +164 -167
- snappy/doc/screenshots.html +140 -142
- snappy/doc/search.html +134 -137
- snappy/doc/searchindex.js +1 -1
- snappy/doc/snap.html +201 -204
- snappy/doc/snappy.html +180 -182
- snappy/doc/spherogram.html +1210 -1213
- snappy/doc/todo.html +165 -168
- snappy/doc/triangulation.html +1583 -1474
- snappy/doc/tutorial.html +158 -161
- snappy/doc/verify.html +329 -275
- snappy/doc/verify_internals.html +1234 -1691
- snappy/drilling/__init__.py +153 -235
- snappy/drilling/barycentric.py +103 -0
- snappy/drilling/constants.py +0 -2
- snappy/drilling/crush.py +56 -130
- snappy/drilling/cusps.py +12 -6
- snappy/drilling/debug.py +2 -1
- snappy/drilling/exceptions.py +7 -40
- snappy/drilling/moves.py +302 -243
- snappy/drilling/perturb.py +63 -37
- snappy/drilling/shorten.py +36 -0
- snappy/drilling/subdivide.py +0 -5
- snappy/drilling/test.py +23 -0
- snappy/drilling/test_cases.py +126 -0
- snappy/drilling/tracing.py +9 -37
- snappy/exceptions.py +18 -5
- snappy/exterior_to_link/barycentric_geometry.py +2 -4
- snappy/exterior_to_link/main.py +8 -7
- snappy/exterior_to_link/mcomplex_with_link.py +2 -2
- snappy/exterior_to_link/rational_linear_algebra.py +1 -1
- snappy/exterior_to_link/rational_linear_algebra_wrapped.py +1 -1
- snappy/exterior_to_link/test.py +21 -33
- snappy/geometric_structure/__init__.py +212 -0
- snappy/geometric_structure/cusp_neighborhood/__init__.py +3 -0
- snappy/geometric_structure/cusp_neighborhood/complex_cusp_cross_section.py +697 -0
- snappy/geometric_structure/cusp_neighborhood/cusp_cross_section_base.py +484 -0
- snappy/geometric_structure/cusp_neighborhood/exceptions.py +42 -0
- snappy/geometric_structure/cusp_neighborhood/real_cusp_cross_section.py +298 -0
- snappy/geometric_structure/cusp_neighborhood/tiles_for_cusp_neighborhood.py +159 -0
- snappy/geometric_structure/cusp_neighborhood/vertices.py +32 -0
- snappy/geometric_structure/geodesic/__init__.py +0 -0
- snappy/geometric_structure/geodesic/add_core_curves.py +152 -0
- snappy/geometric_structure/geodesic/avoid_core_curves.py +369 -0
- snappy/geometric_structure/geodesic/canonical_keys.py +52 -0
- snappy/geometric_structure/geodesic/check_away_from_core_curve.py +60 -0
- snappy/geometric_structure/geodesic/constants.py +6 -0
- snappy/geometric_structure/geodesic/exceptions.py +22 -0
- snappy/{drilling → geometric_structure/geodesic}/fixed_points.py +34 -9
- snappy/{drilling/geodesic_info.py → geometric_structure/geodesic/geodesic_start_point_info.py} +139 -180
- snappy/geometric_structure/geodesic/graph_trace_helper.py +67 -0
- snappy/geometric_structure/geodesic/line.py +30 -0
- snappy/geometric_structure/geodesic/multiplicity.py +127 -0
- snappy/geometric_structure/geodesic/tiles_for_geodesic.py +101 -0
- snappy/geometric_structure/test.py +22 -0
- snappy/gui.py +23 -13
- snappy/horoviewer.py +7 -7
- snappy/hyperboloid/__init__.py +96 -31
- snappy/hyperboloid/distances.py +245 -0
- snappy/hyperboloid/horoball.py +19 -0
- snappy/hyperboloid/line.py +35 -0
- snappy/hyperboloid/point.py +9 -0
- snappy/hyperboloid/triangle.py +29 -0
- snappy/isometry_signature.py +382 -0
- snappy/len_spec/__init__.py +596 -0
- snappy/len_spec/geodesic_info.py +110 -0
- snappy/len_spec/geodesic_key_info_dict.py +117 -0
- snappy/len_spec/geodesic_piece.py +143 -0
- snappy/len_spec/geometric_structure.py +182 -0
- snappy/len_spec/geometry.py +80 -0
- snappy/len_spec/length_spectrum_geodesic_info.py +170 -0
- snappy/len_spec/spine.py +206 -0
- snappy/len_spec/test.py +24 -0
- snappy/len_spec/test_cases.py +69 -0
- snappy/len_spec/tile.py +275 -0
- snappy/len_spec/word.py +86 -0
- snappy/math_basics.py +39 -13
- snappy/matrix.py +52 -9
- snappy/number.py +12 -6
- snappy/numeric_output_checker.py +2 -3
- snappy/pari.py +8 -4
- snappy/phone_home.py +2 -1
- snappy/polyviewer.py +8 -8
- snappy/ptolemy/__init__.py +1 -1
- snappy/ptolemy/component.py +2 -2
- snappy/ptolemy/coordinates.py +25 -25
- snappy/ptolemy/findLoops.py +9 -9
- snappy/ptolemy/manifoldMethods.py +27 -29
- snappy/ptolemy/polynomial.py +50 -57
- snappy/ptolemy/processFileBase.py +60 -0
- snappy/ptolemy/ptolemyVariety.py +109 -41
- snappy/ptolemy/reginaWrapper.py +4 -4
- snappy/ptolemy/rur.py +1 -1
- snappy/ptolemy/solutionsToPrimeIdealGroebnerBasis.py +9 -9
- snappy/ptolemy/test.py +99 -54
- snappy/ptolemy/utilities.py +1 -1
- snappy/raytracing/__init__.py +64 -0
- snappy/raytracing/additional_horospheres.py +64 -0
- snappy/raytracing/additional_len_spec_choices.py +63 -0
- snappy/raytracing/cohomology_fractal.py +0 -3
- snappy/raytracing/eyeball.py +123 -0
- snappy/raytracing/finite_raytracing_data.py +17 -17
- snappy/raytracing/finite_viewer.py +15 -15
- snappy/raytracing/geodesic_tube_info.py +93 -63
- snappy/raytracing/geodesics.py +94 -64
- snappy/raytracing/geodesics_window.py +56 -34
- snappy/raytracing/gui_utilities.py +21 -6
- snappy/raytracing/hyperboloid_navigation.py +29 -4
- snappy/raytracing/hyperboloid_utilities.py +73 -73
- snappy/raytracing/ideal_raytracing_data.py +121 -91
- snappy/raytracing/inside_viewer.py +199 -66
- snappy/raytracing/pack.py +22 -0
- snappy/raytracing/raytracing_data.py +37 -25
- snappy/raytracing/raytracing_view.py +70 -65
- snappy/raytracing/shaders/Eye.png +0 -0
- snappy/raytracing/shaders/NonGeometric.png +0 -0
- snappy/raytracing/shaders/__init__.py +39 -3
- snappy/raytracing/shaders/fragment.glsl +451 -133
- snappy/raytracing/test.py +29 -0
- snappy/raytracing/tooltip.py +146 -0
- snappy/raytracing/upper_halfspace_utilities.py +42 -9
- snappy/sage_helper.py +67 -134
- snappy/settings.py +90 -77
- snappy/shell.py +2 -0
- snappy/snap/character_varieties.py +2 -2
- snappy/snap/find_field.py +4 -3
- snappy/snap/fundamental_polyhedron.py +2 -2
- snappy/snap/kernel_structures.py +5 -1
- snappy/snap/nsagetools.py +9 -8
- snappy/snap/peripheral/dual_cellulation.py +4 -3
- snappy/snap/peripheral/peripheral.py +2 -2
- snappy/snap/peripheral/surface.py +5 -5
- snappy/snap/peripheral/test.py +1 -1
- snappy/snap/polished_reps.py +8 -8
- snappy/snap/slice_obs_HKL.py +16 -14
- snappy/snap/t3mlite/arrow.py +3 -3
- snappy/snap/t3mlite/edge.py +3 -3
- snappy/snap/t3mlite/homology.py +2 -2
- snappy/snap/t3mlite/mcomplex.py +3 -3
- snappy/snap/t3mlite/simplex.py +12 -0
- snappy/snap/t3mlite/spun.py +18 -17
- snappy/snap/t3mlite/test_vs_regina.py +4 -4
- snappy/snap/test.py +37 -53
- snappy/snap/utilities.py +4 -5
- snappy/test.py +121 -138
- snappy/test_cases.py +263 -0
- snappy/testing.py +131 -0
- snappy/tiling/__init__.py +2 -0
- snappy/tiling/canonical_key_dict.py +59 -0
- snappy/tiling/dict_based_set.py +79 -0
- snappy/tiling/floor.py +49 -0
- snappy/tiling/hyperboloid_dict.py +54 -0
- snappy/tiling/iter_utils.py +78 -0
- snappy/tiling/lifted_tetrahedron.py +22 -0
- snappy/tiling/lifted_tetrahedron_set.py +54 -0
- snappy/tiling/real_hash_dict.py +164 -0
- snappy/tiling/test.py +23 -0
- snappy/tiling/tile.py +215 -0
- snappy/tiling/triangle.py +33 -0
- snappy/tkterminal.py +116 -86
- snappy/twister/main.py +1 -7
- snappy/twister/twister_core.cp39-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.dist-info → snappy-3.2.dist-info}/METADATA +26 -11
- snappy-3.2.dist-info/RECORD +503 -0
- {snappy-3.1.dist-info → snappy-3.2.dist-info}/WHEEL +1 -1
- {snappy-3.1.dist-info → snappy-3.2.dist-info}/top_level.txt +6 -1
- snappy/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/__pycache__/browser.cpython-39.pyc +0 -0
- snappy/__pycache__/cache.cpython-39.pyc +0 -0
- snappy/__pycache__/database.cpython-39.pyc +0 -0
- snappy/__pycache__/db_utilities.cpython-39.pyc +0 -0
- snappy/__pycache__/decorated_isosig.cpython-39.pyc +0 -0
- snappy/__pycache__/exceptions.cpython-39.pyc +0 -0
- snappy/__pycache__/export_stl.cpython-39.pyc +0 -0
- snappy/__pycache__/filedialog.cpython-39.pyc +0 -0
- snappy/__pycache__/gui.cpython-39.pyc +0 -0
- snappy/__pycache__/horoviewer.cpython-39.pyc +0 -0
- snappy/__pycache__/math_basics.cpython-39.pyc +0 -0
- snappy/__pycache__/matrix.cpython-39.pyc +0 -0
- snappy/__pycache__/number.cpython-39.pyc +0 -0
- snappy/__pycache__/numeric_output_checker.cpython-39.pyc +0 -0
- snappy/__pycache__/pari.cpython-39.pyc +0 -0
- snappy/__pycache__/polyviewer.cpython-39.pyc +0 -0
- snappy/__pycache__/sage_helper.cpython-39.pyc +0 -0
- snappy/__pycache__/version.cpython-39.pyc +0 -0
- snappy/doc/_sources/verify_canon.rst.txt +0 -90
- snappy/doc/_static/jquery-3.6.0.js +0 -10881
- snappy/doc/_static/js/html5shiv-printshiv.min.js +0 -4
- snappy/doc/_static/js/html5shiv.min.js +0 -4
- snappy/doc/_static/underscore-1.13.1.js +0 -2042
- snappy/doc/_static/underscore.js +0 -6
- snappy/doc/verify_canon.html +0 -304
- snappy/drilling/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/constants.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/crush.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/cusps.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/debug.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/epsilons.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/exceptions.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/fixed_points.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_info.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/geodesic_tube.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/geometric_structure.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/line.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/moves.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/peripheral_curves.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/perturb.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/quotient_space.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/spatial_dict.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/subdivide.cpython-39.pyc +0 -0
- snappy/drilling/__pycache__/tracing.cpython-39.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-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/barycentric_geometry.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/exceptions.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/hyp_utils.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/link_projection.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/main.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_expansion.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_link.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/mcomplex_with_memory.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/pl_utils.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/put_in_S3.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/rational_linear_algebra.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/simplify_to_base_tri.cpython-39.pyc +0 -0
- snappy/exterior_to_link/__pycache__/stored_moves.cpython-39.pyc +0 -0
- snappy/hyperboloid/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/manifolds/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/component.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/coordinates.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/fieldExtensions.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/findLoops.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/homology.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/manifoldMethods.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/matrix.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/numericalSolutionsToGroebnerBasis.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/polynomial.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/processComponents.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileBase.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/processFileDispatch.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/processMagmaFile.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/processRurFile.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyGeneralizedObstructionClass.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyObstructionClass.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVariety.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/ptolemyVarietyPrimeIdealGroebnerBasis.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/rur.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/solutionsToPrimeIdealGroebnerBasis.cpython-39.pyc +0 -0
- snappy/ptolemy/__pycache__/utilities.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/character_varieties.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/fundamental_polyhedron.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/interval_reps.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/kernel_structures.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/mcomplex_base.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/nsagetools.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/polished_reps.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/shapes.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/slice_obs_HKL.cpython-39.pyc +0 -0
- snappy/snap/__pycache__/utilities.cpython-39.pyc +0 -0
- snappy/snap/peripheral/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/snap/peripheral/__pycache__/dual_cellulation.cpython-39.pyc +0 -0
- snappy/snap/peripheral/__pycache__/link.cpython-39.pyc +0 -0
- snappy/snap/peripheral/__pycache__/peripheral.cpython-39.pyc +0 -0
- snappy/snap/peripheral/__pycache__/surface.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/arrow.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/corner.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/edge.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/face.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/files.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/homology.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/linalg.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/mcomplex.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/perm4.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/simplex.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/spun.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/surface.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/tetrahedron.cpython-39.pyc +0 -0
- snappy/snap/t3mlite/__pycache__/vertex.cpython-39.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-39.pyc +0 -0
- snappy/twister/__pycache__/main.cpython-39.pyc +0 -0
- snappy/upper_halfspace/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/upper_halfspace/__pycache__/ideal_point.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/cuspCrossSection.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/cuspTranslations.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/cusp_areas.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/cusp_shapes.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/exceptions.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/interval_newton_shapes_engine.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/interval_tree.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/krawczyk_shapes_engine.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/realAlgebra.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/shapes.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/short_slopes.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/squareExtensions.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/verifyCanonical.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/verifyHyperbolicity.cpython-39.pyc +0 -0
- snappy/verify/__pycache__/volume.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/adjust_torsion.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/closed.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/compute_ptolemys.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/cusped.cpython-39.pyc +0 -0
- snappy/verify/complex_volume/__pycache__/extended_bloch.cpython-39.pyc +0 -0
- snappy/verify/cuspCrossSection.py +0 -1422
- snappy/verify/maximal_cusp_area_matrix/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_tiling_engine.cpython-39.pyc +0 -0
- snappy/verify/maximal_cusp_area_matrix/__pycache__/cusp_translate_engine.cpython-39.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/__init__.cpython-39.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/extended_matrix.cpython-39.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/finite_point.cpython-39.pyc +0 -0
- snappy/verify/upper_halfspace/__pycache__/ideal_point.cpython-39.pyc +0 -0
- snappy-3.1.dist-info/RECORD +0 -575
- {snappy-3.1.dist-info → snappy-3.2.dist-info}/entry_points.txt +0 -0
snappy/doc/spherogram.html
CHANGED
@@ -1,1214 +1,1211 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<link rel="stylesheet"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
<script src="_static/js/theme.js"></script>
|
22
|
-
<link rel="index" title="Index" href="genindex.html" />
|
23
|
-
<link rel="search" title="Search" href="search.html" />
|
24
|
-
<link rel="next" title="Number theory of hyperbolic 3-manifolds" href="snap.html" />
|
25
|
-
<link rel="prev" title="Using SnapPy’s link editor" href="plink.html" />
|
26
|
-
</head>
|
27
|
-
|
28
|
-
<body class="wy-body-for-nav">
|
29
|
-
<div class="wy-grid-for-nav">
|
30
|
-
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
31
|
-
<div class="wy-side-scroll">
|
32
|
-
<div class="wy-side-nav-search" >
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
<a href="index.html" class="icon icon-home">
|
37
|
-
SnapPy
|
38
|
-
<img src="_static/SnapPy-horizontal-128.png" class="logo" alt="Logo"/>
|
39
|
-
</a>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
</
|
50
|
-
|
51
|
-
|
52
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
53
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
54
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
55
|
-
<li class="toctree-
|
56
|
-
<li class="toctree-
|
57
|
-
<li class="toctree-
|
58
|
-
|
59
|
-
|
60
|
-
<li class="toctree-
|
61
|
-
</ul>
|
62
|
-
</li>
|
63
|
-
<li class="toctree-
|
64
|
-
<li class="toctree-
|
65
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
66
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
67
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
68
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
69
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
70
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
71
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
72
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
73
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
74
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
75
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
76
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
77
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
78
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
79
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
80
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
81
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
82
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
83
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
84
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
85
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
86
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
87
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
88
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
89
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
90
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
91
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
92
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
93
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
94
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
95
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
96
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
97
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
98
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
99
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
100
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
101
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
102
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
103
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
104
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
105
|
-
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
</
|
110
|
-
|
111
|
-
</
|
112
|
-
</
|
113
|
-
|
114
|
-
|
115
|
-
</
|
116
|
-
</li>
|
117
|
-
</
|
118
|
-
</li>
|
119
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
120
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
121
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
122
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
123
|
-
<li class="toctree-l1"><a class="reference internal" href="
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
</
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
<
|
154
|
-
|
155
|
-
<
|
156
|
-
<p>
|
157
|
-
|
158
|
-
<a class="
|
159
|
-
<
|
160
|
-
<
|
161
|
-
<span class="gp">>>> </span><span class="n">
|
162
|
-
<span class="gp">>>> </span><span class="n">
|
163
|
-
<span class="gp">>>> </span><span class="n">
|
164
|
-
<span class="
|
165
|
-
<span class="gp">>>> </span><span class="n">
|
166
|
-
<span class="
|
167
|
-
|
168
|
-
|
169
|
-
<
|
170
|
-
|
171
|
-
</
|
172
|
-
<
|
173
|
-
<
|
174
|
-
<span class="
|
175
|
-
|
176
|
-
|
177
|
-
<
|
178
|
-
|
179
|
-
|
180
|
-
<p>
|
181
|
-
|
182
|
-
|
183
|
-
<
|
184
|
-
|
185
|
-
|
186
|
-
<
|
187
|
-
|
188
|
-
|
189
|
-
<p>
|
190
|
-
|
191
|
-
|
192
|
-
<
|
193
|
-
<span class="gp">>>> </span><span class="n">
|
194
|
-
<span class="gp">>>> </span><span class="n">
|
195
|
-
<span class="
|
196
|
-
|
197
|
-
|
198
|
-
<
|
199
|
-
|
200
|
-
</
|
201
|
-
<
|
202
|
-
<
|
203
|
-
<span class="n">
|
204
|
-
<span class="
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
<
|
212
|
-
</
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
<
|
220
|
-
<
|
221
|
-
<
|
222
|
-
|
223
|
-
|
224
|
-
<
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
<
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
</
|
244
|
-
<p>
|
245
|
-
|
246
|
-
|
247
|
-
<p>
|
248
|
-
|
249
|
-
</
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
<code class="docutils literal notranslate"><span class="pre">
|
255
|
-
<
|
256
|
-
|
257
|
-
<code class="docutils literal notranslate"><span class="pre">
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
<code class="docutils literal notranslate"><span class="pre">
|
264
|
-
|
265
|
-
|
266
|
-
<
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
</
|
274
|
-
</
|
275
|
-
<
|
276
|
-
|
277
|
-
|
278
|
-
<span class="
|
279
|
-
</
|
280
|
-
</
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
</
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
<
|
290
|
-
<
|
291
|
-
<
|
292
|
-
<
|
293
|
-
<
|
294
|
-
|
295
|
-
|
296
|
-
<p>
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
<
|
301
|
-
|
302
|
-
</
|
303
|
-
<p>
|
304
|
-
<
|
305
|
-
<span class="gp">>>> </span><span class="n">
|
306
|
-
|
307
|
-
|
308
|
-
<
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
<
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
<
|
319
|
-
|
320
|
-
|
321
|
-
<
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
<
|
326
|
-
|
327
|
-
</
|
328
|
-
<
|
329
|
-
|
330
|
-
<
|
331
|
-
<span class="
|
332
|
-
<span class="
|
333
|
-
|
334
|
-
|
335
|
-
<
|
336
|
-
|
337
|
-
|
338
|
-
<
|
339
|
-
|
340
|
-
<
|
341
|
-
|
342
|
-
<
|
343
|
-
<
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
<
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
<dl
|
358
|
-
|
359
|
-
<
|
360
|
-
<
|
361
|
-
|
362
|
-
<
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
<
|
370
|
-
<span class="gp">>>> </span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">
|
371
|
-
<span class="go">[4, 4, 4, 6, 8]</span>
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
<
|
380
|
-
<
|
381
|
-
<span class="
|
382
|
-
<
|
383
|
-
<
|
384
|
-
<span class="
|
385
|
-
<span class="n">
|
386
|
-
|
387
|
-
<span class="
|
388
|
-
<span class="
|
389
|
-
|
390
|
-
<span class="
|
391
|
-
<span class="n">
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
<
|
400
|
-
|
401
|
-
|
402
|
-
<
|
403
|
-
|
404
|
-
|
405
|
-
<
|
406
|
-
<
|
407
|
-
|
408
|
-
<
|
409
|
-
<p>
|
410
|
-
|
411
|
-
<
|
412
|
-
<span class="
|
413
|
-
|
414
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span
|
415
|
-
<span class="
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
<
|
420
|
-
|
421
|
-
|
422
|
-
<p>
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
<dl
|
433
|
-
|
434
|
-
<
|
435
|
-
<
|
436
|
-
|
437
|
-
<
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
<
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
<
|
453
|
-
|
454
|
-
|
455
|
-
<
|
456
|
-
|
457
|
-
|
458
|
-
<
|
459
|
-
<span class="gp">>>> </span><span class="n">K</span>
|
460
|
-
<span class="go"
|
461
|
-
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">backtrack</span><span class="p">(</span><span class="n">steps</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span> <span class="n">prob_type_1</span> <span class="o">=</span> <span class="mi">
|
462
|
-
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">K</span><span class="o">.</span><span class="n">crossings</span><span class="p">)</span>
|
463
|
-
<span class="go">
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
<
|
472
|
-
<
|
473
|
-
|
474
|
-
|
475
|
-
<p>
|
476
|
-
|
477
|
-
|
478
|
-
<p>
|
479
|
-
|
480
|
-
|
481
|
-
<
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
<
|
490
|
-
|
491
|
-
|
492
|
-
<
|
493
|
-
|
494
|
-
|
495
|
-
<
|
496
|
-
<span class="
|
497
|
-
|
498
|
-
|
499
|
-
<
|
500
|
-
|
501
|
-
|
502
|
-
<p>
|
503
|
-
|
504
|
-
<
|
505
|
-
|
506
|
-
|
507
|
-
<
|
508
|
-
|
509
|
-
</
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
<
|
515
|
-
<
|
516
|
-
<span class="
|
517
|
-
<
|
518
|
-
<
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
<
|
527
|
-
<
|
528
|
-
<span class="
|
529
|
-
<
|
530
|
-
<
|
531
|
-
<span class="
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
<dl
|
540
|
-
|
541
|
-
<
|
542
|
-
<
|
543
|
-
|
544
|
-
<dl
|
545
|
-
|
546
|
-
<
|
547
|
-
<
|
548
|
-
|
549
|
-
<
|
550
|
-
|
551
|
-
|
552
|
-
<
|
553
|
-
|
554
|
-
|
555
|
-
<
|
556
|
-
<span class="gp">>>> </span><span class="n">
|
557
|
-
<span class="
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
<
|
566
|
-
<
|
567
|
-
|
568
|
-
|
569
|
-
<p>
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
<
|
580
|
-
|
581
|
-
|
582
|
-
<
|
583
|
-
|
584
|
-
|
585
|
-
<
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
<
|
594
|
-
<
|
595
|
-
<span class="
|
596
|
-
<
|
597
|
-
<
|
598
|
-
|
599
|
-
|
600
|
-
<
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
<
|
616
|
-
|
617
|
-
<
|
618
|
-
|
619
|
-
|
620
|
-
<
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
<
|
628
|
-
|
629
|
-
<
|
630
|
-
<
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
<
|
640
|
-
<
|
641
|
-
<span class="
|
642
|
-
<
|
643
|
-
<
|
644
|
-
|
645
|
-
|
646
|
-
<
|
647
|
-
|
648
|
-
</
|
649
|
-
<
|
650
|
-
class
|
651
|
-
<
|
652
|
-
<span class="
|
653
|
-
<span class="
|
654
|
-
<span class="
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
<
|
663
|
-
<
|
664
|
-
<
|
665
|
-
<
|
666
|
-
|
667
|
-
<
|
668
|
-
<span class="
|
669
|
-
|
670
|
-
|
671
|
-
<span class="
|
672
|
-
</
|
673
|
-
</
|
674
|
-
|
675
|
-
|
676
|
-
<
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
>>> S
|
681
|
-
|
682
|
-
|
683
|
-
>>>
|
684
|
-
2
|
685
|
-
|
686
|
-
>>> a, b =
|
687
|
-
>>>
|
688
|
-
|
689
|
-
>>>
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
<
|
697
|
-
<
|
698
|
-
<
|
699
|
-
<
|
700
|
-
|
701
|
-
|
702
|
-
<
|
703
|
-
|
704
|
-
|
705
|
-
<p>
|
706
|
-
<p>
|
707
|
-
|
708
|
-
<
|
709
|
-
<span class="n">
|
710
|
-
|
711
|
-
|
712
|
-
<
|
713
|
-
|
714
|
-
</
|
715
|
-
<p>
|
716
|
-
<
|
717
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">U5</span
|
718
|
-
<span class="
|
719
|
-
<span class="
|
720
|
-
<span class="
|
721
|
-
<span class="
|
722
|
-
<span class="
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
<
|
731
|
-
|
732
|
-
|
733
|
-
<
|
734
|
-
|
735
|
-
|
736
|
-
<
|
737
|
-
<span class="
|
738
|
-
<span class="go">
|
739
|
-
<span class="go"> '
|
740
|
-
<span class="go"> '
|
741
|
-
<span class="go"> '
|
742
|
-
<span class="go"> '
|
743
|
-
<span class="go"> '
|
744
|
-
|
745
|
-
|
746
|
-
<
|
747
|
-
|
748
|
-
</div>
|
749
|
-
|
750
|
-
<
|
751
|
-
|
752
|
-
</
|
753
|
-
<
|
754
|
-
|
755
|
-
<
|
756
|
-
<span class="gp">>>> </span><span class="n">ranks</span>
|
757
|
-
<span class="
|
758
|
-
|
759
|
-
|
760
|
-
<
|
761
|
-
|
762
|
-
|
763
|
-
<p>
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
<li><p>
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
recorded.
|
780
|
-
|
781
|
-
|
782
|
-
is
|
783
|
-
</
|
784
|
-
<p>
|
785
|
-
|
786
|
-
<
|
787
|
-
<span class="
|
788
|
-
<span class="
|
789
|
-
<span class="
|
790
|
-
</
|
791
|
-
</
|
792
|
-
<
|
793
|
-
|
794
|
-
|
795
|
-
|
796
|
-
|
797
|
-
|
798
|
-
|
799
|
-
|
800
|
-
<
|
801
|
-
<
|
802
|
-
<
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
|
808
|
-
|
809
|
-
|
810
|
-
|
811
|
-
|
812
|
-
|
813
|
-
<
|
814
|
-
<
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
<
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
<
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
<
|
837
|
-
|
838
|
-
<
|
839
|
-
<
|
840
|
-
|
841
|
-
<
|
842
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">D</span
|
843
|
-
<span class="
|
844
|
-
<span class="
|
845
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">
|
846
|
-
<span class="
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
<
|
855
|
-
<
|
856
|
-
<
|
857
|
-
|
858
|
-
<
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
<
|
866
|
-
<span class="
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
<
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
<
|
883
|
-
<span class="gp">... </span> <span class="p">(</span><span class="mi">
|
884
|
-
<span class="gp">... </span> <span class="p">(</span><span class="mi">
|
885
|
-
<span class="gp"
|
886
|
-
<span class="
|
887
|
-
<span class="gp"
|
888
|
-
<span class="
|
889
|
-
<span class="
|
890
|
-
<span class="
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
|
897
|
-
|
898
|
-
<
|
899
|
-
|
900
|
-
<
|
901
|
-
<
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
<dl
|
911
|
-
|
912
|
-
<
|
913
|
-
<
|
914
|
-
|
915
|
-
<
|
916
|
-
<
|
917
|
-
<span class="
|
918
|
-
<
|
919
|
-
<
|
920
|
-
<span class="
|
921
|
-
<span class="n">
|
922
|
-
<span class="
|
923
|
-
|
924
|
-
|
925
|
-
<
|
926
|
-
|
927
|
-
</
|
928
|
-
<p>
|
929
|
-
<
|
930
|
-
|
931
|
-
|
932
|
-
<
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
sage: a
|
939
|
-
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
<
|
951
|
-
<
|
952
|
-
<span class="
|
953
|
-
<
|
954
|
-
<
|
955
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">
|
956
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">alex</span> <span class="o"
|
957
|
-
<span class="
|
958
|
-
|
959
|
-
|
960
|
-
<
|
961
|
-
|
962
|
-
|
963
|
-
<p>
|
964
|
-
|
965
|
-
|
966
|
-
<
|
967
|
-
|
968
|
-
|
969
|
-
<
|
970
|
-
|
971
|
-
<
|
972
|
-
<
|
973
|
-
|
974
|
-
<
|
975
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">
|
976
|
-
<span class="
|
977
|
-
<span class="
|
978
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">
|
979
|
-
<span class="n">sage</span><span class="p">:</span> <span class="n">
|
980
|
-
<span class="mi">
|
981
|
-
|
982
|
-
|
983
|
-
<
|
984
|
-
|
985
|
-
|
986
|
-
<p>
|
987
|
-
|
988
|
-
|
989
|
-
<
|
990
|
-
<span class="
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
<
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
<
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
<
|
1020
|
-
</
|
1021
|
-
<
|
1022
|
-
<
|
1023
|
-
<span class="gp"
|
1024
|
-
<span class="
|
1025
|
-
<span class="
|
1026
|
-
<span class="
|
1027
|
-
<span class="
|
1028
|
-
<span class="
|
1029
|
-
|
1030
|
-
|
1031
|
-
<span class="
|
1032
|
-
</
|
1033
|
-
</
|
1034
|
-
<
|
1035
|
-
<span class="gp"
|
1036
|
-
<span class="
|
1037
|
-
<span class="
|
1038
|
-
<span class="
|
1039
|
-
<span class="
|
1040
|
-
<span class="
|
1041
|
-
|
1042
|
-
|
1043
|
-
<span class="
|
1044
|
-
</
|
1045
|
-
</
|
1046
|
-
<
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
<
|
1055
|
-
|
1056
|
-
<
|
1057
|
-
<
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
<
|
1067
|
-
|
1068
|
-
<
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
<
|
1076
|
-
<span class="
|
1077
|
-
<span class="
|
1078
|
-
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">sublink</span><span class="p">([</span><span class="
|
1079
|
-
<span class="go"><Link:
|
1080
|
-
|
1081
|
-
|
1082
|
-
<
|
1083
|
-
|
1084
|
-
</
|
1085
|
-
<p>
|
1086
|
-
<
|
1087
|
-
<span class="gp"
|
1088
|
-
<span class="
|
1089
|
-
<span class="gp">>>> </span><span class="n">L</span
|
1090
|
-
<span class="
|
1091
|
-
|
1092
|
-
|
1093
|
-
<
|
1094
|
-
</
|
1095
|
-
|
1096
|
-
<
|
1097
|
-
|
1098
|
-
|
1099
|
-
<
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
<
|
1109
|
-
<
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
to
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
the
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
the
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
<
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
<
|
1144
|
-
<
|
1145
|
-
<span class="
|
1146
|
-
<
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
</
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
<
|
1160
|
-
|
1161
|
-
|
1162
|
-
<
|
1163
|
-
<
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
<
|
1171
|
-
<span class="gp">>>> </span><span class="n">B</span>
|
1172
|
-
<span class="go">ClosedBraid(1, -2, 3)</span>
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
</
|
1178
|
-
</
|
1179
|
-
|
1180
|
-
|
1181
|
-
</
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
</
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
</script>
|
1212
|
-
|
1213
|
-
</body>
|
1
|
+
|
2
|
+
|
3
|
+
<!DOCTYPE html>
|
4
|
+
<html class="writer-html5" lang="en" data-content_root="./">
|
5
|
+
<head>
|
6
|
+
<meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
9
|
+
<title>Links: planar diagrams and invariants — SnapPy 3.2 documentation</title>
|
10
|
+
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
|
11
|
+
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=e59714d7" />
|
12
|
+
<link rel="stylesheet" type="text/css" href="_static/snappy_sphinx_rtd_theme.css?v=1b8ec2a8" />
|
13
|
+
|
14
|
+
|
15
|
+
<link rel="shortcut icon" href="_static/SnapPy.ico"/>
|
16
|
+
<script src="_static/jquery.js?v=5d32c60e"></script>
|
17
|
+
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
|
18
|
+
<script src="_static/documentation_options.js?v=828ea960"></script>
|
19
|
+
<script src="_static/doctools.js?v=9a2dae69"></script>
|
20
|
+
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
21
|
+
<script src="_static/js/theme.js"></script>
|
22
|
+
<link rel="index" title="Index" href="genindex.html" />
|
23
|
+
<link rel="search" title="Search" href="search.html" />
|
24
|
+
<link rel="next" title="Number theory of hyperbolic 3-manifolds" href="snap.html" />
|
25
|
+
<link rel="prev" title="Using SnapPy’s link editor" href="plink.html" />
|
26
|
+
</head>
|
27
|
+
|
28
|
+
<body class="wy-body-for-nav">
|
29
|
+
<div class="wy-grid-for-nav">
|
30
|
+
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
|
31
|
+
<div class="wy-side-scroll">
|
32
|
+
<div class="wy-side-nav-search" >
|
33
|
+
|
34
|
+
|
35
|
+
|
36
|
+
<a href="index.html" class="icon icon-home">
|
37
|
+
SnapPy
|
38
|
+
<img src="_static/SnapPy-horizontal-128.png" class="logo" alt="Logo"/>
|
39
|
+
</a>
|
40
|
+
<div role="search">
|
41
|
+
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
|
42
|
+
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" />
|
43
|
+
<input type="hidden" name="check_keywords" value="yes" />
|
44
|
+
<input type="hidden" name="area" value="default" />
|
45
|
+
</form>
|
46
|
+
</div>
|
47
|
+
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
48
|
+
<ul class="current">
|
49
|
+
<li class="toctree-l1"><a class="reference internal" href="installing.html">Installing SnapPy</a></li>
|
50
|
+
<li class="toctree-l1"><a class="reference internal" href="screenshots.html">Screenshots: SnapPy in action</a></li>
|
51
|
+
<li class="toctree-l1"><a class="reference internal" href="tutorial.html">Tutorial</a></li>
|
52
|
+
<li class="toctree-l1"><a class="reference internal" href="snappy.html">The snappy module and its classes</a></li>
|
53
|
+
<li class="toctree-l1"><a class="reference internal" href="plink.html">Using SnapPy’s link editor</a></li>
|
54
|
+
<li class="toctree-l1 current"><a class="current reference internal" href="#">Links: planar diagrams and invariants</a><ul>
|
55
|
+
<li class="toctree-l2"><a class="reference internal" href="#tutorial">Tutorial</a></li>
|
56
|
+
<li class="toctree-l2"><a class="reference internal" href="#random-links">Random Links</a><ul>
|
57
|
+
<li class="toctree-l3"><a class="reference internal" href="#spherogram.random_link"><code class="docutils literal notranslate"><span class="pre">random_link()</span></code></a></li>
|
58
|
+
</ul>
|
59
|
+
</li>
|
60
|
+
<li class="toctree-l2"><a class="reference internal" href="#the-link-class">The Link class</a><ul>
|
61
|
+
<li class="toctree-l3"><a class="reference internal" href="#spherogram.Link"><code class="docutils literal notranslate"><span class="pre">Link</span></code></a><ul>
|
62
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.DT_code"><code class="docutils literal notranslate"><span class="pre">Link.DT_code()</span></code></a></li>
|
63
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.KLPProjection"><code class="docutils literal notranslate"><span class="pre">Link.KLPProjection()</span></code></a></li>
|
64
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.PD_code"><code class="docutils literal notranslate"><span class="pre">Link.PD_code()</span></code></a></li>
|
65
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.alexander_matrix"><code class="docutils literal notranslate"><span class="pre">Link.alexander_matrix()</span></code></a></li>
|
66
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.alexander_poly"><code class="docutils literal notranslate"><span class="pre">Link.alexander_poly()</span></code></a></li>
|
67
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.alexander_polynomial"><code class="docutils literal notranslate"><span class="pre">Link.alexander_polynomial()</span></code></a></li>
|
68
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.all_crossings_oriented"><code class="docutils literal notranslate"><span class="pre">Link.all_crossings_oriented()</span></code></a></li>
|
69
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.alternating"><code class="docutils literal notranslate"><span class="pre">Link.alternating()</span></code></a></li>
|
70
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.backtrack"><code class="docutils literal notranslate"><span class="pre">Link.backtrack()</span></code></a></li>
|
71
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.black_graph"><code class="docutils literal notranslate"><span class="pre">Link.black_graph()</span></code></a></li>
|
72
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.braid_word"><code class="docutils literal notranslate"><span class="pre">Link.braid_word()</span></code></a></li>
|
73
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.connected_sum"><code class="docutils literal notranslate"><span class="pre">Link.connected_sum()</span></code></a></li>
|
74
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.copy"><code class="docutils literal notranslate"><span class="pre">Link.copy()</span></code></a></li>
|
75
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.crossing_entries"><code class="docutils literal notranslate"><span class="pre">Link.crossing_entries()</span></code></a></li>
|
76
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.crossing_strands"><code class="docutils literal notranslate"><span class="pre">Link.crossing_strands()</span></code></a></li>
|
77
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.deconnect_sum"><code class="docutils literal notranslate"><span class="pre">Link.deconnect_sum()</span></code></a></li>
|
78
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.determinant"><code class="docutils literal notranslate"><span class="pre">Link.determinant()</span></code></a></li>
|
79
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.digraph"><code class="docutils literal notranslate"><span class="pre">Link.digraph()</span></code></a></li>
|
80
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.dual_graph"><code class="docutils literal notranslate"><span class="pre">Link.dual_graph()</span></code></a></li>
|
81
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.exterior"><code class="docutils literal notranslate"><span class="pre">Link.exterior()</span></code></a></li>
|
82
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.faces"><code class="docutils literal notranslate"><span class="pre">Link.faces()</span></code></a></li>
|
83
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.goeritz_matrix"><code class="docutils literal notranslate"><span class="pre">Link.goeritz_matrix()</span></code></a></li>
|
84
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.is_alternating"><code class="docutils literal notranslate"><span class="pre">Link.is_alternating()</span></code></a></li>
|
85
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.is_planar"><code class="docutils literal notranslate"><span class="pre">Link.is_planar()</span></code></a></li>
|
86
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.jones_polynomial"><code class="docutils literal notranslate"><span class="pre">Link.jones_polynomial()</span></code></a></li>
|
87
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.knot_floer_homology"><code class="docutils literal notranslate"><span class="pre">Link.knot_floer_homology()</span></code></a></li>
|
88
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.knot_group"><code class="docutils literal notranslate"><span class="pre">Link.knot_group()</span></code></a></li>
|
89
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.linking_matrix"><code class="docutils literal notranslate"><span class="pre">Link.linking_matrix()</span></code></a></li>
|
90
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.linking_number"><code class="docutils literal notranslate"><span class="pre">Link.linking_number()</span></code></a></li>
|
91
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.mirror"><code class="docutils literal notranslate"><span class="pre">Link.mirror()</span></code></a></li>
|
92
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.morse_diagram"><code class="docutils literal notranslate"><span class="pre">Link.morse_diagram()</span></code></a></li>
|
93
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.morse_number"><code class="docutils literal notranslate"><span class="pre">Link.morse_number()</span></code></a></li>
|
94
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.optimize_overcrossings"><code class="docutils literal notranslate"><span class="pre">Link.optimize_overcrossings()</span></code></a></li>
|
95
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.overstrands"><code class="docutils literal notranslate"><span class="pre">Link.overstrands()</span></code></a></li>
|
96
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.peer_code"><code class="docutils literal notranslate"><span class="pre">Link.peer_code()</span></code></a></li>
|
97
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.sage_link"><code class="docutils literal notranslate"><span class="pre">Link.sage_link()</span></code></a></li>
|
98
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.seifert_matrix"><code class="docutils literal notranslate"><span class="pre">Link.seifert_matrix()</span></code></a></li>
|
99
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.signature"><code class="docutils literal notranslate"><span class="pre">Link.signature()</span></code></a></li>
|
100
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.simplify"><code class="docutils literal notranslate"><span class="pre">Link.simplify()</span></code></a></li>
|
101
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.split_link_diagram"><code class="docutils literal notranslate"><span class="pre">Link.split_link_diagram()</span></code></a></li>
|
102
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.sublink"><code class="docutils literal notranslate"><span class="pre">Link.sublink()</span></code></a></li>
|
103
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.view"><code class="docutils literal notranslate"><span class="pre">Link.view()</span></code></a></li>
|
104
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.white_graph"><code class="docutils literal notranslate"><span class="pre">Link.white_graph()</span></code></a></li>
|
105
|
+
<li class="toctree-l4"><a class="reference internal" href="#spherogram.Link.writhe"><code class="docutils literal notranslate"><span class="pre">Link.writhe()</span></code></a></li>
|
106
|
+
</ul>
|
107
|
+
</li>
|
108
|
+
</ul>
|
109
|
+
</li>
|
110
|
+
<li class="toctree-l2"><a class="reference internal" href="#the-closedbraid-class">The ClosedBraid class</a><ul>
|
111
|
+
<li class="toctree-l3"><a class="reference internal" href="#spherogram.ClosedBraid"><code class="docutils literal notranslate"><span class="pre">ClosedBraid</span></code></a></li>
|
112
|
+
</ul>
|
113
|
+
</li>
|
114
|
+
</ul>
|
115
|
+
</li>
|
116
|
+
<li class="toctree-l1"><a class="reference internal" href="snap.html">Number theory of hyperbolic 3-manifolds</a></li>
|
117
|
+
<li class="toctree-l1"><a class="reference internal" href="verify.html">Verified computations</a></li>
|
118
|
+
<li class="toctree-l1"><a class="reference internal" href="other.html">Other components</a></li>
|
119
|
+
<li class="toctree-l1"><a class="reference internal" href="news.html">News</a></li>
|
120
|
+
<li class="toctree-l1"><a class="reference internal" href="credits.html">Credits</a></li>
|
121
|
+
<li class="toctree-l1"><a class="reference internal" href="bugs.html">Reporting bugs and other problems</a></li>
|
122
|
+
<li class="toctree-l1"><a class="reference internal" href="todo.html">To Do List</a></li>
|
123
|
+
<li class="toctree-l1"><a class="reference internal" href="development.html">Development Basics</a></li>
|
124
|
+
</ul>
|
125
|
+
|
126
|
+
</div>
|
127
|
+
</div>
|
128
|
+
</nav>
|
129
|
+
|
130
|
+
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
|
131
|
+
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
132
|
+
<a href="index.html">SnapPy</a>
|
133
|
+
</nav>
|
134
|
+
|
135
|
+
<div class="wy-nav-content">
|
136
|
+
<div class="rst-content">
|
137
|
+
<div role="navigation" aria-label="Page navigation">
|
138
|
+
<ul class="wy-breadcrumbs">
|
139
|
+
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
|
140
|
+
<li class="breadcrumb-item active">Links: planar diagrams and invariants</li>
|
141
|
+
<li class="wy-breadcrumbs-aside">
|
142
|
+
</li>
|
143
|
+
</ul>
|
144
|
+
<hr/>
|
145
|
+
</div>
|
146
|
+
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
147
|
+
<div itemprop="articleBody">
|
148
|
+
|
149
|
+
<section id="links-planar-diagrams-and-invariants">
|
150
|
+
<span id="module-spherogram"></span><h1>Links: planar diagrams and invariants<a class="headerlink" href="#links-planar-diagrams-and-invariants" title="Link to this heading"></a></h1>
|
151
|
+
<section id="tutorial">
|
152
|
+
<h2>Tutorial<a class="headerlink" href="#tutorial" title="Link to this heading"></a></h2>
|
153
|
+
<p>SnapPy includes the <a class="reference external" href="https://github.com/3-manifolds/Spherogram">Spherogram</a> module which allows one to
|
154
|
+
create links programmatically. The graphical conventions used are
|
155
|
+
<a class="reference external" href="https://github.com/3-manifolds/Spherogram/raw/master/spherogram_src/links/doc.pdf">summarized here</a>.</p>
|
156
|
+
<p>First, here is the figure-8 knot assembled manually from four crossings, with conventions similar to those used by <a class="reference external" href="http://katlas.org/wiki/Planar_Diagrams">KnotTheory</a>:</p>
|
157
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">d</span> <span class="o">=</span> <span class="p">[</span><span class="n">Crossing</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="s1">'abcd'</span><span class="p">]</span>
|
158
|
+
<span class="gp">>>> </span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="n">c</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">d</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
159
|
+
<span class="gp">>>> </span><span class="n">b</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="n">d</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
|
160
|
+
<span class="gp">>>> </span><span class="n">c</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">d</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">d</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
161
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">,</span><span class="n">c</span><span class="p">,</span><span class="n">d</span><span class="p">])</span>
|
162
|
+
<span class="gp">>>> </span><span class="n">E</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span>
|
163
|
+
<span class="gp">>>> </span><span class="n">E</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span>
|
164
|
+
<span class="go">2.029883212819</span>
|
165
|
+
<span class="gp">>>> </span><span class="n">Manifold</span><span class="p">(</span><span class="s1">'4_1'</span><span class="p">)</span><span class="o">.</span><span class="n">is_isometric_to</span><span class="p">(</span><span class="n">E</span><span class="p">)</span>
|
166
|
+
<span class="go">True</span>
|
167
|
+
</pre></div>
|
168
|
+
</div>
|
169
|
+
<p>We can also give the same knot as a rational tangle:</p>
|
170
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">)</span><span class="o">.</span><span class="n">denominator_closure</span><span class="p">()</span>
|
171
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">PD_code</span><span class="p">()</span>
|
172
|
+
<span class="go">[[6, 3, 7, 4], [4, 2, 5, 1], [0, 6, 1, 5], [2, 7, 3, 0]]</span>
|
173
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">DT_code</span><span class="p">(</span><span class="kc">True</span><span class="p">)</span>
|
174
|
+
<span class="go">'DT[dadCDAB]'</span>
|
175
|
+
</pre></div>
|
176
|
+
</div>
|
177
|
+
<p>The natural algebra of tangles <a class="reference external" href="https://github.com/3-manifolds/Spherogram/raw/master/spherogram_src/links/doc.pdf">shown here</a>
|
178
|
+
all works. For instance, we can build the (-2, 3, 7) pretzel knot by
|
179
|
+
adding together three rational tangles:</p>
|
180
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">T</span> <span class="o">=</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span> <span class="o">+</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span> <span class="o">+</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">7</span><span class="p">)</span>
|
181
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">T</span><span class="o">.</span><span class="n">numerator_closure</span><span class="p">()</span>
|
182
|
+
<span class="gp">>>> </span><span class="n">Manifold</span><span class="p">(</span><span class="s1">'m016'</span><span class="p">)</span><span class="o">.</span><span class="n">is_isometric_to</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">exterior</span><span class="p">())</span>
|
183
|
+
<span class="go">True</span>
|
184
|
+
</pre></div>
|
185
|
+
</div>
|
186
|
+
<p>To create the figure-8 knot as a closed braid, we first mash tangles
|
187
|
+
together horizontally using “|” to make the standard braid generators;
|
188
|
+
then multiplication in the braid group is just tangle multiplication:</p>
|
189
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">C</span><span class="p">,</span> <span class="n">Id</span> <span class="o">=</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">1</span><span class="p">),</span> <span class="n">IdentityBraid</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
|
190
|
+
<span class="gp">>>> </span><span class="n">x</span> <span class="o">=</span> <span class="n">sigma_1</span> <span class="o">=</span> <span class="n">C</span> <span class="o">|</span> <span class="n">Id</span>
|
191
|
+
<span class="gp">>>> </span><span class="n">y</span> <span class="o">=</span> <span class="n">sigma_2_inverse</span> <span class="o">=</span> <span class="n">Id</span> <span class="o">|</span> <span class="o">-</span><span class="n">C</span>
|
192
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="p">(</span><span class="n">x</span><span class="o">*</span><span class="n">y</span><span class="o">*</span><span class="n">x</span><span class="o">*</span><span class="n">y</span><span class="p">)</span><span class="o">.</span><span class="n">denominator_closure</span><span class="p">()</span>
|
193
|
+
<span class="gp">>>> </span><span class="n">E</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span>
|
194
|
+
<span class="gp">>>> </span><span class="n">Manifold</span><span class="p">(</span><span class="s1">'4_1'</span><span class="p">)</span><span class="o">.</span><span class="n">is_isometric_to</span><span class="p">(</span><span class="n">E</span><span class="p">)</span>
|
195
|
+
<span class="go">True</span>
|
196
|
+
</pre></div>
|
197
|
+
</div>
|
198
|
+
<p>Here’s the minimally-twisted five chain from Figure 2 of <a class="reference external" href="http://arxiv.org/abs/math.GT/0209214">this paper</a>:</p>
|
199
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">twisted_chain</span><span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="n">k</span><span class="p">):</span>
|
200
|
+
<span class="n">T</span> <span class="o">=</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">)</span>
|
201
|
+
<span class="n">m</span> <span class="o">=</span> <span class="p">(</span><span class="n">n</span><span class="o">+</span><span class="mi">1</span><span class="p">)</span><span class="o">//</span><span class="mi">2</span>
|
202
|
+
<span class="n">base</span> <span class="o">=</span> <span class="p">(</span><span class="n">m</span><span class="o">*</span><span class="p">[</span><span class="n">T</span><span class="p">,</span> <span class="o">-</span><span class="n">T</span><span class="p">])[:</span><span class="n">n</span><span class="p">]</span>
|
203
|
+
<span class="n">tangles</span> <span class="o">=</span> <span class="n">base</span> <span class="o">+</span> <span class="p">[</span><span class="n">RationalTangle</span><span class="p">(</span><span class="n">k</span><span class="p">)]</span>
|
204
|
+
<span class="k">return</span> <span class="nb">sum</span><span class="p">(</span><span class="n">tangles</span><span class="p">,</span> <span class="n">RationalTangle</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span> <span class="p">)</span><span class="o">.</span><span class="n">bridge_closure</span><span class="p">()</span>
|
205
|
+
|
206
|
+
<span class="o">>>></span> <span class="n">L</span> <span class="o">=</span> <span class="n">twisted_chain</span><span class="p">(</span><span class="mi">5</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">)</span>
|
207
|
+
<span class="o">>>></span> <span class="n">L</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span>
|
208
|
+
<span class="mf">10.14941606410</span>
|
209
|
+
</pre></div>
|
210
|
+
</div>
|
211
|
+
<p>Spherogram includes ways to create very large random links, see below.
|
212
|
+
When used inside <a class="reference external" href="http://sagemath.org">Sage</a>, one can compute many
|
213
|
+
basic link invariants, including the Jones polynomial. See the
|
214
|
+
complete list of Link methods below.</p>
|
215
|
+
</section>
|
216
|
+
<section id="random-links">
|
217
|
+
<h2>Random Links<a class="headerlink" href="#random-links" title="Link to this heading"></a></h2>
|
218
|
+
<dl class="py function">
|
219
|
+
<dt class="sig sig-object py" id="spherogram.random_link">
|
220
|
+
<span class="sig-prename descclassname"><span class="pre">spherogram.</span></span><span class="sig-name descname"><span class="pre">random_link</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">crossings</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">num_components</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'any'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">initial_map_gives_link</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">alternating</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">consistent_twist_regions</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">simplify</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'basic'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prime_decomposition</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">return_all_pieces</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">max_tries</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.random_link" title="Link to this definition"></a></dt>
|
221
|
+
<dd><p>Generates a random link from a model that starts with a random
|
222
|
+
4-valent planar graph sampled with the uniform distribution by
|
223
|
+
Schaeffer’s <a class="reference external" href="http://www.lix.polytechnique.fr/~schaeffe/PagesWeb/PlanarMap/index-en.html">PlanarMap program.</a></p>
|
224
|
+
<p>The <code class="docutils literal notranslate"><span class="pre">crossings</span></code> argument specifies the number of vertices of the
|
225
|
+
initial planar graph G; the number of crossing in the returned knot
|
226
|
+
will typically be less. The meanings of the optional arguments are as
|
227
|
+
follows:</p>
|
228
|
+
<ol class="arabic">
|
229
|
+
<li><p><code class="docutils literal notranslate"><span class="pre">num_components</span></code>: The number of components of the returned link.
|
230
|
+
The link naively associated to G may have too few or too many
|
231
|
+
components. The former situation is resolved by picking another G,
|
232
|
+
and the latter by either</p>
|
233
|
+
<ol class="loweralpha simple">
|
234
|
+
<li><p>Taking the sublink consisting of the components with the largest
|
235
|
+
self-crossing numbers.</p></li>
|
236
|
+
<li><p>Resampling G until the desired number of components is achieved;
|
237
|
+
this can take a very long time as the expected number of
|
238
|
+
components associated to G grows linearly in the number of
|
239
|
+
vertices.</p></li>
|
240
|
+
</ol>
|
241
|
+
<p>When the argument <code class="docutils literal notranslate"><span class="pre">initial_map_gives_link</span></code> is <code class="docutils literal notranslate"><span class="pre">False</span></code> the
|
242
|
+
program does (a) and this is the default behavior. If you want (b)
|
243
|
+
set this argument to <code class="docutils literal notranslate"><span class="pre">True</span></code>.</p>
|
244
|
+
<p>To get the entire link associated to G, set <code class="docutils literal notranslate"><span class="pre">num_components</span></code> to
|
245
|
+
<code class="docutils literal notranslate"><span class="pre">`any`</span></code>, which is also the default.</p>
|
246
|
+
</li>
|
247
|
+
<li><p>The 4-valent vertices of G are turned into crossings by flipping a
|
248
|
+
fair coin. If you want the unique alternating diagram associated to
|
249
|
+
G, pass <code class="docutils literal notranslate"><span class="pre">alternating=True</span></code>. If you want there to be no
|
250
|
+
obvious Type II Reidemeister moves, pass
|
251
|
+
<code class="docutils literal notranslate"><span class="pre">consistent_twist_regions=True</span></code>.</p></li>
|
252
|
+
<li><p><code class="docutils literal notranslate"><span class="pre">simplify</span></code>: Whether and how to try to reduce the number of
|
253
|
+
crossings of the link via Reidemeister moves using the method
|
254
|
+
<code class="docutils literal notranslate"><span class="pre">Link.simplify</span></code>. For no simplification, set <code class="docutils literal notranslate"><span class="pre">simplify=None</span></code>;
|
255
|
+
otherwise set <code class="docutils literal notranslate"><span class="pre">simplify</span></code> to be the appropriate mode for
|
256
|
+
<code class="docutils literal notranslate"><span class="pre">Link.simplify</span></code>, for example <code class="docutils literal notranslate"><span class="pre">basic</span></code> (the default), <code class="docutils literal notranslate"><span class="pre">level</span></code>,
|
257
|
+
or <code class="docutils literal notranslate"><span class="pre">global</span></code>.</p></li>
|
258
|
+
<li><p><code class="docutils literal notranslate"><span class="pre">prime_decomposition</span></code>: The initial link generated from G may not
|
259
|
+
be prime (and typically isn’t if <code class="docutils literal notranslate"><span class="pre">initial_map_gives_link</span></code> is
|
260
|
+
<code class="docutils literal notranslate"><span class="pre">False</span></code>). When set (the default), the program undoes any connect
|
261
|
+
sums that are “diagrammatic obvious”, simplifies the result, and
|
262
|
+
repeats until pieces are “diagrammatically prime”. If
|
263
|
+
<code class="docutils literal notranslate"><span class="pre">return_all_pieces</span></code> is <code class="docutils literal notranslate"><span class="pre">False</span></code> (the default) then only the
|
264
|
+
largest (apparently) prime component is returned; otherwise all
|
265
|
+
summands are returned as a list.</p>
|
266
|
+
<p>Warning: If <code class="docutils literal notranslate"><span class="pre">prime_decomposition=True</span></code> and
|
267
|
+
<code class="docutils literal notranslate"><span class="pre">return_all_pieces=False</span></code>, then the link returned may have
|
268
|
+
fewer components than requested. This is because a prime piece
|
269
|
+
can have fewer components than the link as a whole.</p>
|
270
|
+
</li>
|
271
|
+
</ol>
|
272
|
+
<p>Some examples:</p>
|
273
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">random_link</span><span class="p">(</span><span class="mi">25</span><span class="p">,</span> <span class="n">num_components</span><span class="o">=</span><span class="mi">1</span><span class="p">,</span> <span class="n">initial_map_gives_link</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">alternating</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
274
|
+
<span class="gp">>>> </span><span class="n">K</span>
|
275
|
+
<span class="go"><Link: 1 comp; 25 cross></span>
|
276
|
+
</pre></div>
|
277
|
+
</div>
|
278
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span><span class="o">=</span> <span class="n">random_link</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="n">consistent_twist_regions</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">simplify</span> <span class="o">=</span> <span class="s1">'global'</span><span class="p">)</span>
|
279
|
+
<span class="gp">>>> </span><span class="nb">isinstance</span><span class="p">(</span><span class="n">random_link</span><span class="p">(</span><span class="mi">30</span><span class="p">,</span> <span class="n">return_all_pieces</span><span class="o">=</span><span class="kc">True</span><span class="p">),</span> <span class="nb">list</span><span class="p">)</span>
|
280
|
+
<span class="go">True</span>
|
281
|
+
</pre></div>
|
282
|
+
</div>
|
283
|
+
</dd></dl>
|
284
|
+
|
285
|
+
</section>
|
286
|
+
<section id="the-link-class">
|
287
|
+
<h2>The Link class<a class="headerlink" href="#the-link-class" title="Link to this heading"></a></h2>
|
288
|
+
<dl class="py class">
|
289
|
+
<dt class="sig sig-object py" id="spherogram.Link">
|
290
|
+
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">spherogram.</span></span><span class="sig-name descname"><span class="pre">Link</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">crossings</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">braid_closure</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">check_planarity</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">build</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link" title="Link to this definition"></a></dt>
|
291
|
+
<dd><p>Links are made from Crossings. The general model is that of the PD
|
292
|
+
diagrams used in <a class="reference external" href="http://katlas.org/wiki/Planar_Diagrams">KnotTheory</a>.</p>
|
293
|
+
<p>See the file “doc.pdf” for the conventions, which can be accessed
|
294
|
+
via “spherogram.pdf_docs()”, and the <a class="reference external" href="http://www.math.uic.edu/t3m/SnapPy/spherogram.html">Spherogram tutorial</a>
|
295
|
+
for some examples of creating links.</p>
|
296
|
+
<p>Here are two ways of creating the figure-8 knot, first via a PD code</p>
|
297
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K1</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([[</span><span class="mi">8</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">4</span><span class="p">],[</span><span class="mi">2</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">],[</span><span class="mi">6</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">1</span><span class="p">],[</span><span class="mi">4</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">8</span><span class="p">]])</span>
|
298
|
+
</pre></div>
|
299
|
+
</div>
|
300
|
+
<p>and by directly gluing up Crossings:</p>
|
301
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span><span class="p">,</span> <span class="n">b</span><span class="p">,</span> <span class="n">c</span><span class="p">,</span> <span class="n">d</span> <span class="o">=</span> <span class="p">[</span><span class="n">Crossing</span><span class="p">(</span><span class="n">x</span><span class="p">)</span> <span class="k">for</span> <span class="n">x</span> <span class="ow">in</span> <span class="s1">'abcd'</span><span class="p">]</span>
|
302
|
+
<span class="gp">>>> </span><span class="n">a</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">a</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="n">c</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">d</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">1</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span>
|
303
|
+
<span class="gp">>>> </span><span class="n">b</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">b</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="o">=</span> <span class="n">d</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">2</span><span class="p">]</span>
|
304
|
+
<span class="gp">>>> </span><span class="n">c</span><span class="p">[</span><span class="mi">3</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="n">d</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">d</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span>
|
305
|
+
<span class="gp">>>> </span><span class="n">K2</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([</span><span class="n">a</span><span class="p">,</span><span class="n">b</span><span class="p">,</span><span class="n">c</span><span class="p">,</span><span class="n">d</span><span class="p">])</span>
|
306
|
+
</pre></div>
|
307
|
+
</div>
|
308
|
+
<p>Some families of named links are available, such a torus knots</p>
|
309
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">Link</span><span class="p">(</span><span class="s1">'T(4, 2)'</span><span class="p">)</span>
|
310
|
+
<span class="go"><Link: 2 comp; 6 cross></span>
|
311
|
+
</pre></div>
|
312
|
+
</div>
|
313
|
+
<p>You can also construct a link by taking the closure of a braid.</p>
|
314
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">Link</span><span class="p">(</span><span class="n">braid_closure</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">])</span>
|
315
|
+
<span class="go"><Link: 1 comp; 4 cross></span>
|
316
|
+
</pre></div>
|
317
|
+
</div>
|
318
|
+
<p>WARNING: In SnapPy 3.0, the convention for braids changed. See
|
319
|
+
the “doc.pdf” file for details.</p>
|
320
|
+
<p>DT codes, in their many forms, are also accepted:</p>
|
321
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L1</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'DT: [(4,6,2)]'</span><span class="p">)</span>
|
322
|
+
<span class="gp">>>> </span><span class="n">L2</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'DT: cacbca.001'</span><span class="p">)</span>
|
323
|
+
</pre></div>
|
324
|
+
</div>
|
325
|
+
<p>You can also access the links from the Rolfsen and
|
326
|
+
Hoste-Thistlethwaite tables by name.</p>
|
327
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">Link</span><span class="p">(</span><span class="s1">'8_20'</span><span class="p">)</span>
|
328
|
+
<span class="go"><Link 8_20: 1 comp; 8 cross></span>
|
329
|
+
<span class="gp">>>> </span><span class="n">Link</span><span class="p">(</span><span class="s1">'K12a123'</span><span class="p">)</span>
|
330
|
+
<span class="go"><Link K12a123: 1 comp; 12 cross></span>
|
331
|
+
<span class="gp">>>> </span><span class="n">Link</span><span class="p">(</span><span class="s1">'L12n123'</span><span class="p">)</span>
|
332
|
+
<span class="go"><Link L12n123: 2 comp; 12 cross></span>
|
333
|
+
</pre></div>
|
334
|
+
</div>
|
335
|
+
<p>You can also convert to and from SageMath braid and link types,
|
336
|
+
see the documentation for the “sage_link” method for details.</p>
|
337
|
+
<dl class="py method">
|
338
|
+
<dt class="sig sig-object py" id="spherogram.Link.DT_code">
|
339
|
+
<span class="sig-name descname"><span class="pre">DT_code</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">DT_alpha</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">flips</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.DT_code" title="Link to this definition"></a></dt>
|
340
|
+
<dd><p>The Dowker-Thistlethwaite code for the link in either numerical or
|
341
|
+
alphabetical form.</p>
|
342
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K8n1'</span><span class="p">)</span>
|
343
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">DT_code</span><span class="p">(</span><span class="n">DT_alpha</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span> <span class="n">flips</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
344
|
+
<span class="go">'DT[hahCHeAgbdf.11101000]'</span>
|
345
|
+
</pre></div>
|
346
|
+
</div>
|
347
|
+
<p>In the alphabetical form, the first letter determines the
|
348
|
+
number C of crossings, the second the number L of link
|
349
|
+
components, and the next L gives the number of crossings on
|
350
|
+
each component; subsequent letters describe each crossing with
|
351
|
+
‘a’ being 2, ‘A’ being -2, etc.</p>
|
352
|
+
</dd></dl>
|
353
|
+
|
354
|
+
<dl class="py method">
|
355
|
+
<dt class="sig sig-object py" id="spherogram.Link.KLPProjection">
|
356
|
+
<span class="sig-name descname"><span class="pre">KLPProjection</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.KLPProjection" title="Link to this definition"></a></dt>
|
357
|
+
<dd></dd></dl>
|
358
|
+
|
359
|
+
<dl class="py method">
|
360
|
+
<dt class="sig sig-object py" id="spherogram.Link.PD_code">
|
361
|
+
<span class="sig-name descname"><span class="pre">PD_code</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">KnotTheory</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">min_strand_index</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.PD_code" title="Link to this definition"></a></dt>
|
362
|
+
<dd><p>The planar diagram code for the link. When reconstructing a link
|
363
|
+
from its PD code, it will not change the ordering of the
|
364
|
+
components, and will preserve their orientation except
|
365
|
+
possibly for components with only two crossings.</p>
|
366
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L13n11308'</span><span class="p">)</span>
|
367
|
+
<span class="gp">>>> </span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">L</span><span class="o">.</span><span class="n">link_components</span><span class="p">]</span>
|
368
|
+
<span class="go">[4, 4, 4, 6, 8]</span>
|
369
|
+
<span class="gp">>>> </span><span class="n">L_copy</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">PD_code</span><span class="p">())</span>
|
370
|
+
<span class="gp">>>> </span><span class="p">[</span><span class="nb">len</span><span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="k">for</span> <span class="n">c</span> <span class="ow">in</span> <span class="n">L_copy</span><span class="o">.</span><span class="n">link_components</span><span class="p">]</span>
|
371
|
+
<span class="go">[4, 4, 4, 6, 8]</span>
|
372
|
+
</pre></div>
|
373
|
+
</div>
|
374
|
+
</dd></dl>
|
375
|
+
|
376
|
+
<dl class="py method">
|
377
|
+
<dt class="sig sig-object py" id="spherogram.Link.alexander_matrix">
|
378
|
+
<span class="sig-name descname"><span class="pre">alexander_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mv</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.alexander_matrix" title="Link to this definition"></a></dt>
|
379
|
+
<dd><p>Returns the Alexander matrix of the link:</p>
|
380
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'3_1'</span><span class="p">)</span>
|
381
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">A</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_matrix</span><span class="p">()</span>
|
382
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">A</span> <span class="c1"># doctest: +SKIP</span>
|
383
|
+
<span class="p">([</span> <span class="o">-</span><span class="mi">1</span> <span class="n">t</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">t</span><span class="p">]</span>
|
384
|
+
<span class="p">[</span><span class="mi">1</span> <span class="o">-</span> <span class="n">t</span> <span class="o">-</span><span class="mi">1</span> <span class="n">t</span><span class="p">]</span>
|
385
|
+
<span class="p">[</span> <span class="n">t</span> <span class="mi">1</span> <span class="o">-</span> <span class="n">t</span> <span class="o">-</span><span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="n">t</span><span class="p">,</span> <span class="n">t</span><span class="p">,</span> <span class="n">t</span><span class="p">])</span>
|
386
|
+
|
387
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">2</span><span class="p">),(</span><span class="mi">1</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">)])</span>
|
388
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">A</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_matrix</span><span class="p">()</span>
|
389
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">A</span> <span class="c1"># doctest: +SKIP</span>
|
390
|
+
<span class="p">([</span> <span class="o">-</span><span class="mi">1</span> <span class="o">+</span> <span class="n">t1</span><span class="o">^-</span><span class="mi">1</span> <span class="n">t1</span><span class="o">^-</span><span class="mi">1</span><span class="o">*</span><span class="n">t2</span> <span class="o">-</span> <span class="n">t1</span><span class="o">^-</span><span class="mi">1</span><span class="p">]</span>
|
391
|
+
<span class="p">[</span><span class="n">t1</span><span class="o">*</span><span class="n">t2</span><span class="o">^-</span><span class="mi">1</span> <span class="o">-</span> <span class="n">t2</span><span class="o">^-</span><span class="mi">1</span> <span class="o">-</span><span class="mi">1</span> <span class="o">+</span> <span class="n">t2</span><span class="o">^-</span><span class="mi">1</span><span class="p">],</span> <span class="p">[</span><span class="n">t2</span><span class="p">,</span> <span class="n">t1</span><span class="p">])</span>
|
392
|
+
</pre></div>
|
393
|
+
</div>
|
394
|
+
</dd></dl>
|
395
|
+
|
396
|
+
<dl class="py method">
|
397
|
+
<dt class="sig sig-object py" id="spherogram.Link.alexander_poly">
|
398
|
+
<span class="sig-name descname"><span class="pre">alexander_poly</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.alexander_poly" title="Link to this definition"></a></dt>
|
399
|
+
<dd><p>Please use the “alexander_polynomial” method instead.</p>
|
400
|
+
</dd></dl>
|
401
|
+
|
402
|
+
<dl class="py method">
|
403
|
+
<dt class="sig sig-object py" id="spherogram.Link.alexander_polynomial">
|
404
|
+
<span class="sig-name descname"><span class="pre">alexander_polynomial</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">multivar</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">v</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'no'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'default'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">norm</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">factored</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.alexander_polynomial" title="Link to this definition"></a></dt>
|
405
|
+
<dd><p>Calculates the Alexander polynomial of the link.</p>
|
406
|
+
<p>For links with one component,
|
407
|
+
can evaluate the alexander polynomial at v:</p>
|
408
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'4_1'</span><span class="p">)</span>
|
409
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">()</span>
|
410
|
+
<span class="n">t</span><span class="o">^</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">3</span><span class="o">*</span><span class="n">t</span> <span class="o">+</span> <span class="mi">1</span>
|
411
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">(</span><span class="n">v</span><span class="o">=</span><span class="p">[</span><span class="mi">4</span><span class="p">])</span>
|
412
|
+
<span class="mi">5</span>
|
413
|
+
|
414
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L7n1'</span><span class="p">)</span>
|
415
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">(</span><span class="n">norm</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
416
|
+
<span class="n">t1</span><span class="o">^-</span><span class="mi">1</span><span class="o">*</span><span class="n">t2</span><span class="o">^-</span><span class="mi">1</span> <span class="o">+</span> <span class="n">t1</span><span class="o">^-</span><span class="mi">2</span><span class="o">*</span><span class="n">t2</span><span class="o">^-</span><span class="mi">4</span>
|
417
|
+
</pre></div>
|
418
|
+
</div>
|
419
|
+
<p>The default algorithm for <em>knots</em> is Bar-Natan’s super-fast
|
420
|
+
tangle-based algorithm. For links, we apply Fox calculus to a
|
421
|
+
Wirtinger presentation for the link:</p>
|
422
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K13n123'</span><span class="p">)</span>
|
423
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">()</span> <span class="o">==</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">(</span><span class="n">method</span><span class="o">=</span><span class="s1">'wirtinger'</span><span class="p">)</span>
|
424
|
+
<span class="kc">True</span>
|
425
|
+
</pre></div>
|
426
|
+
</div>
|
427
|
+
</dd></dl>
|
428
|
+
|
429
|
+
<dl class="py method">
|
430
|
+
<dt class="sig sig-object py" id="spherogram.Link.all_crossings_oriented">
|
431
|
+
<span class="sig-name descname"><span class="pre">all_crossings_oriented</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.all_crossings_oriented" title="Link to this definition"></a></dt>
|
432
|
+
<dd></dd></dl>
|
433
|
+
|
434
|
+
<dl class="py method">
|
435
|
+
<dt class="sig sig-object py" id="spherogram.Link.alternating">
|
436
|
+
<span class="sig-name descname"><span class="pre">alternating</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.alternating" title="Link to this definition"></a></dt>
|
437
|
+
<dd><p>Returns the alternating link with the same planar graph. No attempt
|
438
|
+
is made to preserve the order of the link components or ensure
|
439
|
+
that the DT code of the result has all positive entries (as
|
440
|
+
opposed to all negative).</p>
|
441
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L14n12345'</span><span class="p">)</span>
|
442
|
+
<span class="gp">>>> </span><span class="n">A</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">alternating</span><span class="p">()</span>
|
443
|
+
<span class="gp">>>> </span><span class="n">A</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span><span class="o">.</span><span class="n">identify</span><span class="p">()</span>
|
444
|
+
<span class="go">[L14a5150(0,0)(0,0)]</span>
|
445
|
+
</pre></div>
|
446
|
+
</div>
|
447
|
+
</dd></dl>
|
448
|
+
|
449
|
+
<dl class="py method">
|
450
|
+
<dt class="sig sig-object py" id="spherogram.Link.backtrack">
|
451
|
+
<span class="sig-name descname"><span class="pre">backtrack</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">steps</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">10</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prob_type_1</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.3</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">prob_type_2</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">0.3</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.backtrack" title="Link to this definition"></a></dt>
|
452
|
+
<dd><p>Performs a sequence of Reidemeister moves which increase or maintain
|
453
|
+
the number of crossings in a diagram. The number of such
|
454
|
+
moves is the parameter steps. The diagram is modified in place.</p>
|
455
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L14a7689'</span><span class="p">)</span>
|
456
|
+
<span class="gp">>>> </span><span class="n">K</span>
|
457
|
+
<span class="go"><Link L14a7689: 2 comp; 14 cross></span>
|
458
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">backtrack</span><span class="p">(</span><span class="n">steps</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span> <span class="n">prob_type_1</span> <span class="o">=</span> <span class="mi">1</span><span class="p">,</span> <span class="n">prob_type_2</span> <span class="o">=</span> <span class="mi">0</span><span class="p">)</span>
|
459
|
+
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">K</span><span class="o">.</span><span class="n">crossings</span><span class="p">)</span>
|
460
|
+
<span class="go">19</span>
|
461
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">backtrack</span><span class="p">(</span><span class="n">steps</span> <span class="o">=</span> <span class="mi">5</span><span class="p">,</span> <span class="n">prob_type_1</span> <span class="o">=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">prob_type_2</span> <span class="o">=</span> <span class="mi">1</span><span class="p">)</span>
|
462
|
+
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">K</span><span class="o">.</span><span class="n">crossings</span><span class="p">)</span>
|
463
|
+
<span class="go">29</span>
|
464
|
+
</pre></div>
|
465
|
+
</div>
|
466
|
+
</dd></dl>
|
467
|
+
|
468
|
+
<dl class="py method">
|
469
|
+
<dt class="sig sig-object py" id="spherogram.Link.black_graph">
|
470
|
+
<span class="sig-name descname"><span class="pre">black_graph</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.black_graph" title="Link to this definition"></a></dt>
|
471
|
+
<dd><p>Returns the black graph of K.</p>
|
472
|
+
<p>If the black graph is disconnected (which can only happen for
|
473
|
+
a split link diagram), returns one connected component. The
|
474
|
+
edges are labeled by the crossings they correspond to.</p>
|
475
|
+
<p>Example:</p>
|
476
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">=</span><span class="n">Link</span><span class="p">(</span><span class="s1">'5_1'</span><span class="p">)</span>
|
477
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">black_graph</span><span class="p">()</span>
|
478
|
+
<span class="n">Subgraph</span> <span class="n">of</span> <span class="p">():</span> <span class="n">Multi</span><span class="o">-</span><span class="n">graph</span> <span class="n">on</span> <span class="mi">2</span> <span class="n">vertices</span>
|
479
|
+
</pre></div>
|
480
|
+
</div>
|
481
|
+
<p>WARNING: While there is also a “white_graph” method, it need
|
482
|
+
not be the case that these two graphs are complementary in the
|
483
|
+
expected way.</p>
|
484
|
+
</dd></dl>
|
485
|
+
|
486
|
+
<dl class="py method">
|
487
|
+
<dt class="sig sig-object py" id="spherogram.Link.braid_word">
|
488
|
+
<span class="sig-name descname"><span class="pre">braid_word</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">as_sage_braid</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.braid_word" title="Link to this definition"></a></dt>
|
489
|
+
<dd><p>Return a list of integers which defines a braid word whose closure is the
|
490
|
+
given link. The natural numbers 1, 2, 3, etc are the generators and the
|
491
|
+
negatives are the inverses.</p>
|
492
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K6a2'</span><span class="p">)</span>
|
493
|
+
<span class="gp">>>> </span><span class="n">word</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">braid_word</span><span class="p">()</span>
|
494
|
+
<span class="gp">>>> </span><span class="n">B</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">braid_closure</span><span class="o">=</span><span class="n">word</span><span class="p">)</span>
|
495
|
+
<span class="gp">>>> </span><span class="n">B</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span><span class="o">.</span><span class="n">identify</span><span class="p">()</span>
|
496
|
+
<span class="go">[m289(0,0), 6_2(0,0), K5_19(0,0), K6a2(0,0)]</span>
|
497
|
+
</pre></div>
|
498
|
+
</div>
|
499
|
+
<p>Within Sage, you can get the answer as an element of the
|
500
|
+
appropriate BraidGroup and also check our earlier work:</p>
|
501
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K6a2'</span><span class="p">)</span><span class="o">.</span><span class="n">braid_word</span><span class="p">(</span><span class="n">as_sage_braid</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
502
|
+
<span class="p">(</span><span class="n">s0</span><span class="o">*</span><span class="n">s1</span><span class="o">^-</span><span class="mi">1</span><span class="p">)</span><span class="o">^</span><span class="mi">2</span><span class="o">*</span><span class="n">s0</span><span class="o">^</span><span class="mi">2</span>
|
503
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">(),</span> <span class="n">B</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
504
|
+
<span class="p">(</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">)</span>
|
505
|
+
</pre></div>
|
506
|
+
</div>
|
507
|
+
<p>Implementation follows P. Vogel, “Representation of links by
|
508
|
+
braids, a new algorithm”.</p>
|
509
|
+
</dd></dl>
|
510
|
+
|
511
|
+
<dl class="py method">
|
512
|
+
<dt class="sig sig-object py" id="spherogram.Link.connected_sum">
|
513
|
+
<span class="sig-name descname"><span class="pre">connected_sum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">other_knot</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.connected_sum" title="Link to this definition"></a></dt>
|
514
|
+
<dd><p>Returns the connected sum of two knots.</p>
|
515
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">fig8</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">1</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">5</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">)]</span>
|
516
|
+
<span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">fig8</span><span class="p">)</span>
|
517
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">connected_sum</span><span class="p">(</span><span class="n">K</span><span class="p">)</span>
|
518
|
+
<span class="go"><Link: 1 comp; 8 cross></span>
|
519
|
+
</pre></div>
|
520
|
+
</div>
|
521
|
+
</dd></dl>
|
522
|
+
|
523
|
+
<dl class="py method">
|
524
|
+
<dt class="sig sig-object py" id="spherogram.Link.copy">
|
525
|
+
<span class="sig-name descname"><span class="pre">copy</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">recursively</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.copy" title="Link to this definition"></a></dt>
|
526
|
+
<dd><p>Returns a copy of the link.</p>
|
527
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L14n467'</span><span class="p">)</span>
|
528
|
+
<span class="gp">>>> </span><span class="n">copy</span> <span class="o">=</span> <span class="n">K</span><span class="o">.</span><span class="n">copy</span><span class="p">();</span> <span class="n">copy</span>
|
529
|
+
<span class="go"><Link L14n467: 2 comp; 14 cross></span>
|
530
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">PD_code</span><span class="p">()</span> <span class="o">==</span> <span class="n">copy</span><span class="o">.</span><span class="n">PD_code</span><span class="p">()</span>
|
531
|
+
<span class="go">True</span>
|
532
|
+
</pre></div>
|
533
|
+
</div>
|
534
|
+
</dd></dl>
|
535
|
+
|
536
|
+
<dl class="py method">
|
537
|
+
<dt class="sig sig-object py" id="spherogram.Link.crossing_entries">
|
538
|
+
<span class="sig-name descname"><span class="pre">crossing_entries</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.crossing_entries" title="Link to this definition"></a></dt>
|
539
|
+
<dd></dd></dl>
|
540
|
+
|
541
|
+
<dl class="py method">
|
542
|
+
<dt class="sig sig-object py" id="spherogram.Link.crossing_strands">
|
543
|
+
<span class="sig-name descname"><span class="pre">crossing_strands</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.crossing_strands" title="Link to this definition"></a></dt>
|
544
|
+
<dd></dd></dl>
|
545
|
+
|
546
|
+
<dl class="py method">
|
547
|
+
<dt class="sig sig-object py" id="spherogram.Link.deconnect_sum">
|
548
|
+
<span class="sig-name descname"><span class="pre">deconnect_sum</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">destroy_original</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.deconnect_sum" title="Link to this definition"></a></dt>
|
549
|
+
<dd><p>Undoes all connect sums that are diagramatically obvious,
|
550
|
+
i.e. those where there is a circle which meets the projection
|
551
|
+
in two points.</p>
|
552
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K5a1</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">9</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">8</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">0</span><span class="p">)]</span>
|
553
|
+
<span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">K5a1</span><span class="p">)</span>
|
554
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">K</span><span class="o">.</span><span class="n">connected_sum</span><span class="p">(</span><span class="n">K</span><span class="p">);</span> <span class="n">L</span>
|
555
|
+
<span class="go"><Link: 1 comp; 10 cross></span>
|
556
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">deconnect_sum</span><span class="p">()</span>
|
557
|
+
<span class="go">[<Link: 1 comp; 5 cross>, <Link: 1 comp; 5 cross>]</span>
|
558
|
+
</pre></div>
|
559
|
+
</div>
|
560
|
+
</dd></dl>
|
561
|
+
|
562
|
+
<dl class="py method">
|
563
|
+
<dt class="sig sig-object py" id="spherogram.Link.determinant">
|
564
|
+
<span class="sig-name descname"><span class="pre">determinant</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">method</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'goeritz'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.determinant" title="Link to this definition"></a></dt>
|
565
|
+
<dd><p>Returns the determinant of the link, a non-negative integer.</p>
|
566
|
+
<p>Possible methods are ‘wirt’, using the Wirtinger presentation; ‘goeritz’,
|
567
|
+
using the Goeritz matrix, and ‘color’, using the ‘colorability matrix’, or
|
568
|
+
anything else, to compute the Alexander polynomial at -1. Example:</p>
|
569
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span> <span class="p">[(</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">),(</span><span class="mi">6</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">3</span><span class="p">),(</span><span class="mi">8</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">6</span><span class="p">),(</span><span class="mi">2</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">7</span><span class="p">)]</span> <span class="p">)</span> <span class="c1"># Figure 8 knot</span>
|
570
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">determinant</span><span class="p">()</span>
|
571
|
+
<span class="mi">5</span>
|
572
|
+
</pre></div>
|
573
|
+
</div>
|
574
|
+
</dd></dl>
|
575
|
+
|
576
|
+
<dl class="py method">
|
577
|
+
<dt class="sig sig-object py" id="spherogram.Link.digraph">
|
578
|
+
<span class="sig-name descname"><span class="pre">digraph</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.digraph" title="Link to this definition"></a></dt>
|
579
|
+
<dd><p>The underlying directed graph for the link diagram.</p>
|
580
|
+
</dd></dl>
|
581
|
+
|
582
|
+
<dl class="py method">
|
583
|
+
<dt class="sig sig-object py" id="spherogram.Link.dual_graph">
|
584
|
+
<span class="sig-name descname"><span class="pre">dual_graph</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.dual_graph" title="Link to this definition"></a></dt>
|
585
|
+
<dd><p>The dual graph to a link diagram D, whose vertices correspond to
|
586
|
+
complementary regions (faces) of D and whose edges are dual to the
|
587
|
+
edges of D.</p>
|
588
|
+
</dd></dl>
|
589
|
+
|
590
|
+
<dl class="py method">
|
591
|
+
<dt class="sig sig-object py" id="spherogram.Link.exterior">
|
592
|
+
<span class="sig-name descname"><span class="pre">exterior</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">with_hyperbolic_structure</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">remove_finite_vertices</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.exterior" title="Link to this definition"></a></dt>
|
593
|
+
<dd><p>The exterior or complement of the link L, that is, S^3 minus L.</p>
|
594
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'4_1'</span><span class="p">)</span>
|
595
|
+
<span class="gp">>>> </span><span class="n">M</span> <span class="o">=</span> <span class="n">K</span><span class="o">.</span><span class="n">exterior</span><span class="p">()</span>
|
596
|
+
<span class="gp">>>> </span><span class="n">M</span><span class="o">.</span><span class="n">volume</span><span class="p">()</span>
|
597
|
+
<span class="go">2.02988321</span>
|
598
|
+
</pre></div>
|
599
|
+
</div>
|
600
|
+
<p>By default, SnapPy will try to find a hyperbolic structure on the
|
601
|
+
exterior. To return a Triangulation instead of a Manifold, set the
|
602
|
+
flag with_hyperbolic_structure to False. If you want to get the
|
603
|
+
intermediate triangulation with extra vertices above and below the
|
604
|
+
projection plane, set the flag remove_finite_vertices to False.</p>
|
605
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">M</span> <span class="o">=</span> <span class="n">K</span><span class="o">.</span><span class="n">exterior</span><span class="p">(</span><span class="kc">False</span><span class="p">,</span> <span class="kc">False</span><span class="p">)</span>
|
606
|
+
<span class="gp">>>> </span><span class="p">(</span><span class="n">M</span><span class="o">.</span><span class="n">num_cusps</span><span class="p">(),</span> <span class="n">M</span><span class="o">.</span><span class="n">_num_fake_cusps</span><span class="p">())</span>
|
607
|
+
<span class="go">(1, 2)</span>
|
608
|
+
</pre></div>
|
609
|
+
</div>
|
610
|
+
</dd></dl>
|
611
|
+
|
612
|
+
<dl class="py method">
|
613
|
+
<dt class="sig sig-object py" id="spherogram.Link.faces">
|
614
|
+
<span class="sig-name descname"><span class="pre">faces</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.faces" title="Link to this definition"></a></dt>
|
615
|
+
<dd><p>The faces are the complementary regions of the link diagram. Each face
|
616
|
+
is given as a list of corners of crossings as one goes around
|
617
|
+
<em>clockwise</em>. These corners are recorded as CrossingStrands,
|
618
|
+
where CrossingStrand(c, j) denotes the corner of the face
|
619
|
+
abutting crossing c between strand j and j + 1.</p>
|
620
|
+
<p>Alternatively, the sequence of CrossingStrands can be regarded
|
621
|
+
as the <em>heads</em> of the oriented edges of the face.</p>
|
622
|
+
</dd></dl>
|
623
|
+
|
624
|
+
<dl class="py method">
|
625
|
+
<dt class="sig sig-object py" id="spherogram.Link.goeritz_matrix">
|
626
|
+
<span class="sig-name descname"><span class="pre">goeritz_matrix</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">return_graph</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.goeritz_matrix" title="Link to this definition"></a></dt>
|
627
|
+
<dd><p>Call self.white_graph() and return the Goeritz matrix of the result.
|
628
|
+
If the return_graph flag is set, also return the graph:</p>
|
629
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">=</span><span class="n">Link</span><span class="p">(</span><span class="s1">'4_1'</span><span class="p">)</span>
|
630
|
+
<span class="n">sage</span><span class="p">:</span> <span class="nb">abs</span><span class="p">(</span><span class="n">K</span><span class="o">.</span><span class="n">goeritz_matrix</span><span class="p">()</span><span class="o">.</span><span class="n">det</span><span class="p">())</span>
|
631
|
+
<span class="mi">5</span>
|
632
|
+
</pre></div>
|
633
|
+
</div>
|
634
|
+
</dd></dl>
|
635
|
+
|
636
|
+
<dl class="py method">
|
637
|
+
<dt class="sig sig-object py" id="spherogram.Link.is_alternating">
|
638
|
+
<span class="sig-name descname"><span class="pre">is_alternating</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.is_alternating" title="Link to this definition"></a></dt>
|
639
|
+
<dd><p>Returns whether or not this link diagram is alternating.</p>
|
640
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K9a1'</span><span class="p">)</span>
|
641
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K10n1'</span><span class="p">)</span>
|
642
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">is_alternating</span><span class="p">(),</span> <span class="n">L</span><span class="o">.</span><span class="n">is_alternating</span><span class="p">()</span>
|
643
|
+
<span class="go">(True, False)</span>
|
644
|
+
</pre></div>
|
645
|
+
</div>
|
646
|
+
<p>Of course, this is a property of the <em>diagram</em> not the isotopy
|
647
|
+
class. Here is the Hopf link with two silly extra crossings:</p>
|
648
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">T</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">4</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">),(</span><span class="mi">3</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">5</span><span class="p">),(</span><span class="mi">6</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">2</span><span class="p">),(</span><span class="mi">1</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">7</span><span class="p">)])</span>
|
649
|
+
<span class="gp">>>> </span><span class="n">T</span><span class="o">.</span><span class="n">is_alternating</span><span class="p">()</span>
|
650
|
+
<span class="go">False</span>
|
651
|
+
<span class="gp">>>> </span><span class="n">T</span><span class="o">.</span><span class="n">simplify</span><span class="p">()</span>
|
652
|
+
<span class="go">True</span>
|
653
|
+
<span class="gp">>>> </span><span class="n">T</span><span class="o">.</span><span class="n">is_alternating</span><span class="p">()</span>
|
654
|
+
<span class="go">True</span>
|
655
|
+
</pre></div>
|
656
|
+
</div>
|
657
|
+
</dd></dl>
|
658
|
+
|
659
|
+
<dl class="py method">
|
660
|
+
<dt class="sig sig-object py" id="spherogram.Link.is_planar">
|
661
|
+
<span class="sig-name descname"><span class="pre">is_planar</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.is_planar" title="Link to this definition"></a></dt>
|
662
|
+
<dd><p>Whether the 4-valent graph underlying the link projection is planar.</p>
|
663
|
+
<p>Should always be <code class="docutils literal notranslate"><span class="pre">True</span></code> for any actual Link.</p>
|
664
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">c</span> <span class="o">=</span> <span class="n">Crossing</span><span class="p">()</span>
|
665
|
+
<span class="gp">>>> </span><span class="n">c</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="n">c</span><span class="p">[</span><span class="mi">2</span><span class="p">],</span> <span class="n">c</span><span class="p">[</span><span class="mi">3</span><span class="p">]</span> <span class="c1"># Punctured torus gluing</span>
|
666
|
+
<span class="gp">>>> </span><span class="n">bad</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([</span><span class="n">c</span><span class="p">],</span> <span class="n">check_planarity</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
667
|
+
<span class="gp">>>> </span><span class="n">bad</span><span class="o">.</span><span class="n">is_planar</span><span class="p">()</span>
|
668
|
+
<span class="go">False</span>
|
669
|
+
</pre></div>
|
670
|
+
</div>
|
671
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">1</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">5</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">9</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">)])</span>
|
672
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">is_planar</span><span class="p">()</span>
|
673
|
+
<span class="go">True</span>
|
674
|
+
</pre></div>
|
675
|
+
</div>
|
676
|
+
<p>A valid split link:
|
677
|
+
>>> S = Link([(1, 1, 2, 2), (3, 3, 4, 4)])
|
678
|
+
>>> S.is_planar()
|
679
|
+
True
|
680
|
+
>>> len(S.split_link_diagram())
|
681
|
+
2</p>
|
682
|
+
<p>A split link with one component planar and the other nonplanar
|
683
|
+
>>> a, b = Crossing(), Crossing()
|
684
|
+
>>> a[0], a[2] = a[1], a[3]
|
685
|
+
>>> b[0], b[1] = b[2], b[3]
|
686
|
+
>>> N = Link([a, b], check_planarity=False)
|
687
|
+
>>> N.is_planar()
|
688
|
+
False
|
689
|
+
>>> sorted(C.is_planar() for C in N.split_link_diagram())
|
690
|
+
[False, True]</p>
|
691
|
+
</dd></dl>
|
692
|
+
|
693
|
+
<dl class="py method">
|
694
|
+
<dt class="sig sig-object py" id="spherogram.Link.jones_polynomial">
|
695
|
+
<span class="sig-name descname"><span class="pre">jones_polynomial</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">variable</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">new_convention</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.jones_polynomial" title="Link to this definition"></a></dt>
|
696
|
+
<dd><p>Returns the Jones polynomial of the link, following the
|
697
|
+
conventions of <a class="reference external" href="https://arxiv.org/abs/math/0201043">https://arxiv.org/abs/math/0201043</a></p>
|
698
|
+
<p>In particular, it obeys the oriented skein relation:</p>
|
699
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">q</span><span class="o">^</span><span class="mi">2</span> <span class="n">V</span><span class="p">(</span><span class="n">L</span><span class="o">-</span><span class="p">)</span> <span class="o">-</span> <span class="n">q</span><span class="o">^-</span><span class="mi">2</span> <span class="n">V</span><span class="p">(</span><span class="n">L</span><span class="o">+</span><span class="p">)</span> <span class="o">=</span> <span class="p">(</span><span class="n">q</span> <span class="o">-</span> <span class="n">q</span><span class="o">^-</span><span class="mi">1</span><span class="p">)</span> <span class="n">V</span><span class="p">(</span><span class="n">L0</span><span class="p">)</span>
|
700
|
+
</pre></div>
|
701
|
+
</div>
|
702
|
+
<p>and V(n-component unlink) = (q + q^-1)^(n-1).</p>
|
703
|
+
<p>WARNING: The default conventions changed in SnapPy 3.0. You
|
704
|
+
can recover the old conventions as illustrated below:</p>
|
705
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'8_5'</span><span class="p">)</span>
|
706
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">J</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">();</span> <span class="n">J</span>
|
707
|
+
<span class="mi">1</span> <span class="o">-</span> <span class="n">q</span><span class="o">^</span><span class="mi">2</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">4</span> <span class="o">-</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">6</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">8</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">10</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">12</span> <span class="o">-</span> <span class="mi">2</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">14</span> <span class="o">+</span> <span class="n">q</span><span class="o">^</span><span class="mi">16</span>
|
708
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">Jold</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">(</span><span class="n">new_convention</span><span class="o">=</span><span class="kc">False</span><span class="p">);</span> <span class="n">Jold</span>
|
709
|
+
<span class="mi">1</span> <span class="o">-</span> <span class="n">q</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">2</span> <span class="o">-</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">3</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">4</span> <span class="o">-</span> <span class="mi">4</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">5</span> <span class="o">+</span> <span class="mi">3</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">6</span> <span class="o">-</span> <span class="mi">2</span><span class="o">*</span><span class="n">q</span><span class="o">^</span><span class="mi">7</span> <span class="o">+</span> <span class="n">q</span><span class="o">^</span><span class="mi">8</span>
|
710
|
+
</pre></div>
|
711
|
+
</div>
|
712
|
+
<p>Here are the values one unlinks with 4 and 5 components:</p>
|
713
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">U4</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">braid_closure</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">])</span>
|
714
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">U5</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">braid_closure</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="o">-</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="mi">3</span><span class="p">,</span> <span class="o">-</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="o">-</span><span class="mi">4</span><span class="p">])</span>
|
715
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">U4</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">()</span><span class="o">.</span><span class="n">factor</span><span class="p">()</span>
|
716
|
+
<span class="p">(</span><span class="n">q</span><span class="o">^-</span><span class="mi">3</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">q</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span><span class="o">^</span><span class="mi">3</span>
|
717
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">U5</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">()</span><span class="o">.</span><span class="n">factor</span><span class="p">()</span>
|
718
|
+
<span class="p">(</span><span class="n">q</span><span class="o">^-</span><span class="mi">4</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">q</span><span class="o">^</span><span class="mi">2</span><span class="p">)</span><span class="o">^</span><span class="mi">4</span>
|
719
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">U4</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">(</span><span class="n">new_convention</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span><span class="o">.</span><span class="n">factor</span><span class="p">()</span>
|
720
|
+
<span class="p">(</span><span class="o">-</span><span class="n">q</span><span class="o">^-</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">q</span><span class="p">)</span><span class="o">^</span><span class="mi">3</span>
|
721
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">U5</span><span class="o">.</span><span class="n">jones_polynomial</span><span class="p">(</span><span class="n">new_convention</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span><span class="o">.</span><span class="n">factor</span><span class="p">()</span>
|
722
|
+
<span class="p">(</span><span class="n">q</span><span class="o">^-</span><span class="mi">2</span><span class="p">)</span> <span class="o">*</span> <span class="p">(</span><span class="mi">1</span> <span class="o">+</span> <span class="n">q</span><span class="p">)</span><span class="o">^</span><span class="mi">4</span>
|
723
|
+
</pre></div>
|
724
|
+
</div>
|
725
|
+
</dd></dl>
|
726
|
+
|
727
|
+
<dl class="py method">
|
728
|
+
<dt class="sig sig-object py" id="spherogram.Link.knot_floer_homology">
|
729
|
+
<span class="sig-name descname"><span class="pre">knot_floer_homology</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">prime</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">2</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">complex</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.knot_floer_homology" title="Link to this definition"></a></dt>
|
730
|
+
<dd><p>Uses Zoltán Szabó’s HFK Calculator to compute the knot Floer
|
731
|
+
homology. This also gives the Seifert genus, whether the knot
|
732
|
+
fibers, etc:</p>
|
733
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K3a1'</span><span class="p">)</span>
|
734
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">knot_floer_homology</span><span class="p">()</span>
|
735
|
+
<span class="go">{'L_space_knot': True,</span>
|
736
|
+
<span class="go"> 'epsilon': 1,</span>
|
737
|
+
<span class="go"> 'fibered': True,</span>
|
738
|
+
<span class="go"> 'modulus': 2,</span>
|
739
|
+
<span class="go"> 'nu': 1,</span>
|
740
|
+
<span class="go"> 'ranks': {(-1, -2): 1, (0, -1): 1, (1, 0): 1},</span>
|
741
|
+
<span class="go"> 'seifert_genus': 1,</span>
|
742
|
+
<span class="go"> 'tau': 1,</span>
|
743
|
+
<span class="go"> 'total_rank': 3}</span>
|
744
|
+
</pre></div>
|
745
|
+
</div>
|
746
|
+
<p>The homology itself is encoded by ‘ranks’, with the form:</p>
|
747
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">(</span><span class="n">Alexander</span> <span class="n">grading</span><span class="p">,</span> <span class="n">Maslov</span> <span class="n">grading</span><span class="p">):</span> <span class="n">dimension</span>
|
748
|
+
</pre></div>
|
749
|
+
</div>
|
750
|
+
<p>For example, here is the Conway knot, which has Alexander
|
751
|
+
polynomial 1 and genus 3:</p>
|
752
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K11n34'</span><span class="p">)</span>
|
753
|
+
<span class="gp">>>> </span><span class="n">ranks</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">knot_floer_homology</span><span class="p">()[</span><span class="s1">'ranks'</span><span class="p">]</span>
|
754
|
+
<span class="gp">>>> </span><span class="p">[(</span><span class="n">a</span><span class="p">,</span> <span class="n">m</span><span class="p">)</span> <span class="k">for</span> <span class="n">a</span><span class="p">,</span> <span class="n">m</span> <span class="ow">in</span> <span class="n">ranks</span> <span class="k">if</span> <span class="n">a</span> <span class="o">==</span> <span class="mi">3</span><span class="p">]</span>
|
755
|
+
<span class="go">[(3, 3), (3, 4)]</span>
|
756
|
+
<span class="gp">>>> </span><span class="n">ranks</span><span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">3</span><span class="p">],</span> <span class="n">ranks</span><span class="p">[</span><span class="mi">3</span><span class="p">,</span> <span class="mi">4</span><span class="p">]</span>
|
757
|
+
<span class="go">(1, 1)</span>
|
758
|
+
</pre></div>
|
759
|
+
</div>
|
760
|
+
<p>Computation is done over F_2 by default, other primes less
|
761
|
+
than 2^15 can be used instead via the optional “prime”
|
762
|
+
parameter.</p>
|
763
|
+
<p>If the parameter <cite>complex</cite> is set to True, then the simplified
|
764
|
+
“UV = 0” knot Floer chain complex is returned. This complex is
|
765
|
+
computed over the ring F[U,V]/(UV = 0), where F is the integers
|
766
|
+
mod the chosen prime; this corresponds to only the horizontal and
|
767
|
+
vertical arrows in the full knot Floer complex. The complex is
|
768
|
+
specified by:</p>
|
769
|
+
<ul class="simple">
|
770
|
+
<li><p>generators: a dictionary from the generator names to their
|
771
|
+
(Alexander, Maslov) gradings. The number of generators is
|
772
|
+
equal to the total_rank.</p></li>
|
773
|
+
<li><p>differential: a dictionary whose value on (a, b) is an integer
|
774
|
+
specifying the coefficient on the differential from generator a
|
775
|
+
to generator b, where only nonzero differentials are
|
776
|
+
recorded. (The coefficient on the differential is really an
|
777
|
+
element of F[U,V]/(UV = 0), but the power of U or V can be
|
778
|
+
recovered from the gradings on a and b so only the element of F
|
779
|
+
is recorded.)</p></li>
|
780
|
+
</ul>
|
781
|
+
<p>For example, to compute the vertical differential, whose homology
|
782
|
+
is HFhat(S^3), you can do:</p>
|
783
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">data</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">knot_floer_homology</span><span class="p">(</span><span class="n">prime</span><span class="o">=</span><span class="mi">31991</span><span class="p">,</span> <span class="nb">complex</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
784
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">gens</span><span class="p">,</span> <span class="n">diff</span> <span class="o">=</span> <span class="n">data</span><span class="p">[</span><span class="s1">'generators'</span><span class="p">],</span> <span class="n">data</span><span class="p">[</span><span class="s1">'differentials'</span><span class="p">]</span>
|
785
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">vert</span> <span class="o">=</span> <span class="p">{(</span><span class="n">i</span><span class="p">,</span><span class="n">j</span><span class="p">):</span><span class="n">diff</span><span class="p">[</span><span class="n">i</span><span class="p">,</span> <span class="n">j</span><span class="p">]</span> <span class="k">for</span> <span class="n">i</span><span class="p">,</span> <span class="n">j</span> <span class="ow">in</span> <span class="n">diff</span>
|
786
|
+
<span class="o">...</span> <span class="k">if</span> <span class="n">gens</span><span class="p">[</span><span class="n">i</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="o">==</span> <span class="n">gens</span><span class="p">[</span><span class="n">j</span><span class="p">][</span><span class="mi">1</span><span class="p">]</span> <span class="o">+</span> <span class="mi">1</span><span class="p">}</span>
|
787
|
+
<span class="n">sage</span><span class="p">:</span> <span class="kn">from</span> <span class="nn">sage.all</span> <span class="kn">import</span> <span class="n">matrix</span><span class="p">,</span> <span class="n">GF</span>
|
788
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">matrix</span><span class="p">(</span><span class="n">GF</span><span class="p">(</span><span class="mi">31991</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">gens</span><span class="p">),</span> <span class="nb">len</span><span class="p">(</span><span class="n">gens</span><span class="p">),</span> <span class="n">vert</span><span class="p">,</span> <span class="n">sparse</span><span class="o">=</span><span class="kc">True</span><span class="p">)</span>
|
789
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">*</span><span class="n">M</span> <span class="o">==</span> <span class="mi">0</span>
|
790
|
+
<span class="kc">True</span>
|
791
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">.</span><span class="n">right_kernel</span><span class="p">()</span><span class="o">.</span><span class="n">rank</span><span class="p">()</span> <span class="o">-</span> <span class="n">M</span><span class="o">.</span><span class="n">rank</span><span class="p">()</span>
|
792
|
+
<span class="mi">1</span>
|
793
|
+
</pre></div>
|
794
|
+
</div>
|
795
|
+
</dd></dl>
|
796
|
+
|
797
|
+
<dl class="py method">
|
798
|
+
<dt class="sig sig-object py" id="spherogram.Link.knot_group">
|
799
|
+
<span class="sig-name descname"><span class="pre">knot_group</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.knot_group" title="Link to this definition"></a></dt>
|
800
|
+
<dd><p>Computes the knot group using the Wirtinger presentation.</p>
|
801
|
+
<p>Returns a finitely presented group:</p>
|
802
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>sage: K = Link('3_1')
|
803
|
+
sage: G = K.knot_group()
|
804
|
+
sage: type(G)
|
805
|
+
<class 'sage.groups.finitely_presented.FinitelyPresentedGroup_with_category'>
|
806
|
+
</pre></div>
|
807
|
+
</div>
|
808
|
+
</dd></dl>
|
809
|
+
|
810
|
+
<dl class="py method">
|
811
|
+
<dt class="sig sig-object py" id="spherogram.Link.linking_matrix">
|
812
|
+
<span class="sig-name descname"><span class="pre">linking_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.linking_matrix" title="Link to this definition"></a></dt>
|
813
|
+
<dd><p>Calculates the linking number for each pair of link components.</p>
|
814
|
+
<p>Returns a linking matrix, in which the (i,j)th component is the
|
815
|
+
linking number of the ith and jth link components.</p>
|
816
|
+
</dd></dl>
|
817
|
+
|
818
|
+
<dl class="py method">
|
819
|
+
<dt class="sig sig-object py" id="spherogram.Link.linking_number">
|
820
|
+
<span class="sig-name descname"><span class="pre">linking_number</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.linking_number" title="Link to this definition"></a></dt>
|
821
|
+
<dd><p>Returns the linking number of self if self has two components;
|
822
|
+
or the sum of the linking numbers of all pairs of components
|
823
|
+
in general.</p>
|
824
|
+
</dd></dl>
|
825
|
+
|
826
|
+
<dl class="py method">
|
827
|
+
<dt class="sig sig-object py" id="spherogram.Link.mirror">
|
828
|
+
<span class="sig-name descname"><span class="pre">mirror</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.mirror" title="Link to this definition"></a></dt>
|
829
|
+
<dd><p>Returns the mirror image of the link, preserving link orientations and
|
830
|
+
component order.</p>
|
831
|
+
</dd></dl>
|
832
|
+
|
833
|
+
<dl class="py method">
|
834
|
+
<dt class="sig sig-object py" id="spherogram.Link.morse_diagram">
|
835
|
+
<span class="sig-name descname"><span class="pre">morse_diagram</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.morse_diagram" title="Link to this definition"></a></dt>
|
836
|
+
<dd><p>Returns a MorseLinkDiagram of this link diagram, that is a choice
|
837
|
+
of height function which realizes the Morse number:</p>
|
838
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L8n2'</span><span class="p">)</span>
|
839
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">D</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">morse_diagram</span><span class="p">()</span>
|
840
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">D</span><span class="o">.</span><span class="n">morse_number</span> <span class="o">==</span> <span class="n">L</span><span class="o">.</span><span class="n">morse_number</span><span class="p">()</span>
|
841
|
+
<span class="kc">True</span>
|
842
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">D</span><span class="o">.</span><span class="n">is_bridge</span><span class="p">()</span>
|
843
|
+
<span class="kc">True</span>
|
844
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">B</span> <span class="o">=</span> <span class="n">D</span><span class="o">.</span><span class="n">bridge</span><span class="p">()</span>
|
845
|
+
<span class="n">sage</span><span class="p">:</span> <span class="nb">len</span><span class="p">(</span><span class="n">B</span><span class="o">.</span><span class="n">bohua_code</span><span class="p">())</span>
|
846
|
+
<span class="mi">64</span>
|
847
|
+
</pre></div>
|
848
|
+
</div>
|
849
|
+
</dd></dl>
|
850
|
+
|
851
|
+
<dl class="py method">
|
852
|
+
<dt class="sig sig-object py" id="spherogram.Link.morse_number">
|
853
|
+
<span class="sig-name descname"><span class="pre">morse_number</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">solver</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'GLPK'</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.morse_number" title="Link to this definition"></a></dt>
|
854
|
+
<dd><p>The <em>Morse number</em> of a planar link diagram D is</p>
|
855
|
+
<blockquote>
|
856
|
+
<div><p>m(D) = min { # of maxima of h on D }</p>
|
857
|
+
</div></blockquote>
|
858
|
+
<p>where h is a height function on R^2 which is generic on D; alternatively,
|
859
|
+
this is the minimum number of cups/caps in a <a class="reference external" href="http://katlas.math.toronto.edu/wiki/MorseLink_Presentations">MorseLink presentation</a>
|
860
|
+
of the diagram D. The Morse number is very closely related to the more
|
861
|
+
traditional bridge number. Examples:</p>
|
862
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'5_2'</span><span class="p">)</span>
|
863
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">morse_number</span><span class="p">()</span>
|
864
|
+
<span class="mi">2</span>
|
865
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'6^3_2'</span><span class="p">)</span><span class="o">.</span><span class="n">morse_number</span><span class="p">()</span>
|
866
|
+
<span class="mi">3</span>
|
867
|
+
</pre></div>
|
868
|
+
</div>
|
869
|
+
</dd></dl>
|
870
|
+
|
871
|
+
<dl class="py method">
|
872
|
+
<dt class="sig sig-object py" id="spherogram.Link.optimize_overcrossings">
|
873
|
+
<span class="sig-name descname"><span class="pre">optimize_overcrossings</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.optimize_overcrossings" title="Link to this definition"></a></dt>
|
874
|
+
<dd><p>Minimizes the number of crossings of a strand which crosses entirely
|
875
|
+
above the diagram by finding the path crossing over the diagram with
|
876
|
+
the least number of overcrossings. It begins with the longest
|
877
|
+
overcrossing, and continues with smaller ones until it successfully
|
878
|
+
reduces the number of crossings. Returns number of crossings removed.</p>
|
879
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">10</span><span class="p">,</span> <span class="mi">4</span><span class="p">,</span> <span class="mi">11</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span>
|
880
|
+
<span class="gp">... </span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">8</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span>
|
881
|
+
<span class="gp">... </span> <span class="p">(</span><span class="mi">8</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">9</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span>
|
882
|
+
<span class="gp">... </span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">5</span><span class="p">,</span> <span class="mi">9</span><span class="p">),</span>
|
883
|
+
<span class="gp">... </span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">7</span><span class="p">),</span>
|
884
|
+
<span class="gp">... </span> <span class="p">(</span><span class="mi">11</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">6</span><span class="p">,</span> <span class="mi">1</span><span class="p">)])</span>
|
885
|
+
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">L</span><span class="p">)</span>
|
886
|
+
<span class="go">6</span>
|
887
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="n">mode</span><span class="o">=</span><span class="s1">'level'</span><span class="p">)</span>
|
888
|
+
<span class="go">False</span>
|
889
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">optimize_overcrossings</span><span class="p">()</span>
|
890
|
+
<span class="go">1</span>
|
891
|
+
</pre></div>
|
892
|
+
</div>
|
893
|
+
</dd></dl>
|
894
|
+
|
895
|
+
<dl class="py method">
|
896
|
+
<dt class="sig sig-object py" id="spherogram.Link.overstrands">
|
897
|
+
<span class="sig-name descname"><span class="pre">overstrands</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.overstrands" title="Link to this definition"></a></dt>
|
898
|
+
<dd><p>Returns a list of the sequences of overcrossings (which are lists of
|
899
|
+
CrossingEntryPoints), sorted in descending order of length.</p>
|
900
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L14n1000'</span><span class="p">)</span>
|
901
|
+
<span class="gp">>>> </span><span class="nb">len</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">overstrands</span><span class="p">()[</span><span class="mi">0</span><span class="p">])</span>
|
902
|
+
<span class="go">3</span>
|
903
|
+
</pre></div>
|
904
|
+
</div>
|
905
|
+
</dd></dl>
|
906
|
+
|
907
|
+
<dl class="py method">
|
908
|
+
<dt class="sig sig-object py" id="spherogram.Link.peer_code">
|
909
|
+
<span class="sig-name descname"><span class="pre">peer_code</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.peer_code" title="Link to this definition"></a></dt>
|
910
|
+
<dd></dd></dl>
|
911
|
+
|
912
|
+
<dl class="py method">
|
913
|
+
<dt class="sig sig-object py" id="spherogram.Link.sage_link">
|
914
|
+
<span class="sig-name descname"><span class="pre">sage_link</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.sage_link" title="Link to this definition"></a></dt>
|
915
|
+
<dd><p>Convert to a SageMath Knot or Link:</p>
|
916
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K10n11'</span><span class="p">)</span> <span class="c1"># Spherogram link</span>
|
917
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">sage_link</span><span class="p">();</span> <span class="n">K</span>
|
918
|
+
<span class="n">Knot</span> <span class="n">represented</span> <span class="n">by</span> <span class="mi">10</span> <span class="n">crossings</span>
|
919
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">()</span><span class="o">/</span><span class="n">K</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">()</span> <span class="c1"># Agree up to units</span>
|
920
|
+
<span class="o">-</span><span class="n">t</span><span class="o">^</span><span class="mi">3</span>
|
921
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">(),</span> <span class="n">K</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
922
|
+
<span class="p">(</span><span class="o">-</span><span class="mi">4</span><span class="p">,</span> <span class="o">-</span><span class="mi">4</span><span class="p">)</span>
|
923
|
+
</pre></div>
|
924
|
+
</div>
|
925
|
+
<p>Can also go the other way:</p>
|
926
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K11n11'</span><span class="p">)</span>
|
927
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">sage_link</span><span class="p">())</span>
|
928
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">(),</span> <span class="n">M</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
929
|
+
<span class="p">(</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span> <span class="o">-</span><span class="mi">2</span><span class="p">)</span>
|
930
|
+
</pre></div>
|
931
|
+
</div>
|
932
|
+
<p>Can also take a braid group perspective.</p>
|
933
|
+
<blockquote>
|
934
|
+
<div><p>sage: B = BraidGroup(4)
|
935
|
+
sage: a, b, c = B.gens()
|
936
|
+
sage: Link(braid_closure=(a**-3) * (b**4) * (c**2) * a * b * c )
|
937
|
+
<Link: 2 comp; 12 cross>
|
938
|
+
sage: L = Link(a * b * c); L
|
939
|
+
<Link: 1 comp; 3 cross>
|
940
|
+
sage: S = L.sage_link(); S
|
941
|
+
Knot represented by 3 crossings
|
942
|
+
sage: Link(S)
|
943
|
+
<Link: 1 comp; 3 cross></p>
|
944
|
+
</div></blockquote>
|
945
|
+
</dd></dl>
|
946
|
+
|
947
|
+
<dl class="py method">
|
948
|
+
<dt class="sig sig-object py" id="spherogram.Link.seifert_matrix">
|
949
|
+
<span class="sig-name descname"><span class="pre">seifert_matrix</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.seifert_matrix" title="Link to this definition"></a></dt>
|
950
|
+
<dd><p>Returns the Seifert matrix of the link:</p>
|
951
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K10n11'</span><span class="p">)</span>
|
952
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">A</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">seifert_matrix</span><span class="p">()</span>
|
953
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">alex</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">alexander_polynomial</span><span class="p">()</span>
|
954
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">t</span> <span class="o">=</span> <span class="n">alex</span><span class="o">.</span><span class="n">parent</span><span class="p">()</span><span class="o">.</span><span class="n">gen</span><span class="p">()</span>
|
955
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">B</span> <span class="o">=</span> <span class="n">t</span><span class="o">*</span><span class="n">A</span> <span class="o">-</span> <span class="n">A</span><span class="o">.</span><span class="n">transpose</span><span class="p">()</span>
|
956
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">t</span><span class="o">**</span><span class="mi">4</span> <span class="o">*</span> <span class="n">alex</span> <span class="o">==</span> <span class="o">-</span><span class="n">B</span><span class="o">.</span><span class="n">det</span><span class="p">()</span>
|
957
|
+
<span class="kc">True</span>
|
958
|
+
</pre></div>
|
959
|
+
</div>
|
960
|
+
<p>Uses the algorithm described in</p>
|
961
|
+
<p>J. Collins, “An algorithm for computing the Seifert matrix of a link
|
962
|
+
from a braid representation.” (2007).</p>
|
963
|
+
<p>after first making the link isotopic to a braid closure.</p>
|
964
|
+
</dd></dl>
|
965
|
+
|
966
|
+
<dl class="py method">
|
967
|
+
<dt class="sig sig-object py" id="spherogram.Link.signature">
|
968
|
+
<span class="sig-name descname"><span class="pre">signature</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">new_convention</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">True</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.signature" title="Link to this definition"></a></dt>
|
969
|
+
<dd><p>Returns the signature of the link, computed from the Goeritz matrix using
|
970
|
+
the algorithm of Gordon and Litherland:</p>
|
971
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'4a1'</span><span class="p">)</span>
|
972
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
973
|
+
<span class="mi">0</span>
|
974
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'9^3_12'</span><span class="p">)</span>
|
975
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">Lbar</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">mirror</span><span class="p">()</span>
|
976
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span> <span class="o">+</span> <span class="n">Lbar</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
977
|
+
<span class="mi">0</span>
|
978
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">braid_closure</span><span class="o">=</span><span class="p">[</span><span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">2</span><span class="p">])</span>
|
979
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">M</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
980
|
+
<span class="o">-</span><span class="mi">6</span>
|
981
|
+
</pre></div>
|
982
|
+
</div>
|
983
|
+
<p>SnapPy 3.0 switched the sign convention for the signature so
|
984
|
+
that “positive knots have negative signatures”. You can
|
985
|
+
recover the previous default by:</p>
|
986
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'3a1'</span><span class="p">)</span>
|
987
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">()</span>
|
988
|
+
<span class="o">-</span><span class="mi">2</span>
|
989
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">L</span><span class="o">.</span><span class="n">signature</span><span class="p">(</span><span class="n">new_convention</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
990
|
+
<span class="mi">2</span>
|
991
|
+
</pre></div>
|
992
|
+
</div>
|
993
|
+
</dd></dl>
|
994
|
+
|
995
|
+
<dl class="py method">
|
996
|
+
<dt class="sig sig-object py" id="spherogram.Link.simplify">
|
997
|
+
<span class="sig-name descname"><span class="pre">simplify</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">mode</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">'basic'</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">type_III_limit</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">100</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.simplify" title="Link to this definition"></a></dt>
|
998
|
+
<dd><p>Tries to simplify the link projection. Returns whether it succeeded
|
999
|
+
in reducing the number of crossings. Modifies the link in
|
1000
|
+
place, and unknot components which are also unlinked may be
|
1001
|
+
silently discarded. The ordering of <code class="docutils literal notranslate"><span class="pre">link_components</span></code> is not
|
1002
|
+
always preserved.</p>
|
1003
|
+
<p>The following strategies can be employed.</p>
|
1004
|
+
<ol class="arabic simple">
|
1005
|
+
<li><p>In the default <code class="docutils literal notranslate"><span class="pre">basic</span></code> mode, it does Reidemeister I and II moves
|
1006
|
+
until none are possible.</p></li>
|
1007
|
+
<li><p>In <code class="docutils literal notranslate"><span class="pre">level</span></code> mode, it does random Reidemeister III moves, reducing
|
1008
|
+
the number of crossings via type I and II moves whenever possible.
|
1009
|
+
The process stops when it has done <code class="docutils literal notranslate"><span class="pre">type_III_limit</span></code> <em>consecutive</em>
|
1010
|
+
type III moves without any simplification.</p></li>
|
1011
|
+
<li><p>In <code class="docutils literal notranslate"><span class="pre">pickup</span></code> mode, it also minimizes the number of crossings of
|
1012
|
+
strands which cross entirely above (or below) the diagram by
|
1013
|
+
finding the path crossing over the diagram with the least number of
|
1014
|
+
overcrossings (or undercrossings); this has the effect of doing
|
1015
|
+
“picking up” strands and putting them down elsewhere.</p></li>
|
1016
|
+
<li><p>Finally, the <code class="docutils literal notranslate"><span class="pre">global</span></code> mode is the combination of 2 and 3.</p></li>
|
1017
|
+
</ol>
|
1018
|
+
<p>Some examples:</p>
|
1019
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">13</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">11</span><span class="p">),</span> <span class="p">(</span><span class="mi">11</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">13</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">12</span><span class="p">),</span>
|
1020
|
+
<span class="gp">... </span><span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">8</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">8</span><span class="p">)])</span>
|
1021
|
+
<span class="gp">>>> </span><span class="n">K</span>
|
1022
|
+
<span class="go"><Link: 1 comp; 7 cross></span>
|
1023
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="s1">'basic'</span><span class="p">)</span>
|
1024
|
+
<span class="go">True</span>
|
1025
|
+
<span class="gp">>>> </span><span class="n">K</span>
|
1026
|
+
<span class="go"><Link: 1 comp; 4 cross></span>
|
1027
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="s1">'basic'</span><span class="p">)</span> <span class="c1"># Already done all it can</span>
|
1028
|
+
<span class="go">False</span>
|
1029
|
+
</pre></div>
|
1030
|
+
</div>
|
1031
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">5</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">1</span><span class="p">),</span> <span class="p">(</span><span class="mi">14</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">15</span><span class="p">,</span><span class="mi">4</span><span class="p">),</span> <span class="p">(</span><span class="mi">10</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">11</span><span class="p">,</span><span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">11</span><span class="p">),</span>
|
1032
|
+
<span class="gp">... </span><span class="p">(</span><span class="mi">17</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">9</span><span class="p">),</span> <span class="p">(</span><span class="mi">12</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">13</span><span class="p">,</span><span class="mi">8</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">13</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">10</span><span class="p">),</span> <span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">16</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">15</span><span class="p">),</span> <span class="p">(</span><span class="mi">16</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">17</span><span class="p">,</span><span class="mi">7</span><span class="p">)])</span>
|
1033
|
+
<span class="gp">>>> </span><span class="n">L</span>
|
1034
|
+
<span class="go"><Link: 3 comp; 9 cross></span>
|
1035
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="s1">'basic'</span><span class="p">)</span>
|
1036
|
+
<span class="go">False</span>
|
1037
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="s1">'level'</span><span class="p">)</span>
|
1038
|
+
<span class="go">True</span>
|
1039
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="c1"># Trivial unlinked component has been discarded!</span>
|
1040
|
+
<span class="go"><Link: 2 comp; 2 cross></span>
|
1041
|
+
</pre></div>
|
1042
|
+
</div>
|
1043
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'K14n2345'</span><span class="p">)</span>
|
1044
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">backtrack</span><span class="p">(</span><span class="mi">30</span><span class="p">)</span>
|
1045
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">simplify</span><span class="p">(</span><span class="s1">'global'</span><span class="p">)</span>
|
1046
|
+
<span class="go">True</span>
|
1047
|
+
</pre></div>
|
1048
|
+
</div>
|
1049
|
+
</dd></dl>
|
1050
|
+
|
1051
|
+
<dl class="py method">
|
1052
|
+
<dt class="sig sig-object py" id="spherogram.Link.split_link_diagram">
|
1053
|
+
<span class="sig-name descname"><span class="pre">split_link_diagram</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">destroy_original</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.split_link_diagram" title="Link to this definition"></a></dt>
|
1054
|
+
<dd><p>Breaks the given link diagram into pieces, one for each connected
|
1055
|
+
component of the underlying 4-valent graph.</p>
|
1056
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">([(</span><span class="mi">2</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">4</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">)],</span> <span class="n">check_planarity</span><span class="o">=</span><span class="kc">False</span><span class="p">)</span>
|
1057
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">split_link_diagram</span><span class="p">()</span>
|
1058
|
+
<span class="go">[<Link: 1 comp; 1 cross>, <Link: 1 comp; 1 cross>]</span>
|
1059
|
+
</pre></div>
|
1060
|
+
</div>
|
1061
|
+
</dd></dl>
|
1062
|
+
|
1063
|
+
<dl class="py method">
|
1064
|
+
<dt class="sig sig-object py" id="spherogram.Link.sublink">
|
1065
|
+
<span class="sig-name descname"><span class="pre">sublink</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">components</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.sublink" title="Link to this definition"></a></dt>
|
1066
|
+
<dd><p>Returns the sublink consisting of the specified components; see the
|
1067
|
+
example below for the various accepted forms.</p>
|
1068
|
+
<p>Warnings: Components in the sublink that are both unknotted
|
1069
|
+
and unlinked may be silently thrown away. The order of the
|
1070
|
+
components in the sublink need not correspond to their order
|
1071
|
+
in the original link.</p>
|
1072
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="s1">'L14n64110'</span><span class="p">)</span>
|
1073
|
+
<span class="gp">>>> </span><span class="n">L</span>
|
1074
|
+
<span class="go"><Link L14n64110: 5 comp; 14 cross></span>
|
1075
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">sublink</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">4</span><span class="p">])</span>
|
1076
|
+
<span class="go"><Link: 4 comp; 10 cross></span>
|
1077
|
+
<span class="gp">>>> </span><span class="n">comps</span> <span class="o">=</span> <span class="n">L</span><span class="o">.</span><span class="n">link_components</span>
|
1078
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">sublink</span><span class="p">([</span><span class="n">comps</span><span class="p">[</span><span class="mi">0</span><span class="p">],</span> <span class="n">comps</span><span class="p">[</span><span class="mi">1</span><span class="p">]])</span>
|
1079
|
+
<span class="go"><Link: 2 comp; 2 cross></span>
|
1080
|
+
</pre></div>
|
1081
|
+
</div>
|
1082
|
+
<p>If you just want one component you can do this:</p>
|
1083
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">L11a127</span> <span class="o">=</span> <span class="p">[(</span><span class="mi">17</span><span class="p">,</span><span class="mi">9</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">8</span><span class="p">),</span> <span class="p">(</span><span class="mi">7</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">13</span><span class="p">),</span> <span class="p">(</span><span class="mi">9</span><span class="p">,</span><span class="mi">17</span><span class="p">,</span><span class="mi">10</span><span class="p">,</span><span class="mi">16</span><span class="p">),</span> <span class="p">(</span><span class="mi">11</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">12</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span>
|
1084
|
+
<span class="gp">... </span><span class="p">(</span><span class="mi">19</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">15</span><span class="p">),</span> <span class="p">(</span><span class="mi">21</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">18</span><span class="p">,</span><span class="mi">5</span><span class="p">),</span> <span class="p">(</span><span class="mi">5</span><span class="p">,</span><span class="mi">18</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">19</span><span class="p">),</span> <span class="p">(</span><span class="mi">15</span><span class="p">,</span><span class="mi">20</span><span class="p">,</span><span class="mi">16</span><span class="p">,</span><span class="mi">21</span><span class="p">),</span> <span class="p">(</span><span class="mi">3</span><span class="p">,</span><span class="mi">11</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">10</span><span class="p">),</span>
|
1085
|
+
<span class="gp">... </span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">6</span><span class="p">,</span><span class="mi">2</span><span class="p">,</span><span class="mi">7</span><span class="p">),</span> <span class="p">(</span><span class="mi">13</span><span class="p">,</span><span class="mi">0</span><span class="p">,</span><span class="mi">14</span><span class="p">,</span><span class="mi">1</span><span class="p">)]</span>
|
1086
|
+
<span class="gp">>>> </span><span class="n">L</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span><span class="n">L11a127</span><span class="p">)</span>
|
1087
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">sublink</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
|
1088
|
+
<span class="go"><Link: 1 comp; 7 cross></span>
|
1089
|
+
<span class="gp">>>> </span><span class="n">L</span><span class="o">.</span><span class="n">sublink</span><span class="p">(</span><span class="n">L</span><span class="o">.</span><span class="n">link_components</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span>
|
1090
|
+
<span class="go"><Link: 0 comp; 0 cross></span>
|
1091
|
+
</pre></div>
|
1092
|
+
</div>
|
1093
|
+
<p>The last answer is empty because the second component is unknotted.</p>
|
1094
|
+
</dd></dl>
|
1095
|
+
|
1096
|
+
<dl class="py method">
|
1097
|
+
<dt class="sig sig-object py" id="spherogram.Link.view">
|
1098
|
+
<span class="sig-name descname"><span class="pre">view</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">viewer</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em>, <em class="sig-param"><span class="n"><span class="pre">show_crossing_labels</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">False</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.view" title="Link to this definition"></a></dt>
|
1099
|
+
<dd><p>Opens a Plink link viewer window displaying the current link.
|
1100
|
+
The strands of the links are unions of edges in the standard
|
1101
|
+
integer grid, following the work of <a class="reference external" href="https://dx.doi.org/10.1137/0216030">Tamassia</a> and <a class="reference external" href="ftp://ftp.cs.brown.edu/pub/techreports/99/cs99-04.pdf">Bridgeman
|
1102
|
+
et. al.</a></p>
|
1103
|
+
</dd></dl>
|
1104
|
+
|
1105
|
+
<dl class="py method">
|
1106
|
+
<dt class="sig sig-object py" id="spherogram.Link.white_graph">
|
1107
|
+
<span class="sig-name descname"><span class="pre">white_graph</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.white_graph" title="Link to this definition"></a></dt>
|
1108
|
+
<dd><p>Return the white graph of a non-split link projection.</p>
|
1109
|
+
<p>This method generates a multigraph whose vertices correspond
|
1110
|
+
to the faces of the diagram, with an edge joining two
|
1111
|
+
vertices whenever the corresponding faces contain opposite
|
1112
|
+
corners at some crossing. To avoid hashability issues, the
|
1113
|
+
vertex corresponding to a face is the index of the face in the
|
1114
|
+
list returned by Link.faces().</p>
|
1115
|
+
<p>According to the conventions of “Gordon, C. McA. and
|
1116
|
+
Litherland, R. A, ‘On the signature of a link’, Inventiones
|
1117
|
+
math. 47, 23-69 (1978)”, in a checkerboard coloring of a link
|
1118
|
+
diagram the unbounded region is always the first white region.
|
1119
|
+
Of course, the choice of which region is unbounded is
|
1120
|
+
arbitrary; it is just a matter of which region on S^2 contains
|
1121
|
+
the point at infinity. In this method an equivalent arbitrary
|
1122
|
+
choice is made by just returning the second component of the
|
1123
|
+
multigraph, as determined by Graph.connected_components().
|
1124
|
+
(Empirically, the second component tends to be smaller than
|
1125
|
+
the first.)</p>
|
1126
|
+
<p>Note that this may produce a meaningless result in the case of
|
1127
|
+
a split link diagram. Consequently if the diagram is split,
|
1128
|
+
i.e if the multigraph has more than 2 components, a ValueError
|
1129
|
+
is raised:</p>
|
1130
|
+
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">=</span><span class="n">Link</span><span class="p">(</span><span class="s1">'5_1'</span><span class="p">)</span>
|
1131
|
+
<span class="n">sage</span><span class="p">:</span> <span class="n">K</span><span class="o">.</span><span class="n">white_graph</span><span class="p">()</span>
|
1132
|
+
<span class="n">Subgraph</span> <span class="n">of</span> <span class="p">():</span> <span class="n">Multi</span><span class="o">-</span><span class="n">graph</span> <span class="n">on</span> <span class="mi">2</span> <span class="n">vertices</span>
|
1133
|
+
</pre></div>
|
1134
|
+
</div>
|
1135
|
+
<p>WARNING: While there is also a “black_graph” method, it need
|
1136
|
+
not be the case that these two graphs are complementary in the
|
1137
|
+
expected way.</p>
|
1138
|
+
</dd></dl>
|
1139
|
+
|
1140
|
+
<dl class="py method">
|
1141
|
+
<dt class="sig sig-object py" id="spherogram.Link.writhe">
|
1142
|
+
<span class="sig-name descname"><span class="pre">writhe</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.Link.writhe" title="Link to this definition"></a></dt>
|
1143
|
+
<dd><p>Finds the writhe of a knot.</p>
|
1144
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">K</span> <span class="o">=</span> <span class="n">Link</span><span class="p">(</span> <span class="p">[(</span><span class="mi">4</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="mi">6</span><span class="p">,</span><span class="mi">4</span><span class="p">,</span><span class="mi">7</span><span class="p">,</span><span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="mi">8</span><span class="p">,</span><span class="mi">5</span><span class="p">,</span><span class="mi">1</span><span class="p">,</span><span class="mi">6</span><span class="p">),</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">8</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">7</span><span class="p">)]</span> <span class="p">)</span> <span class="c1"># Figure 8 knot</span>
|
1145
|
+
<span class="gp">>>> </span><span class="n">K</span><span class="o">.</span><span class="n">writhe</span><span class="p">()</span>
|
1146
|
+
<span class="go">0</span>
|
1147
|
+
</pre></div>
|
1148
|
+
</div>
|
1149
|
+
</dd></dl>
|
1150
|
+
|
1151
|
+
</dd></dl>
|
1152
|
+
|
1153
|
+
</section>
|
1154
|
+
<section id="the-closedbraid-class">
|
1155
|
+
<h2>The ClosedBraid class<a class="headerlink" href="#the-closedbraid-class" title="Link to this heading"></a></h2>
|
1156
|
+
<p>The ClosedBraid class provides an alternative way to construct links
|
1157
|
+
as closed braids. It is a subclass of Link, and currently defines
|
1158
|
+
the same methods and attributes.</p>
|
1159
|
+
<dl class="py class">
|
1160
|
+
<dt class="sig sig-object py" id="spherogram.ClosedBraid">
|
1161
|
+
<em class="property"><span class="pre">class</span><span class="w"> </span></em><span class="sig-prename descclassname"><span class="pre">spherogram.</span></span><span class="sig-name descname"><span class="pre">ClosedBraid</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="o"><span class="pre">*</span></span><span class="n"><span class="pre">args</span></span></em>, <em class="sig-param"><span class="o"><span class="pre">**</span></span><span class="n"><span class="pre">kwargs</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#spherogram.ClosedBraid" title="Link to this definition"></a></dt>
|
1162
|
+
<dd><p>This is a convenience class for constructing closed braids.</p>
|
1163
|
+
<p>The constructor accepts either a single argument, which should be a list of
|
1164
|
+
integers to be passed to the Link constructor as the braid_closure
|
1165
|
+
parameter, or one or more integer arguments which will be packaged as a list
|
1166
|
+
and used as the braid_closure parameter.</p>
|
1167
|
+
<div class="doctest highlight-default notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">B</span> <span class="o">=</span> <span class="n">ClosedBraid</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span>
|
1168
|
+
<span class="gp">>>> </span><span class="n">B</span>
|
1169
|
+
<span class="go">ClosedBraid(1, -2, 3)</span>
|
1170
|
+
<span class="gp">>>> </span><span class="n">B</span> <span class="o">=</span> <span class="n">ClosedBraid</span><span class="p">([</span><span class="mi">1</span><span class="p">,</span><span class="o">-</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">]</span><span class="o">*</span><span class="mi">3</span><span class="p">)</span>
|
1171
|
+
<span class="gp">>>> </span><span class="n">B</span>
|
1172
|
+
<span class="go">ClosedBraid(1, -2, 3, 1, -2, 3, 1, -2, 3)</span>
|
1173
|
+
</pre></div>
|
1174
|
+
</div>
|
1175
|
+
</dd></dl>
|
1176
|
+
|
1177
|
+
</section>
|
1178
|
+
</section>
|
1179
|
+
|
1180
|
+
|
1181
|
+
</div>
|
1182
|
+
</div>
|
1183
|
+
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
|
1184
|
+
<a href="plink.html" class="btn btn-neutral float-left" title="Using SnapPy’s link editor" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
|
1185
|
+
<a href="snap.html" class="btn btn-neutral float-right" title="Number theory of hyperbolic 3-manifolds" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
|
1186
|
+
</div>
|
1187
|
+
|
1188
|
+
<hr/>
|
1189
|
+
|
1190
|
+
<div role="contentinfo">
|
1191
|
+
<p>© Copyright 2009-2025, by Marc Culler, Nathan Dunfield, Matthias Goerner, Jeffrey Weeks and others.</p>
|
1192
|
+
</div>
|
1193
|
+
|
1194
|
+
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
|
1195
|
+
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
|
1196
|
+
provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
1197
|
+
|
1198
|
+
|
1199
|
+
</footer>
|
1200
|
+
</div>
|
1201
|
+
</div>
|
1202
|
+
</section>
|
1203
|
+
</div>
|
1204
|
+
<script>
|
1205
|
+
jQuery(function () {
|
1206
|
+
SphinxRtdTheme.Navigation.enable(true);
|
1207
|
+
});
|
1208
|
+
</script>
|
1209
|
+
|
1210
|
+
</body>
|
1214
1211
|
</html>
|