docs: private Entry split(Entry newEntry, Node node, Entry parentEntry,
              long timestamp) {
          // The implemented split function only works in trees where node
          // have three entries.
          // Splitting only makes sense on full nodes.
          assert (node.numFreeEntries() == 0);
          assert (parentEntry.getChild() == node);
  
          // All the entries we have to separate in two nodes.
          Entry[] allEntries = new Entry[4];
          Entry[] nodeEntries = node.getEntries();
          for (int i = 0; i < nodeEntries.length; i++) {
              allEntries[i] = new Entry(nodeEntries[i]);
          }
          allEntries[3] = newEntry;
  
          // Clear the given node, since we are going to refill it later.
          node = new Node(this.numberDimensions, node.getRawLevel());
  
          // Calculate the distance of all the possible pairings, since we want
          // to do a (2,2) split.
          double select01 = allEntries[0].calcDistance(allEntries[1])
                  + allEntries[2].calcDistance(allEntries[3]);
  
          double select02 = allEntries[0].calcDistance(allEntries[2])
                  + allEntries[1].calcDistance(allEntries[3]);
  
          double select03 = allEntries[0].calcDistance(allEntries[3])
                  + allEntries[1].calcDistance(allEntries[2]);
  
          // See which of the pairings is minimal and distribute the entries
          // accordingly.
          Node residualNode = new Node(this.numberDimensions,
                  node.getRawLevel());
          if (select01 < select02) {
              if (select01 < select03) {//select01 smallest
                  node.addEntry(allEntries[0], timestamp);
                  node.addEntry(allEntries[1], timestamp);
                  residualNode.addEntry(allEntries[2], timestamp);
                  residualNode.addEntry(allEntries[3], timestamp);
              } else {//select03 smallest
                  node.addEntry(allEntries[0], timestamp);
                  node.addEntry(allEntries[3], timestamp);
                  residualNode.addEntry(allEntries[1], timestamp);
                  residualNode.addEntry(allEntries[2], timestamp);
              }
          } else {
              if (select02 < select03) {//select02 smallest
                  node.addEntry(allEntries[0], timestamp);
                  node.addEntry(allEntries[2], timestamp);
                  residualNode.addEntry(allEntries[1], timestamp);
                  residualNode.addEntry(allEntries[3], timestamp);
              } else {//select03 smallest
                  node.addEntry(allEntries[0], timestamp);
                  node.addEntry(allEntries[3], timestamp);
                  residualNode.addEntry(allEntries[1], timestamp);
                  residualNode.addEntry(allEntries[2], timestamp);
              }
          }
  
          // Set the other node into the tree.
          parentEntry.setChild(node);
          parentEntry.recalculateData();
          int count = 0;
          for (Entry e : node.getEntries()){
          	e.setParentEntry(parentEntry);
          	if (e.getData().getN() != 0)
          		count++;
          }
          //System.out.println(count);
          // Generate a new entry for the residual node.
          Entry residualEntry = new Entry(this.numberDimensions,
                  residualNode, timestamp, parentEntry, node);
          count=0;
          for (Entry e: residualNode.getEntries()){
          	e.setParentEntry(residualEntry);
          	if (e.getData().getN() != 0)
          		count++;
          }
          //System.out.println(count);
          return residualEntry;
      }