docs: @Override
    public Node[] split(Node node)
    {
      List<Node> children = Lists.newArrayList(node.getChildren());
      Node[] seeds = pickSeeds(children);
  
      node.clear();
      node.addChild(seeds[0]);
      node.addToBitmapIndex(seeds[0]);
  
      Node group1 = new Node(
          seeds[1].getMinCoordinates().clone(),
          seeds[1].getMaxCoordinates().clone(),
          seeds[1],
          node.isLeaf(),
          node.getParent(),
          bf.makeEmptyMutableBitmap()
      );
      group1.addToBitmapIndex(seeds[1]);
      if (node.getParent() != null) {
        node.getParent().addChild(group1);
      }
      Node[] groups = new Node[]{
          node, group1
      };
  
      RTreeUtils.enclose(groups);
  
      while (!children.isEmpty()) {
        for (Node group : groups) {
          if (group.getChildren().size() + children.size() <= minNumChildren) {
            for (Node child : children) {
              group.addToBitmapIndex(child);
              group.addChild(child);
            }
            RTreeUtils.enclose(groups);
            return groups;
          }
        }
  
        Node nextToAssign = pickNext(children);
        double group0ExpandedArea = RTreeUtils.getEnclosingArea(groups[0], nextToAssign);
        double group1ExpandedArea = RTreeUtils.getEnclosingArea(groups[1], nextToAssign);
  
        Node optimal;
        if (group0ExpandedArea < group1ExpandedArea) {
          optimal = groups[0];
        } else if (group0ExpandedArea == group1ExpandedArea) {
          if (groups[0].getArea() < groups[1].getArea()) {
            optimal = groups[0];
          } else {
            optimal = groups[1];
          }
        } else {
          optimal = groups[1];
        }
  
        optimal.addToBitmapIndex(nextToAssign);
        optimal.addChild(nextToAssign);
        optimal.enclose();
      }
  
      return groups;
    }