Skip to main content

Python wrapper for Zoltán Szabó's HFK Calculator

Project description

Python wrapper for Zoltán Szabó’s HFK Calculator.

Installing

To install and test, do the following to install the current release from PyPI:

python3 -m pip install knot_floer_homology
python3 -m knot_floer_homology.test

You should see a result such as TestResults(failed=0, attempted=24).

Usage

In Python, do:

>>> import knot_floer_homology
>>> PD = [(2,0,3,15),(0,6,1,5),(6,2,7,1),(3,10,4,11),(9,4,10,5),(7,12,8,13),(13,8,14,9),(11,14,12,15)]
>>> knot_floer_homology.pd_to_hfk(PD)
{'L_space_knot': False,
 'epsilon': 0,
 'fibered': True,
 'modulus': 2,
 'nu': 0,
 'ranks': {(-2, -2): 1, (-1, -1): 2, (0, 0): 3, (1, 1): 2, (2, 2): 1},
 'seifert_genus': 2,
 'tau': 0,
 'total_rank': 9}

It also accepts Spherogram knots as input:

>>> import spherogram
>>> L = spherogram.Link('K10n10')
>>> ans = knot_floer_homology.pd_to_hfk(L)
>>> ans['seifert_genus']
3

License

Copyright Zoltán Szabó, Marc Culler, Nathan M. Dunfield, and Matthias Goerner, 2017-present. This code is released under the GNU General Public License, version 2 or (at your option) any later version as published by the Free Software Foundation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knot_floer_homology-1.0.2.tar.gz (59.9 kB view hashes)

Uploaded Source

Built Distributions

knot_floer_homology-1.0.2-cp39-cp39-win_amd64.whl (77.0 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

knot_floer_homology-1.0.2-cp39-cp39-win32.whl (69.6 kB view hashes)

Uploaded CPython 3.9 Windows x86

knot_floer_homology-1.0.2-cp39-cp39-manylinux2010_x86_64.whl (84.4 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64

knot_floer_homology-1.0.2-cp39-cp39-macosx_10_9_x86_64.whl (105.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

knot_floer_homology-1.0.2-cp38-cp38-win_amd64.whl (77.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

knot_floer_homology-1.0.2-cp38-cp38-win32.whl (69.8 kB view hashes)

Uploaded CPython 3.8 Windows x86

knot_floer_homology-1.0.2-cp38-cp38-manylinux2010_x86_64.whl (84.5 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64

knot_floer_homology-1.0.2-cp38-cp38-macosx_10_9_x86_64.whl (104.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

knot_floer_homology-1.0.2-cp37-cp37m-win_amd64.whl (76.8 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

knot_floer_homology-1.0.2-cp37-cp37m-win32.whl (69.8 kB view hashes)

Uploaded CPython 3.7m Windows x86

knot_floer_homology-1.0.2-cp37-cp37m-manylinux2010_x86_64.whl (83.5 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64

knot_floer_homology-1.0.2-cp37-cp37m-macosx_10_9_x86_64.whl (104.0 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

knot_floer_homology-1.0.2-cp36-cp36m-win_amd64.whl (76.7 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

knot_floer_homology-1.0.2-cp36-cp36m-win32.whl (69.7 kB view hashes)

Uploaded CPython 3.6m Windows x86

knot_floer_homology-1.0.2-cp36-cp36m-manylinux2010_x86_64.whl (83.3 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ x86-64

knot_floer_homology-1.0.2-cp36-cp36m-macosx_10_9_x86_64.whl (104.2 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page