code: public double getSquaredDistance(final DBIDRef id1, final DBIDRef id2) {
      final int o1 = idmap.getOffset(id1), o2 = idmap.getOffset(id2);
      return kernel[o1][o1] + kernel[o2][o2] - 2 * kernel[o1][o2];
    }
docs: Returns the squared kernel distance between the two specified objects.
  
  @param id1 first ObjectID
  @param id2 second ObjectID
  @return the distance between the two objects