Interface that must be implemented by a distance metric to be used with the spatial operators and models of Moonlight.