commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/ArraySampler.java [392:405]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        int i = to - checkFromToIndex(from, to, array.length);
        for (; i > BATCH_2; --i) {
            swap(array, from + i - 1, from + rng.nextInt(i));
        }
        // Batches of 2
        final int[] productBound = {i * (i - 1)};
        for (; i > 1; i -= 2) {
            final int[] indices = randomBounded2(i, i - 1, productBound, rng);
            final int index1 = indices[0];
            final int index2 = indices[1];
            swap(array, from + i - 1, from + index1);
            swap(array, from + i - 2, from + index2);
        }
        return array;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



commons-rng-sampling/src/main/java/org/apache/commons/rng/sampling/ArraySampler.java [446:459]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        int i = to - checkFromToIndex(from, to, array.length);
        for (; i > BATCH_2; --i) {
            swap(array, from + i - 1, from + rng.nextInt(i));
        }
        // Batches of 2
        final int[] productBound = {i * (i - 1)};
        for (; i > 1; i -= 2) {
            final int[] indices = randomBounded2(i, i - 1, productBound, rng);
            final int index1 = indices[0];
            final int index2 = indices[1];
            swap(array, from + i - 1, from + index1);
            swap(array, from + i - 2, from + index2);
        }
        return array;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



