Skip to main content

pd-code-de-r1

Remove Reidemeister-I crossings from a planar-diagram code.

Installation

pip install pd-code-de-r1

Usage example

from pd_code_de_r1 import de_r1

pd = [[1, 1, 2, 2]]
print(de_r1(pd))  # []

Algorithm

A Reidemeister-I crossing contains a locally repeated arc pattern. The algorithm builds the opposite-slot strand graph, identifies labels trapped in the one-crossing loop, removes the crossing, reconnects its surviving strand endpoints, and renumbers labels along each remaining cycle. Removal is repeated because one reduction can expose another R1 crossing.

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-de-r1 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pd-code-de-r1 0.1.2
File Size Uploaded
pd_code_de_r1-0.1.2.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pd-code-de-r1 0.1.2
File Interpreter ABI Platform
pd_code_de_r1-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / pd_code_de_r1-0.1.2.tar.gz

Download URL pd_code_de_r1-0.1.2.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a9178f0c9e0fbba067d604f78078be2ba24e7cfa3d94855c1ad1cd4304081c82
BLAKE2b-256 checksum
How to use checksums
86cbb58e5e1d99d5089a95260d50893fad7492fc187b11edaab3f83e016f9d35
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_de_r1-0.1.2-py3-none-any.whl

Download URL pd_code_de_r1-0.1.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fa2ac9f99807052d698fc181c5968c9188fbd11d0fbe9d8f2442f9adb9978740
BLAKE2b-256 checksum
How to use checksums
19e0220d965d3568a5b4f5e4c12163e68c59fbff379e23bb6a5a34800bfa8ada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.11.15 Windows/10

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page