SpaceTest.dist¶
-
SpaceTest.
dist
(self)[source]¶ Verify
LinearSpace.dist
.The distance metric is checked for the following properties:
positive definiteness:
d(x, y) >= 0
d(x, y) = 0
iffx = y
symmetry:
d(x, y) = d(y, x)
sub-transitivity:
d(x, z) <= d(x, y) + d(y, z)
compatibility with the norm (if available):
d(x, y) = ||x - y||
References
Wikipedia article on metric