tests and implementation for computeEuclidean