public static int[] next(final RandomGenerator rnd, final int n, final int k) {
		requireNonNull(rnd);

		final var subset = new int[k];
		next(rnd, n, subset);
		return subset;
	}
Selects a random subset of size {@code k} from a set of size {@code n}.

@param n the size of the set.
@param k the size of the subset.
@param rnd the random number generator used.
@throws NullPointerException if {@code random} is {@code null}.
@throws IllegalArgumentException if {@code n < k}, {@code k == 0} or if
        {@code n*k} will cause an integer overflow.
@return the a-set array for the given parameter. The returned subset
        array is sorted in increasing order.
jenetics/src/main/java/io/jenetics/internal/math/Subsets.java