Skip to main content

Python interface for cppkh Khovanov homology computation with runtime C++ compilation.

Project description

cppkh-interface

cppkh-interface is a Python package for computing integer Khovanov homology with the C++ cppkh implementation.

The package is compatible with the main javakh-interface function:

import cppkh_interface

pd_code = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]
print(cppkh_interface.solve_khovanov(pd_code, de_r1=True, de_k8=True))

Unlike wrappers that ship a prebuilt DLL or shared object, this package ships the cppkh C++ source file and compiles a local executable on first use through cpp-simple-interface. The compiled executable is cached for later calls.

Install

pip install cppkh-interface

A g++ compatible compiler must be available at runtime. To select a compiler, set CXX before importing or calling the package:

CXX=clang++ python your_script.py

Windows PowerShell:

$env:CXX = "C:\path\to\g++.exe"
python your_script.py

Build And Publish

From this directory:

poetry build
poetry publish

For local testing:

poetry run python -m cppkh_interface "[[1,5,2,4], [3,1,4,6], [5,3,6,2]]"

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

cppkh_interface-0.1.0.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cppkh_interface-0.1.0-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file cppkh_interface-0.1.0.tar.gz.

File metadata

  • Download URL: cppkh_interface-0.1.0.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Windows/11

File hashes

Hashes for cppkh_interface-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0bb4f47ebeac45d3957a23d3bd768b549967c8436614d972f7a2b375f32c1ace
MD5 56c9509b8c1f39492a6e06decd3749f1
BLAKE2b-256 2ab9f381e5f8edc2b081b127cd12e6046882b7fc584ba04fb1805572d8512030

See more details on using hashes here.

File details

Details for the file cppkh_interface-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cppkh_interface-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.13.5 Windows/11

File hashes

Hashes for cppkh_interface-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20a5a684a40ab0d0adbccf85c92ed68e54469f57f86ee5a18a4a284aed21acdb
MD5 f0ee1ccdce7f9e583c49811ae6065aaf
BLAKE2b-256 f71e83b0077268537f40f8b5db22d6333faeeae8efe52716fb3828220fc4c4bd

See more details on using hashes here.

Supported by

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