Set<DistanceResultPair<D>> rknns = materialized_RkNN.get(kNN.getDBID());
rknns.add(new GenericDistanceResultPair<D>(kNN.getDistance(), id));
}
}
// update the RkNNs of the kNNs
TreeSetDBIDs idsSet = DBIDUtil.newTreeSet(ids);
for(int i = 0; i < kNN_ids.size(); i++) {
DBID id = kNN_ids.get(i);
SortedSet<DistanceResultPair<D>> rkNN = materialized_RkNN.get(id);
for(Iterator<DistanceResultPair<D>> it = rkNN.iterator(); it.hasNext();) {
DistanceResultPair<D> drp = it.next();
if(idsSet.contains(drp.getDBID())) {
it.remove();
}
}
}