Helios++
Helios software for LiDAR simulations
SurfaceInspector::maths::Distances Class Reference

Class providing common distance computations. More...

#include <Distances.hpp>

Inheritance diagram for SurfaceInspector::maths::Distances:
Collaboration diagram for SurfaceInspector::maths::Distances:

Static Public Member Functions

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...
 

Detailed Description

Class providing common distance computations.

Author
Alberto M. Esmoris Pena
Version
1.0

Member Function Documentation

◆ 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
TType of numerical variable
Parameters
pObject which euclidean distance with respect to q must be calculated
qObject 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
TType of numerical variable
Parameters
pObject which manhattan distance with respect to q must be calculated
qObject 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
TType of numerical variable
Parameters
pObject which euclidean distance with respect to q must be calculated
qObject which euclidean distance with respect to p must be calculated

The documentation for this class was generated from the following file: