Skip to content

Commit

Permalink
Comment on how type hierarchy differs from maths definitions, PR #157
Browse files Browse the repository at this point in the history
  • Loading branch information
dkarrasch authored May 11, 2020
2 parents 31bff8d + f90798e commit 1a03b7e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,14 @@ At the top of this hierarchy is an abstract class **PreMetric**, which is define

d(x, z) <= d(x, y) + d(y, z) for all x, y, z

This type system has practical significance. For example, when computing pairwise distances between a set of vectors, you may only perform computation for half of the pairs, and derive the values immediately for the remaining halve by leveraging the symmetry of *semi-metrics*.
This type system has practical significance. For example, when computing pairwise distances
between a set of vectors, you may only perform computation for half of the pairs, derive the
values immediately for the remaining half by leveraging the symmetry of *semi-metrics*. Note
that the types of `SemiMetric` and `Metric` do not completely follow the definition in
mathematics as they do not require the "distance" to be able to distinguish between points:
for these types `x != y` does not imply that `d(x, y) != 0` in general compared to the
mathematical definition of semi-metric and metric, as this property does not change
computations in practice.

Each distance corresponds to a distance type. The type name and the corresponding mathematical definitions of the distances are listed in the following table.

Expand Down

0 comments on commit 1a03b7e

Please sign in to comment.