code: protected double eculideanDistNormEAbandon(double[] ts1, double[] ts2, double bsfDist) {
      double dist = 0;
      double tsLen = ts1.length;
  
      double bsf = Math.pow(tsLen * bsfDist, 2);
  
      for (int i = 0; i < ts1.length; i++) {
        double diff = ts1[i] - ts2[i];
        dist += Math.pow(diff, 2);
  
        if (dist > bsf)
          return Double.NaN;
  
      }
      return Math.sqrt(dist) / tsLen;
    }
docs: Normalized early abandoned Euclidean distance.
  
  @param ts1 the first series.
  @param ts2 the second series.
  @param bsfDist the distance value (used for early abandon).
  @return the distance value.