docs: @Override
    public OutlierResult run(Database database, Relation<O> relation) {
      StepProgress stepprog = LOG.isVerbose() ? new StepProgress("OnlineLOF", 3) : null;
  
      Pair<Pair<KNNQuery<O>, KNNQuery<O>>, Pair<RKNNQuery<O>, RKNNQuery<O>>> queries = getKNNAndRkNNQueries(database, relation, stepprog);
      KNNQuery<O> kNNRefer = queries.getFirst().getFirst();
      KNNQuery<O> kNNReach = queries.getFirst().getSecond();
      RKNNQuery<O> rkNNRefer = queries.getSecond().getFirst();
      RKNNQuery<O> rkNNReach = queries.getSecond().getSecond();
  
      LOFResult<O> lofResult = super.doRunInTime(relation.getDBIDs(), kNNRefer, kNNReach, stepprog);
      lofResult.setRkNNRefer(rkNNRefer);
      lofResult.setRkNNReach(rkNNReach);
  
      // add listener
      KNNListener l = new LOFKNNListener(lofResult);
      ((MaterializeKNNPreprocessor<O>) ((PreprocessorKNNQuery<O>) lofResult.getKNNRefer()).getPreprocessor()).addKNNListener(l);
      ((MaterializeKNNPreprocessor<O>) ((PreprocessorKNNQuery<O>) lofResult.getKNNReach()).getPreprocessor()).addKNNListener(l);
  
      return lofResult.getResult();
    }