% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compositional.R, R/generics.R
\name{compose_systems.dist_structure}
\alias{compose_systems.dist_structure}
\alias{compose_systems}
\title{Compose systems hierarchically}
\usage{
\method{compose_systems}{dist_structure}(outer, inner_list)

compose_systems(outer, inner_list)
}
\arguments{
\item{outer}{A \link{dist_structure} object.}

\item{inner_list}{A list of length \code{ncomponents(outer)}. Each element
is either a \link{dist_structure} or a dist (single-component sub-system).}
}
\value{
A \code{coherent_dist} representing the composed system.
}
\description{
Produce a new \link{dist_structure} by replacing each component of \code{outer}
with a sub-system (either a \link{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.
}
\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 \code{p} paths each of length \code{q}, where each inner has
\code{r} paths, the candidate count grows as \code{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 \code{coherent_dist} directly with a hand-curated
\code{min_paths} list.
}
