docs: protected Node bulkConstruct(DBIDRef cur, int maxScale, double parentDist, ModifiableDoubleDBIDList elems) {
      assert (!elems.contains(cur));
      final double max = maxDistance(elems);
      final int scale = Math.min(distToScale(max) - 1, maxScale);
      final int nextScale = scale - 1;
      // Leaf node, because points coincide, we are too deep, or have too few
      // elements remaining:
      if(max <= 0 || scale <= scaleBottom || elems.size() < truncate) {
        return new Node(cur, max, parentDist, elems);
      }
      // Find neighbors in the cover of the current object:
      ModifiableDoubleDBIDList candidates = DBIDUtil.newDistanceDBIDList();
      excludeNotCovered(elems, scaleToDist(scale), candidates);
      // If no elements were not in the cover, build a compact tree:
      if(candidates.size() == 0) {
        LOG.warning("Scale not chosen appropriately? " + max + " " + scaleToDist(scale));
        return bulkConstruct(cur, nextScale, parentDist, elems);
      }
      // We will have at least one other child, so build the parent:
      Node node = new Node(cur, max, parentDist);
      // Routing element now is a singleton:
      final boolean curSingleton = elems.size() == 0;
      if(!curSingleton) {
        // Add node for the routing object:
        node.children.add(bulkConstruct(cur, nextScale, 0, elems));
      }
      final double fmax = scaleToDist(nextScale);
      // Build additional cover nodes:
      for(DoubleDBIDListIter it = candidates.iter(); it.valid();) {
        assert (it.getOffset() == 0);
        DBID t = DBIDUtil.deref(it);
        elems.clear(); // Recycle.
        collectByCover(it, candidates, fmax, elems);
        assert (DBIDUtil.equal(t, it)) : "First element in candidates must not change!";
        if(elems.size() == 0) { // Singleton
          node.singletons.add(it.doubleValue(), it);
        }
        else {
          // Build a full child node:
          node.children.add(bulkConstruct(it, nextScale, it.doubleValue(), elems));
        }
        candidates.removeSwap(0);
      }
      assert (candidates.size() == 0);
      // Routing object is not yet handled:
      if(curSingleton) {
        if(node.isLeaf()) {
          node.children = null; // First in leaf is enough.
        }
        else {
          node.singletons.add(parentDist, cur); // Add as regular singleton.
        }
      }
      // TODO: improve recycling of lists?
      return node;
    }