docs: private SplitSorting chooseMinimumOverlapSplit(int splitAxis, int minEntries, int maxEntries, boolean revert) {
      if(splitAxis == -1) {
        pastOverlap = Double.MAX_VALUE;
        return null;
      }
      double optXVolume = Double.POSITIVE_INFINITY;
      double optVolume = Double.POSITIVE_INFINITY;
      SplitSorting optDistribution = null;
      HyperBoundingBox[] optMBRs = null;
  
      // generate sortings for the mbr's extrema
      int[] entrySorting = new int[node.getNumEntries()];
      for(int i = 0; i < entrySorting.length; i++) {
        entrySorting[i] = i;
      }
      int[] lbSorting = Arrays.copyOf(entrySorting, entrySorting.length);
      int[] ubSorting = Arrays.copyOf(entrySorting, entrySorting.length);
      sortEntriesForDimension(splitAxis, entrySorting, entrySorting);
      if(revert && maxEntries < node.getNumEntries() / 2) {
        // test reverted sortings
        int[][] reverted = new int[2][node.getNumEntries()]; // temp array
        for(int i = 0; i < lbSorting.length; i++) {
          reverted[0][reverted[0].length - 1 - i] = lbSorting[i];
          reverted[1][reverted[1].length - 1 - i] = ubSorting[i];
        }
        for(int i = 0; i < lbSorting.length; i++) {
          lbSorting[i] = reverted[0][i];
          ubSorting[i] = reverted[1][i];
        }
      }
      for(int i = 0; i < 2; i++) { // test lower and upper bound sortings
        if(i == 0) { // lower-bound sorting
          entrySorting = lbSorting;
        }
        else {
          // upper-bound sorting
          entrySorting = ubSorting;
        }
        for(int limit = minEntries; limit <= maxEntries; limit++) {
          HyperBoundingBox mbr1 = mbr(entrySorting, 0, limit);
          HyperBoundingBox mbr2 = mbr(entrySorting, limit, entrySorting.length);
          double xVolume = SpatialUtil.overlap(mbr1, mbr2);
          if(xVolume < optXVolume) {
            optXVolume = xVolume;
            optDistribution = generateSplitSorting(entrySorting, limit);
            optMBRs = new HyperBoundingBox[] { mbr1, mbr2 };
            optVolume = Double.NaN;
          }
          else if(xVolume == optXVolume) {
            double vol = SpatialUtil.volume(mbr1);
            vol += SpatialUtil.volume(mbr2);
            if(Double.isNaN(optVolume)) {
              // calculate when necessary
              optVolume = SpatialUtil.volume(optMBRs[0]);
              optVolume += SpatialUtil.volume(optMBRs[1]);
            }
            if(vol < optVolume) {
              optXVolume = xVolume;
              optVolume = vol;
              optDistribution = generateSplitSorting(entrySorting, limit);
            }
          }
        }
      }
      if(node.getEntry(0) instanceof LeafEntry || tree.get_max_overlap() >= 1) {
        pastOverlap = Double.NaN; // overlap is not computed
        return optDistribution;
      }
      // test overlap
      switch(maxOverlapStrategy){
      case DATA_OVERLAP:
        pastOverlap = getRatioOfDataInIntersectionVolume(generateDistribution(optDistribution), optMBRs);
        if(tree.get_max_overlap() < pastOverlap) {
          LOG.finest(String.format(Locale.ENGLISH, "No %s split found%s; best data overlap was %.3f", (minEntries == tree.get_min_fanout() ? "minimum overlap" : "topological"), (maxEntries < node.getNumEntries() / 2 ? " in " + (revert ? "second" : "first") + " range" : ""), pastOverlap));
          return null;
        }
        break;
      case VOLUME_OVERLAP:
        if(Double.isNaN(optVolume)) {
          optVolume = SpatialUtil.volume(optMBRs[0]);
          optVolume += SpatialUtil.volume(optMBRs[1]);
        }
        pastOverlap = optXVolume / optVolume;
        if(tree.get_max_overlap() < pastOverlap) {
          LOG.finest(String.format(Locale.ENGLISH, "No %s split found%s; best volume overlap was %.3f", (minEntries == tree.get_min_fanout() ? "minimum overlap" : "topological"), (maxEntries < node.getNumEntries() / 2 ? " in " + (revert ? "second" : "first") + " range" : ""), pastOverlap));
          return null;
        }
        break;
      }
  
      return optDistribution;
    }