Skip to main content

group-diagram-combination

Enumerate connected ways to join selected components of several link factors.

Installation

pip install group-diagram-combination

Usage example

from group_diagram_combination import main

# Three factors with 2, 2, and 1 components; choose two joins.
methods = main([2, 2, 1], 2)
print(methods[0])

Algorithm

Each usable node is represented as [factor_index, component_index]. Candidate edges connect nodes from different factors. The algorithm enumerates edge subsets of the requested size and uses a disjoint-set union structure to reject subsets that do not connect every factor. For the composite-link generator the requested size is n - 1, so every accepted factor-level graph is a spanning tree.

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

group_diagram_combination-0.1.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

group_diagram_combination-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file group_diagram_combination-0.1.1.tar.gz.

File metadata

  • Download URL: group_diagram_combination-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10

File hashes

Hashes for group_diagram_combination-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c39437e6faf76a4f6a521b6d1015479c9bcc6fb4ebed6e88b881b32adb27c639
MD5 2592988fec9da4bdde8e13b9a300e5fe
BLAKE2b-256 49511a3bf08f23127e33ec05222e813b3c6a229abbf7d88bd7802dd32db8a9d0

See more details on using hashes here.

File details

Details for the file group_diagram_combination-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for group_diagram_combination-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 be898c9cb706fa2719d25b7a8c7a84cf76e8395cc52df083b864548ec8b4ca0e
MD5 2389fb861c76ae644795bccc973a2cf9
BLAKE2b-256 2b5bc10209dde47536782b077e2939c8908963668bcd52801d3eec8dec28b9d4

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