architxt.simplification.tree_rewriting.operations.relations#
Classes
|
Identifies and establishes hierarchical relationships between GROUP nodes within a tree structure. |
- class architxt.simplification.tree_rewriting.operations.relations.FindRelationsOperation(*args, naming_only=False, **kwargs)[source]#
Bases:
Operation
Identifies and establishes hierarchical relationships between GROUP nodes within a tree structure.
The function scans for subtrees that contain at least two distinct elements. When a GROUP node is found to have a relationship with a collection, that relationship is distributed between the GROUP node itself and each member of the collection.
The operation can operate in two modes: 1. Naming-only mode: Simply assigns labels to valid relations without altering the tree’s structure. 2. Structural modification mode: restructures the tree by creating relation nodes between groups and collections.