Finds the Euclidean distance between points, if distance is above the threshold, abandons the computation and returns NAN.
early_abandoned_dist(seq1, seq2, upper_limit)
the array 1.
the array 2.
the max value after reaching which the distance computation stops and the NAN is returned.