docs: private void computeDistances(ModifiableDoubleDBIDList nlist, DBIDIter query, final DistanceQuery<O> distQuery, Relation<O> relation) {
      nlist.clear();
      O qo = relation.get(query);
      for(DBIDIter ri = relation.iterDBIDs(); ri.valid(); ri.advance()) {
        if(!includeSelf && DBIDUtil.equal(ri, query)) {
          continue;
        }
        double dist = distQuery.distance(qo, ri);
        if(dist != dist) { /* NaN */
          dist = Double.POSITIVE_INFINITY;
        }
        nlist.add(dist, ri);
      }
      nlist.sort();
    }