New SimilarityCriteria

Extract the distance computing as a independent function, i.e., computing_neighbor_distance