static RangeRandom of(
			final Sampler lengthSampler,
			final Sampler indexSampler
		) {
			requireNonNull(lengthSampler);
			requireNonNull(indexSampler);

			return (random, size) -> {
				if (size <= 1) {
					throw new IllegalArgumentException(
						"Length must be greater then 1, but was %d."
							.formatted(size)
					);
				}

				final int lng = lengthSampler.sample(random, IntRange.of(2, size));
				final int a = indexSampler.sample(random, IntRange.of(0, size - lng));
				final int b = indexSampler.sample(random, IntRange.of(a + 1, lng - 1));
				final int c = a + lng;

				return new Range(a, b, c);
			};
		}
Create a new random shift range generator, which uses the given
distributions for creating the shift points.

@param lengthSampler the sampler used for creating the shifted gene
       count
@param indexSampler the sampler used for creating the shift indexes
@return a new random shift generator with the given parameters
jenetics/src/main/java/io/jenetics/ShiftMutator.java