code: private double preDistance(NumberVector v1, NumberVector v2, final int start, final int end) {
      double agg = 0.;
      for(int d = start; d < end; d++) {
        final double xd = v1.doubleValue(d), yd = v2.doubleValue(d);
        final double delta = xd >= yd ? xd - yd : yd - xd;
        agg += MathUtil.powi(delta, intp);
      }
      return agg;
    }
docs: Compute unscaled distance in a range of dimensions.
  
  @param v1 First object
  @param v2 Second object
  @param start First dimension
  @param end Exclusive last dimension
  @return Aggregated values.