pd-code-pre-nxt
Build deterministic predecessor and successor maps for every PD-code arc label.
Installation
pip install pd-code-pre-nxt
Usage example
from pd_code_pre_nxt import get_pre_nxt
pd = [[1, 5, 2, 4], [3, 1, 4, 6], [5, 3, 6, 2]]
pre, nxt = get_pre_nxt(pd)
print(nxt[1], pre[1])
Algorithm
Opposite crossing slots define the component graph. Each component must be a two-regular cycle, with a special deterministic treatment for two-label cycles. The smallest label is chosen as the cycle start; both traversal directions are compared lexicographically and the canonical one defines pre and nxt. Numeric suffixes are supported for temporary prefixed labels used during connected sums.
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-pre-nxt 0.1.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_pre_nxt-0.1.1.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pd_code_pre_nxt-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.0 kB
Release files / pd_code_pre_nxt-0.1.1.tar.gz
| Download URL | pd_code_pre_nxt-0.1.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a2a52f7de5cee5437b60c1fbbe933c6ae7ed0a685d4a4e184d796d47577b08cd
|
|
BLAKE2b-256 checksum How to use checksums |
c14e8467f62ec1ead0c4953058bab97936b8b4bbc717c6710b570c6256b5cb5a
|
| 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_pre_nxt-0.1.1-py3-none-any.whl
| Download URL | pd_code_pre_nxt-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2bf25349aa49fbc1fc3b375d4d5e008e2ebf2345a949042211a3f9ee8356bdb3
|
|
BLAKE2b-256 checksum How to use checksums |
287fa748ff98b976c414af2dfca6ba3c0e6115d8efca589eed03fa9fdd61259b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|