public static Collector<Sample, ?, SampleSummaryStatistics>
	toSampleStatistics(final int parameterCount) {
		Requires.positive(parameterCount);

		return Collector.of(
			() -> new SampleSummaryStatistics(parameterCount),
			SampleSummaryStatistics::accept,
			SampleSummaryStatistics::combine
		);
	}
Return a {@code Collector} which applies an double-producing mapping
function to each input element, and returns moments-statistics for the
resulting values.

{@snippet lang="java":
final Stream<Sample> stream = ...
final SampleSummaryStatistics statistics = stream
    .collect(toDoubleMomentStatistics(parameterCount));
}

@param parameterCount the number of parameter of the accumulated
       {@code Sample} objects
@return a {@code Collector} implementing the sample reduction
@throws IllegalArgumentException if the given {@code parameterCount}
        is smaller then one
jenetics.tool/src/main/java/io/jenetics/tool/trial/SampleSummaryStatistics.java