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.
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_pre_nxt-0.1.1.tar.gz.
File metadata
- Download URL: pd_code_pre_nxt-0.1.1.tar.gz
- Upload date:
- Size: 3.0 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 |
a2a52f7de5cee5437b60c1fbbe933c6ae7ed0a685d4a4e184d796d47577b08cd
|
|
| MD5 |
1ed419d51c33b1e08941862702d85f78
|
|
| BLAKE2b-256 |
c14e8467f62ec1ead0c4953058bab97936b8b4bbc717c6710b570c6256b5cb5a
|
File details
Details for the file pd_code_pre_nxt-0.1.1-py3-none-any.whl.
File metadata
- Download URL: pd_code_pre_nxt-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.9 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 |
2bf25349aa49fbc1fc3b375d4d5e008e2ebf2345a949042211a3f9ee8356bdb3
|
|
| MD5 |
a59df0985abdc4f086760b585898d5d4
|
|
| BLAKE2b-256 |
287fa748ff98b976c414af2dfca6ba3c0e6115d8efca589eed03fa9fdd61259b
|