Group all distance and error measure functions