@Override
	protected final int recombine(
		final MSeq<Phenotype<G, C>> population,
		final int[] individuals,
		final long generation
	) {
		assert individuals.length == 2 : "Required order of 2";

		final var pt1 = population.get(individuals[0]);
		final var pt2 = population.get(individuals[1]);
		final var gt1 = pt1.genotype();
		final var gt2 = pt2.genotype();

		//Choosing the Chromosome index for crossover.
		final int chIndex = RandomRegistry.random()
			.nextInt(min(gt1.length(), gt2.length()));

		final var c1 = MSeq.of(gt1);
		final var c2 = MSeq.of(gt2);
		final var genes1 = MSeq.of(c1.get(chIndex));
		final var genes2 = MSeq.of(c2.get(chIndex));

		crossover(genes1, genes2);

		c1.set(chIndex, c1.get(chIndex).newInstance(genes1.toISeq()));
		c2.set(chIndex, c2.get(chIndex).newInstance(genes2.toISeq()));

		//Creating two new Phenotypes and exchanging it with the old.
		population.set(
			individuals[0],
			Phenotype.of(Genotype.of(c1), generation)
		);
		population.set(
			individuals[1],
			Phenotype.of(Genotype.of(c2), generation)
		);

		return order();
	}
Constructs an alterer with a given recombination probability.

@param probability the recombination probability
@throws IllegalArgumentException if the {@code probability} is not in the
         valid range of {@code [0, 1]}
jenetics/src/main/java/io/jenetics/Crossover.java