Metric

A Metric[V] is a function (V, V) => Double that satisfies the following properties:

1. m(v1, v2) >= 0
2. m(v1, v2) == 0 iff v1 == v2
3. m(v1, v2) == m(v2, v1)
4. m(v1, v3) <= m(v1, v2) + m(v2, v3)

If you implement this trait, make sure that you follow these rules.

Documentation Help

We’d love your help fleshing out this documentation! You can edit this page in your browser by clicking this link. These links might be helpful: