docs: protected LOFResult<O> doRunInTime(DBIDs ids, KNNQuery<O> kNNRefer, KNNQuery<O> kNNReach, StepProgress stepprog) {
      // Assert we got something
      if(kNNRefer == null) {
        throw new AbortException("No kNN queries supported by database for reference neighborhood distance function.");
      }
      if(kNNReach == null) {
        throw new AbortException("No kNN queries supported by database for reachability distance function.");
      }
  
      // Compute LRDs
      LOG.beginStep(stepprog, 2, "Computing LRDs.");
      WritableDoubleDataStore lrds = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_HOT | DataStoreFactory.HINT_TEMP);
      computeLRDs(kNNReach, ids, lrds);
  
      // compute LOF_SCORE of each db object
      LOG.beginStep(stepprog, 3, "Computing LOFs.");
      WritableDoubleDataStore lofs = DataStoreUtil.makeDoubleStorage(ids, DataStoreFactory.HINT_STATIC);
      // track the maximum value for normalization.
      DoubleMinMax lofminmax = new DoubleMinMax();
      computeLOFs(kNNRefer, ids, lrds, lofs, lofminmax);
  
      LOG.setCompleted(stepprog);
  
      // Build result representation.
      DoubleRelation scoreResult = new MaterializedDoubleRelation("Local Outlier Factor", "lof-outlier", lofs, ids);
      OutlierScoreMeta scoreMeta = new QuotientOutlierScoreMeta(lofminmax.getMin(), lofminmax.getMax(), 0.0, Double.POSITIVE_INFINITY, 1.0);
      OutlierResult result = new OutlierResult(scoreMeta, scoreResult);
      return new LOFResult<>(result, kNNRefer, kNNReach, lrds, lofs);
    }