private Phenotype<G, C> select(
		final Seq<Phenotype<G, C>> population,
		final Optimize opt,
		final RandomGenerator random
	) {
		final int N = population.size();

		assert _sampleSize >= 2;
		assert N >= 1;

		final Comparator<? super Phenotype<G, C>> cmp = opt == Optimize.MAXIMUM
			? _comparator
			: _comparator.reversed();

		return Stream.generate(() -> population.get(random.nextInt(N)))
			.limit(_sampleSize)
			.max(cmp)
			.orElseThrow(AssertionError::new);
	}
Return the sample size of the tournament selector.

@since 5.0

@return the sample size of the tournament selector
jenetics/src/main/java/io/jenetics/TournamentSelector.java