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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7cb3c7d1d06e122f4218bd87e0fbaa8ddeeaaa9cd75d3a883abb167588b6e8d
|
|
| MD5 |
b05d138f5679838d054f2189efba50b1
|
|
| BLAKE2b-256 |
be774427abe53979c371d8d25115fec48c4d550cee925f5a894dc6003fdd60d4
|
File details
Details for the file pd_code_delete_nugatory-0.2.1-py3-none-any.whl.
File metadata
- Download URL: pd_code_delete_nugatory-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed7c116e3f52254e4f698419e0fb3cd84dd625bb3dc0afe26170e543cef3dc6b
|
|
| MD5 |
2e5165e9d0328981a21bb6e60cf3d848
|
|
| BLAKE2b-256 |
89a2dc0afe8c6ccd14339e3a5e1d38e813d3adee68797aa46bdf6018e7513729
|