Class providing common distance computations.
More...
#include <Distances.hpp>
|
template<typename T > |
static T | manhattan (vector< T > const &p, vector< T > const &q) |
| Compute the manhattan distance between p and q. More...
|
|
template<typename T > |
static T | euclidean (vector< T > const &p, vector< T > const &q) |
| Compute the euclidean distance between p and q. More...
|
|
template<typename T > |
static T | euclidean (T const px, T const py, T const qx, T const qy) |
|
template<typename T > |
static T | euclidean (T const px, T const py, T const pz, T const qx, T const qy, T const qz) |
|
template<typename T > |
static T | minkowski (int d, vector< T > const &p, vector< T > const &q) |
| Compute the minkowski distance between p and q. More...
|
|
Class providing common distance computations.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
◆ euclidean() [1/3]
template<typename T >
static T SurfaceInspector::maths::Distances::euclidean |
( |
T const |
px, |
|
|
T const |
py, |
|
|
T const |
pz, |
|
|
T const |
qx, |
|
|
T const |
qy, |
|
|
T const |
qz |
|
) |
| |
|
static |
◆ euclidean() [2/3]
template<typename T >
static T SurfaceInspector::maths::Distances::euclidean |
( |
T const |
px, |
|
|
T const |
py, |
|
|
T const |
qx, |
|
|
T const |
qy |
|
) |
| |
|
static |
◆ euclidean() [3/3]
template<typename T >
static T SurfaceInspector::maths::Distances::euclidean |
( |
vector< T > const & |
p, |
|
|
vector< T > const & |
q |
|
) |
| |
|
static |
Compute the euclidean distance between p and q.
\[ \sqrt{\sum_{i=1}^{n}{\left( p_{i} - q_{i} \right)^{2}}} \]
- Template Parameters
-
T | Type of numerical variable |
- Parameters
-
p | Object which euclidean distance with respect to q must be calculated |
q | Object which euclidean distance with respect to p must be calculated |
◆ manhattan()
template<typename T >
static T SurfaceInspector::maths::Distances::manhattan |
( |
vector< T > const & |
p, |
|
|
vector< T > const & |
q |
|
) |
| |
|
static |
Compute the manhattan distance between p and q.
\[ \sum_{i=1}^{n}{\left| p_{i} - q_{i} \right| } \]
- Template Parameters
-
T | Type of numerical variable |
- Parameters
-
p | Object which manhattan distance with respect to q must be calculated |
q | Object which manhattan distance with respect to p must be calculated |
◆ minkowski()
template<typename T >
static T SurfaceInspector::maths::Distances::minkowski |
( |
int |
d, |
|
|
vector< T > const & |
p, |
|
|
vector< T > const & |
q |
|
) |
| |
|
static |
Compute the minkowski distance between p and q.
\[ \left(\sum_{i=1}^{n}{\left|p_{i}-q_{i}\right|^{d}}\right)^{\frac{1}{d}} \]
- Template Parameters
-
T | Type of numerical variable |
- Parameters
-
p | Object which euclidean distance with respect to q must be calculated |
q | Object which euclidean distance with respect to p must be calculated |
The documentation for this class was generated from the following file: