docs: public PointerPrototypeHierarchyRepresentationResult run(Database db, Relation<O> relation) {
      DistanceQuery<O> dq = DatabaseUtil.precomputedDistanceQuery(db, relation, getDistanceFunction(), LOG);
      final DBIDs ids = relation.getDBIDs();
      final int size = ids.size();
  
      // Initialize space for result:
      PointerHierarchyRepresentationBuilder builder = new PointerHierarchyRepresentationBuilder(ids, dq.getDistanceFunction().isSquared());
      Int2ObjectOpenHashMap<ModifiableDBIDs> clusters = new Int2ObjectOpenHashMap<>(size);
  
      // Allocate working space:
      MatrixParadigm mat = new MatrixParadigm(ids);
      ArrayModifiableDBIDs prots = DBIDUtil.newArray(MatrixParadigm.triangleSize(size));
      initializeMatrices(mat, prots, dq);
  
      DBIDArrayMIter protiter = prots.iter();
      FiniteProgress progress = LOG.isVerbose() ? new FiniteProgress("MiniMax clustering", size - 1, LOG) : null;
      DBIDArrayIter ix = mat.ix;
      for(int i = 1, end = size; i < size; i++) {
        end = AGNES.shrinkActiveSet(ix, builder, end, //
            findMerge(end, mat, protiter, builder, clusters, dq));
        LOG.incrementProcessed(progress);
      }
      LOG.ensureCompleted(progress);
      return (PointerPrototypeHierarchyRepresentationResult) builder.complete();
    }