Complete distance measure.