|
Chebyshev
Unit testing for scientific software
|
Distance functions. More...
#include <cmath>Go to the source code of this file.
Namespaces | |
| namespace | chebyshev |
| General namespace of the framework. | |
| namespace | chebyshev::prec::distance |
| Distance functions for use in prec_context::equals() | |
Functions | |
| template<typename Type = real_t> | |
| prec_t | chebyshev::prec::distance::absolute (Type a, Type b) |
| Absolute distance between two values which have an ordering with respect to zero. | |
| template<typename Vector > | |
| prec_t | chebyshev::prec::distance::euclidean (const Vector &v1, const Vector &v2) |
| Euclidean distance between vectors (any type with a size() method and [] operator). | |
| unsigned int | chebyshev::prec::distance::hamming (const std::string &a, const std::string &b) |
| Hamming distance between two strings, defined as the number of positions at which the corresponding characters are different. | |
Distance functions.