docs: protected int findMerge(int end, MatrixParadigm mat, PointerHierarchyRepresentationBuilder builder) {
      assert (end > 0);
      final DBIDArrayIter ix = mat.ix, iy = mat.iy;
      final double[] matrix = mat.matrix;
      double mindist = Double.POSITIVE_INFINITY;
      int x = -1, y = -1;
      // Find minimum:
      for(int ox = 0, xbase = 0; ox < end; xbase += ox++) {
        // Skip if object has already joined a cluster:
        if(builder.isLinked(ix.seek(ox))) {
          continue;
        }
        assert (xbase == MatrixParadigm.triangleSize(ox));
        for(int oy = 0; oy < ox; oy++) {
          // Skip if object has already joined a cluster:
          if(builder.isLinked(iy.seek(oy))) {
            continue;
          }
          final double dist = matrix[xbase + oy];
          if(dist <= mindist) { // Prefer later on ==, to truncate more often.
            mindist = dist;
            x = ox;
            y = oy;
          }
        }
      }
      assert (x >= 0 && y >= 0);
      assert (y < x); // We could swap otherwise, but this shouldn't arise.
      merge(end, mat, builder, mindist, x, y);
      return x;
    }