docs: private <A> ArrayList<int[]> buildPartitions(NumberArrayAdapter<?, A> adapter1, A data1, int len, int depth) {
      final int[] idx = new int[len];
      final double[] tmp = new double[len];
      for(int i = 0; i < len; ++i) {
        idx[i] = i;
        tmp[i] = adapter1.getDouble(data1, i);
      }
      // Sort indexes:
      IntegerArrayQuickSort.sort(idx, (x, y) -> Double.compare(tmp[x], tmp[y]));
      Arrays.sort(tmp); // Should yield the same ordering
  
      ArrayList<int[]> ret = new ArrayList<>(1 << depth);
      divide(idx, tmp, ret, 0, tmp.length, depth);
      return ret;
    }