docs: @Override
    public Assignments<E> split(AbstractMTree<?, N, E, ?> tree, N node) {
      final int n = node.getNumEntries();
  
      // choose first and second routing object
      int b1 = 0, b2 = 0;
      double dist1 = node.getEntry(0).getParentDistance(), dist2 = dist1;
      if(Double.isNaN(dist1)) {
        // Root split does not yet have parent distances!
        // As a fallback, use the two farthest points.
        return new FarthestPointsSplit<E, N>(distributor).split(tree, node);
      }
      for(int i = 1; i < n; i++) {
        double dist = node.getEntry(i).getParentDistance();
        if(dist < dist1) {
          dist1 = dist;
          b1 = i;
        }
        else if(dist > dist2 || (dist == dist2 && i == 1)) {
          dist2 = dist;
          b2 = i;
        }
      }
      E e1 = node.getEntry(b1), e2 = node.getEntry(b2);
      double[] rowi = new double[n], rowj = new double[n];
      for(int i = 0; i < n; i++) {
        if(i == b1 || i == b2) {
          continue;
        }
        E ei = node.getEntry(i);
        rowi[i] = tree.distance(e1, ei);
        rowj[i] = tree.distance(e2, ei);
      }
  
      return distributor.distribute(node, b1, rowi, b2, rowj);
    }