pd-code-reverse-component
Reverse the orientation encoding of one selected PD-code component.
Installation
pip install pd-code-reverse-component
Usage example
from pd_code_reverse_component import reverse_component
pd = [[2, 3, 1, 4], [4, 1, 3, 2]]
reversed_pd = reverse_component(pd, 1)
print(reversed_pd)
Algorithm
The selected label identifies its component cycle through predecessor/successor maps. The cycle is placed in canonical order and mapped to its reverse order. Every occurrence of a component label is replaced through that bijection; labels belonging to other components remain unchanged. The operation returns a deep copy and leaves the input untouched.
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-reverse-component 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 | Provenance | Actions |
|---|---|---|---|---|
| pd_code_reverse_component-0.1.1.tar.gz | 3.0 kB | Without provenance | Details for pd_code_reverse_component-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pd_code_reverse_component-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pd_code_reverse_component-0.1.1-py3-none-any.whl |
Total release size: 7.0 kB
Release files / pd_code_reverse_component-0.1.1.tar.gz
| Download URL | pd_code_reverse_component-0.1.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5431f0683665d6e14c81ab32106d945d3080b56afb57447931a990f2978c1490
|
|
BLAKE2b-256 checksum How to use checksums |
73ecf53cf5024564741b4a102b9d7e4e51accf357a5d0fd43fcfb72f099c8ed1
|
| 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_reverse_component-0.1.1-py3-none-any.whl
| Download URL | pd_code_reverse_component-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d7e6e93839845889571dcb4c247210c6c6797c405f4070161de415348f7befe1
|
|
BLAKE2b-256 checksum How to use checksums |
ead0f3493ac1d41ed07998f75c317a5892b220e82655c3eb6c2effb3b3ff5147
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|
Security for pd-code-reverse-component 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.