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(1, size));
				final int a = indexSampler.sample(random, IntRange.of(0, size - lng));
				final int b = a + lng;

				return new Range(a, b);
			};
		}
Create a new random range generator, which uses the given distributions
for creating the range 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 range generator with the given parameters
jenetics/src/main/java/io/jenetics/ShuffleMutator.java