Metadata-Version: 2.4
Name: group-diagram-combination
Version: 0.1.1
Summary: solve edge combination of group graph
License: MIT
License-File: LICENSE
Author: GGN_2015
Author-email: premierbob@qq.com
Requires-Python: >=3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Description-Content-Type: text/markdown

# group-diagram-combination

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

## Installation

```bash
pip install group-diagram-combination
```

## Usage example

```python
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:

```bash
poetry check
poetry build
```

## License

MIT. See `LICENSE`.

