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

		return Collector.of(
			() -> new SampleSummaryStatistics(parameterCount),
			SampleSummaryStatistics::accept,
			SampleSummaryStatistics::combine,
			SampleSummary::of
		);
	}
Return a {@link Collector} for creating a {@code SampleSummary} object.

@param parameterCount the number of parameters of the samples
@return a {@code SampleSummary} {@link Collector}
@throws IllegalArgumentException if the given {@code parameterCount} is
        smaller than one
jenetics.tool/src/main/java/io/jenetics/tool/trial/SampleSummary.java