allCombinations

Assembles one candidate per combination of component choices, as a lazy sequence.

The number of combinations is the product of the per-group candidate counts, which grows exponentially in the number of groups. The sequence is lazy so that a caller that only needs the first few, or that is bounded by a beam width, never materializes the rest.

Returns an empty sequence when any group has no candidates: a mixture needs a component for every group, so one unfittable group invalidates the whole partition rather than one component of it.

Parameters

partition

the partition the groups belong to

groupFits

the fit results, one per group, in group order