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 ; }
Normalized early abandoned Euclidean distance .