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.

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_de_r1-0.1.2.tar.gz (3.1 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_de_r1-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file pd_code_de_r1-0.1.2.tar.gz.

File metadata

  • Download URL: pd_code_de_r1-0.1.2.tar.gz
  • Upload date:
  • Size: 3.1 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_de_r1-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a9178f0c9e0fbba067d604f78078be2ba24e7cfa3d94855c1ad1cd4304081c82
MD5 e447bc411ce2f0635911a1e3fcddda03
BLAKE2b-256 86cbb58e5e1d99d5089a95260d50893fad7492fc187b11edaab3f83e016f9d35

See more details on using hashes here.

File details

Details for the file pd_code_de_r1-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pd_code_de_r1-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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_de_r1-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2ac9f99807052d698fc181c5968c9188fbd11d0fbe9d8f2442f9adb9978740
MD5 ed203b8550389f51861d8dc14de362f8
BLAKE2b-256 19e0220d965d3568a5b4f5e4c12163e68c59fbff379e23bb6a5a34800bfa8ada

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