docs: public OutlierResult run(Database database, Relation<O> relation) {
      final DistanceQuery<O> distanceQuery = database.getDistanceQuery(relation, getDistanceFunction());
      final KNNQuery<O> knnQuery = database.getKNNQuery(distanceQuery, k + 1);
  
      FiniteProgress prog = LOG.isVerbose() ? new FiniteProgress("kNN distance for objects", relation.size(), LOG) : null;
  
      DoubleMinMax minmax = new DoubleMinMax();
      WritableDoubleDataStore id_score = DataStoreUtil.makeDoubleStorage(relation.getDBIDs(), DataStoreFactory.HINT_STATIC);
      for(DBIDIter iditer = relation.iterDBIDs(); iditer.valid(); iditer.advance()) {
        double id = 0.;
        try {
          id = estimator.estimate(knnQuery, iditer, k + 1);
        }
        catch(ArithmeticException e) {
          // pass
        }
        id_score.putDouble(iditer, id);
        minmax.put(id);
  
        LOG.incrementProcessed(prog);
      }
      LOG.ensureCompleted(prog);
      DoubleRelation scoreres = new MaterializedDoubleRelation("Intrinsic dimensionality", "id-score", id_score, relation.getDBIDs());
      OutlierScoreMeta meta = new BasicOutlierScoreMeta(minmax.getMin(), minmax.getMax(), 0.0, Double.POSITIVE_INFINITY, 0.0);
      return new OutlierResult(meta, scoreres);
    }