Add class for distance metric(s).