fit Specified
Fits the numbers of components the caller is choosing between.
The generalization of fit(numComponents) to an analyst weighing more than one reading of a histogram — two plausible groupings, say — who wants the criteria's opinion between them without pretending a range was searched. The recommendation is the best of the specified counts; one component is fitted alongside them for the comparison, as above.
Deliberately a separate name rather than another fit overload. A Set<Int> is an Iterable<Int>, so an overload taking one would silently capture existing calls that pass a set to the range form and change what they mean.
Parameters
the counts to fit. Every one must be feasible for this sample.
the partition generator supplying the initial partition
improves the generated partition
chooses one family per group
Throws
when the set is empty or holds a count that cannot be fitted to this sample, naming the constraint that refuses it