ArrayDBIDs kNN_ids = extractAndRemoveIDs(kNNs, aids);
ArrayDBIDs rkNN_ids = extractAndRemoveIDs(rkNNs, aids);
// update the affected kNNs and RkNNs
if(stepprog != null) {
stepprog.beginStep(2, "New deletions ocurred, update the affected kNNs and RkNNs.", getLogger());
}
// update the kNNs of the RkNNs
List<KNNResult<D>> kNNList = knnQuery.getKNNForBulkDBIDs(rkNN_ids, k);
for(int i = 0; i < rkNN_ids.size(); i++) {
DBID id = rkNN_ids.get(i);