Commit Graph

1 Commits

Author SHA1 Message Date
Manuel Simon bef01a8a86 Add traits `Distance` and `Norm` in order to provide abstract notions of distances between numbers.
The `Norm` trait provides a `norm` function for types that represent a normed vector space – e.g. the absolute value of a float or the norm of a complex number.

The `Distance` trait provides a `distance` function to still calculate the distance between two values if no sensible norm can be defined.
2019-08-07 20:53:05 +02:00