private void generateSamplingCore(int[] A, int index, int m) {
        if (index == 0) {
            return;
        }
        if (index + 1 == m) {
            return;
        }
        generateSamplingCore(A, index - 1, m);
        int randomIndex = new Random().nextInt(index + 1);
        if (randomIndex < m) {
            int temp = A[randomIndex];
            A[randomIndex] = A[index];
            A[index] = temp;
        }
    }