docs: protected void convertNeighbors(DBIDRange ids, DBIDRef ix, boolean square, KNNList neighbours, DoubleArray dist, IntegerArray ind, Mean m) {
      for(DoubleDBIDListIter iter = neighbours.iter(); iter.valid(); iter.advance()) {
        if(DBIDUtil.equal(iter, ix)) {
          continue; // Skip query point
        }
        dist.add(iter.doubleValue());
        ind.add(ids.getOffset(iter));
      }
      double id = estimator.estimate(dist.data, dist.size);
      if(m != null) {
        m.put(id);
      }
      double max = dist.data[dist.size - 1];
      if(max > 0) {
        double scaleexp = id * .5; // Generate squared distances.
        double scalelin = 1. / max; // Linear scaling
        for(int i = 0; i < dist.size; i++) {
          dist.data[i] = FastMath.pow(dist.data[i] * scalelin, scaleexp);
        }
      }
    }