Skip to main content

pd-code-delete-nugatory

Detect and remove nugatory crossings from PD codes.

Installation

pip install pd-code-delete-nugatory

Usage example

from pd_code_delete_nugatory import erase_all_nugatory, get_index_of_nugatory

pd = [[1, 1, 2, 2]]
print(get_index_of_nugatory(pd))
print(erase_all_nugatory(pd))

Algorithm

For each candidate crossing, the algorithm removes that crossing from a weak strand graph and compares graph connectivity. A crossing whose removal separates regions is nugatory. Erasing it reconnects the paired arcs, removes any induced Reidemeister-I crossing, and renumbers the remaining component cycles. The process repeats until no candidate remains.

Input conventions

A PD code is represented as a list of four-entry crossings. Arc labels normally occur exactly twice. Public functions validate inputs and return new values rather than mutating caller-owned data unless their API explicitly says otherwise.

External software

No external software is required.

Development

Run examples and package checks before release. Python packages require Python 3.10 or newer. Build PyPI artifacts with:

poetry check
poetry build

License

MIT. See LICENSE.

Download files

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

Source Distribution

pd_code_delete_nugatory-0.2.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

pd_code_delete_nugatory-0.2.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file pd_code_delete_nugatory-0.2.1.tar.gz.

File metadata

  • Download URL: pd_code_delete_nugatory-0.2.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10

File hashes

Hashes for pd_code_delete_nugatory-0.2.1.tar.gz
Algorithm Hash digest
SHA256 e7cb3c7d1d06e122f4218bd87e0fbaa8ddeeaaa9cd75d3a883abb167588b6e8d
MD5 b05d138f5679838d054f2189efba50b1
BLAKE2b-256 be774427abe53979c371d8d25115fec48c4d550cee925f5a894dc6003fdd60d4

See more details on using hashes here.

File details

Details for the file pd_code_delete_nugatory-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pd_code_delete_nugatory-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed7c116e3f52254e4f698419e0fb3cd84dd625bb3dc0afe26170e543cef3dc6b
MD5 2e5165e9d0328981a21bb6e60cf3d848
BLAKE2b-256 89a2dc0afe8c6ccd14339e3a5e1d38e813d3adee68797aa46bdf6018e7513729

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 Sentry Error logging StatusPage Status page