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.
Metadata
Release files for pd-code-delete-nugatory 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pd_code_delete_nugatory-0.2.1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pd_code_delete_nugatory-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / pd_code_delete_nugatory-0.2.1.tar.gz
| Download URL | pd_code_delete_nugatory-0.2.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7cb3c7d1d06e122f4218bd87e0fbaa8ddeeaaa9cd75d3a883abb167588b6e8d
|
|
BLAKE2b-256 checksum How to use checksums |
be774427abe53979c371d8d25115fec48c4d550cee925f5a894dc6003fdd60d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|
Release files / pd_code_delete_nugatory-0.2.1-py3-none-any.whl
| Download URL | pd_code_delete_nugatory-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed7c116e3f52254e4f698419e0fb3cd84dd625bb3dc0afe26170e543cef3dc6b
|
|
BLAKE2b-256 checksum How to use checksums |
89a2dc0afe8c6ccd14339e3a5e1d38e813d3adee68797aa46bdf6018e7513729
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|