private void crossover(final MSeq<G> that, final MSeq<G> other, final int i) {
		final var random = RandomRegistry.random();

		final double u = random.nextDouble();
		final double beta;
		if (u < 0.5) {
			// If u is smaller than 0.5 perform a contracting crossover.
			beta = pow(2*u, 1.0/(_contiguity + 1));
		} else if (u > 0.5) {
			// Otherwise, perform an expanding crossover.
			beta = pow(0.5/(1.0 - u), 1.0/(_contiguity + 1));
		} else {
			beta = 1;
		}

		final double v1 = that.get(i).doubleValue();
		final double v2 = other.get(i).doubleValue();
		final double v = random.nextBoolean()
			? ((v1 - v2)*0.5) - beta*0.5*abs(v1 - v2)
			: ((v1 - v2)*0.5) + beta*0.5*abs(v1 - v2);

		final double min = that.get(i).min().doubleValue();
		final double max = that.get(i).max().doubleValue();
		that.set(i, that.get(i).newInstance(clamp(v, min, max)));
	}
Return the <i>contiguity</i> value of the crossover.

@return the <i>contiguity</i> value of the crossover
jenetics.ext/src/main/java/io/jenetics/ext/SimulatedBinaryCrossover.java