List<List<DistanceResultPair<D>>> reachDistRKNNs = lofResult.getRkNNReach().getRKNNForBulkDBIDs(lrd_ids, k);
ArrayDBIDs affected_lrd_id_candidates = mergeIDs(reachDistRKNNs, lrd_ids);
ArrayModifiableDBIDs affected_lrd_ids = DBIDUtil.newArray(affected_lrd_id_candidates.size());
WritableDoubleDataStore new_lrds = computeLRDs(affected_lrd_id_candidates, lofResult.getKNNReach());
for(DBID id : affected_lrd_id_candidates) {
double new_lrd = new_lrds.doubleValue(id);
double old_lrd = lofResult.getLrds().doubleValue(id);
if(Double.isNaN(old_lrd) || old_lrd != new_lrd) {
lofResult.getLrds().putDouble(id, new_lrd);
affected_lrd_ids.add(id);
}