Helios++
Helios software for LiDAR simulations
Distances.hpp
1 #ifndef _SURFACEINSPECTOR_MATHS_DISTANCES_HPP_
2 #define _SURFACEINSPECTOR_MATHS_DISTANCES_HPP_
3 
4 #include <vector>
5 #include <surfaceinspector/util/Object.hpp>
6 
7 using std::vector;
9 
10 namespace SurfaceInspector{ namespace maths {
11 
18 class Distances : public Object{
19 public:
20  // *** STATIC METHODS *** //
21  // ************************ //
35  template <typename T>
36  static T manhattan(vector<T> const &p, vector<T> const &q);
50  template <typename T>
51  static T euclidean(vector<T> const &p, vector<T> const &q);
55  template <typename T>
56  static T euclidean(
57  T const px, T const py,
58  T const qx, T const qy
59  );
63  template <typename T>
64  static T euclidean(
65  T const px, T const py, T const pz,
66  T const qx, T const qy, T const qz
67  );
81  template <typename T>
82  static T minkowski(int d, vector<T> const &p, vector<T> const &q);
83 };
84 }}
85 
86 #include <maths/Distances.tpp>
87 
88 #endif
Class providing common distance computations.
Definition: Distances.hpp:18
static T euclidean(vector< T > const &p, vector< T > const &q)
Compute the euclidean distance between p and q.
static T euclidean(T const px, T const py, T const pz, T const qx, T const qy, T const qz)
static T manhattan(vector< T > const &p, vector< T > const &q)
Compute the manhattan distance between p and q.
static T euclidean(T const px, T const py, T const qx, T const qy)
static T minkowski(int d, vector< T > const &p, vector< T > const &q)
Compute the minkowski distance between p and q.
Class representing an object. All surface inspector classes must extend Object.
Definition: Object.hpp:12