code: private void step2(DBIDRef id, DBIDArrayIter it, int n, DistanceQuery<? super O> distQuery, WritableDoubleDataStore m) {
      for(it.seek(0); it.getOffset() < n; it.advance()) {
        // M(i) = dist(i, n+1)
        m.putDouble(it, distQuery.distance(it, id));
      }
    }
docs: Second step: Determine the pairwise distances from all objects in the
  pointer representation to the new object with the specified id.
  
  @param id the id of the object to be inserted into the pointer
  representation
  @param it Array iterator
  @param n Last object
  @param distQuery Distance query
  @param m Data store