new-metric function

Construct a new metric function