code: @Deprecated
    protected final Map<DBID, KNNList> batchNN(N node, DBIDs ids, int kmax) {
      Map<DBID, KNNList> res = new HashMap<>(ids.size());
      for(DBIDIter iter = ids.iter(); iter.valid(); iter.advance()) {
        DBID id = DBIDUtil.deref(iter);
        res.put(id, knnq.getKNNForDBID(id, kmax));
      }
      return res;
    }
docs: Performs a batch k-nearest neighbor query for a list of query objects.
  
  @param node the node representing the subtree on which the query should be
  performed
  @param ids the ids of the query objects
  @param kmax Maximum k value
  
  @deprecated Change to use by-object NN lookups instead.