compose_systems: Compose systems hierarchically

View source: R/generics.R

compose_systems.dist_structureR Documentation

Compose systems hierarchically

Description

Produce a new dist_structure by replacing each component of outer with a sub-system (either a dist_structure or a plain dist). The composed system's components are the flattened inner components; its min_paths enumerate the Cartesian products of inner min_paths within each outer min_path.

Usage

## S3 method for class 'dist_structure'
compose_systems(outer, inner_list)

compose_systems(outer, inner_list)

Arguments

outer

A dist_structure object.

inner_list

A list of length ncomponents(outer). Each element is either a dist_structure or a dist (single-component sub-system).

Details

Computational note: the composed minimal-path enumeration takes the Cartesian product of inner-path choices over each outer path. For an outer system with p paths each of length q, where each inner has r paths, the candidate count grows as O(p * r^q) before deduplication. Bridge-of-bridges and similar deeply nested compositions can produce hundreds of candidates; if you find the call slow, build the composed coherent_dist directly with a hand-curated min_paths list.

Value

A coherent_dist representing the composed system.


dist.structure documentation built on May 13, 2026, 1:07 a.m.