Skip to main content

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

pd_code_pre_nxt-0.1.1.tar.gz (3.0 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_pre_nxt-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

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

Hashes for pd_code_pre_nxt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a2a52f7de5cee5437b60c1fbbe933c6ae7ed0a685d4a4e184d796d47577b08cd
MD5 1ed419d51c33b1e08941862702d85f78
BLAKE2b-256 c14e8467f62ec1ead0c4953058bab97936b8b4bbc717c6710b570c6256b5cb5a

See more details on using hashes here.

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

Hashes for pd_code_pre_nxt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2bf25349aa49fbc1fc3b375d4d5e008e2ebf2345a949042211a3f9ee8356bdb3
MD5 a59df0985abdc4f086760b585898d5d4
BLAKE2b-256 287fa748ff98b976c414af2dfca6ba3c0e6115d8efca589eed03fa9fdd61259b

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