code: private void randomPermute(int[] permute) {
          for (int i = 0; i < indexVectorSize; i++)
              permute[i] = i;
          for (int i = indexVectorSize - 1; i > 0; i--) {
              int w = (int) Math.floor(Math.random() * (i+1));
              int temp = permute[w];
              permute[w] = permute[i];
              permute[i] = permute[w];
          }
      }
docs: Populates the given array with values 0 to {@code indexVectorSize}, and
  then shuffly the values randomly.