Namespace containing distance calculation functions and types. More...
Classes | |
| struct | PolarPoint |
Enumerations | |
| enum class | Type : std::uint8_t { Euclid , Polar , Manhattan } |
| Enumerates supported distance calculation types. More... | |
Functions | |
| double | euclideanSquared (const Point &p1, const Point &p2) |
| Computes the squared Euclidean distance between two points. | |
| double | manhattanSquared (const Point &p1, const Point &p2) |
| Computes the squared Manhattan distance between two points. | |
| double | polarSquared (const Point &p1, const Point &p2) |
| Computes the squared polar distance between two points. | |
| std::function< double(Point p1, Point p2)> | funcToType (Type funcType) |
| Maps a distance function type to its corresponding function. | |
Namespace containing distance calculation functions and types.
|
strong |
Computes the squared Euclidean distance between two points.
| p1 | The first point. |
| p2 | The second point. |
Maps a distance function type to its corresponding function.
| funcType | The type of distance function. |
Computes the squared Manhattan distance between two points.
| p1 | The first point. |
| p2 | The second point. |