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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c39437e6faf76a4f6a521b6d1015479c9bcc6fb4ebed6e88b881b32adb27c639
|
|
| MD5 |
2592988fec9da4bdde8e13b9a300e5fe
|
|
| BLAKE2b-256 |
49511a3bf08f23127e33ec05222e813b3c6a229abbf7d88bd7802dd32db8a9d0
|
File details
Details for the file group_diagram_combination-0.1.1-py3-none-any.whl.
File metadata
- Download URL: group_diagram_combination-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.4.1 CPython/3.11.15 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be898c9cb706fa2719d25b7a8c7a84cf76e8395cc52df083b864548ec8b4ca0e
|
|
| MD5 |
2389fb861c76ae644795bccc973a2cf9
|
|
| BLAKE2b-256 |
2b5bc10209dde47536782b077e2939c8908963668bcd52801d3eec8dec28b9d4
|