39 #ifndef PCL_COMMON_NORMS_H_
40 #define PCL_COMMON_NORMS_H_
55 enum NormType {
L1,
L2_SQR,
L2,
LINF,
JM,
B,
SUBLINEAR,
CS,
DIV,
PF,
K,
KL,
HIK};
61 template <
typename FloatVectorT>
inline float
71 template <
typename FloatVectorT>
inline float
72 L1_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
81 template <
typename FloatVectorT>
inline float
91 template <
typename FloatVectorT>
inline float
92 L2_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
101 template <
typename FloatVectorT>
inline float
102 Linf_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
111 template <
typename FloatVectorT>
inline float
112 JM_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
121 template <
typename FloatVectorT>
inline float
122 B_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
131 template <
typename FloatVectorT>
inline float
141 template <
typename FloatVectorT>
inline float
142 CS_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
151 template <
typename FloatVectorT>
inline float
152 Div_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
163 template <
typename FloatVectorT>
inline float
164 PF_Norm (FloatVectorT A, FloatVectorT
B,
int dim,
float P1,
float P2);
175 template <
typename FloatVectorT>
inline float
176 K_Norm (FloatVectorT A, FloatVectorT
B,
int dim,
float P1,
float P2);
185 template <
typename FloatVectorT>
inline float
186 KL_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
195 template <
typename FloatVectorT>
inline float
196 HIK_Norm (FloatVectorT A, FloatVectorT
B,
int dim);
199 #include <pcl/common/impl/norms.hpp>
201 #endif //#ifndef PCL_NORMS_H_
float Sublinear_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the sublinear norm of the vector between two points.
NormType
Enum that defines all the types of norms available.
float L2_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the L2 norm of the vector between two points.
float CS_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the CS norm of the vector between two points.
float L2_Norm_SQR(FloatVectorT a, FloatVectorT b, int dim)
Compute the squared L2 norm of the vector between two points.
float Div_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the div norm of the vector between two points.
float KL_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the KL between two discrete probability density functions.
float JM_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the JM norm of the vector between two points.
float Linf_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the L-infinity norm of the vector between two points.
float HIK_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the HIK norm of the vector between two points.
float selectNorm(FloatVectorT a, FloatVectorT b, int dim, NormType norm_type)
Method that calculates any norm type available, based on the norm_type variable.
float K_Norm(FloatVectorT a, FloatVectorT b, int dim, float P1, float P2)
Compute the K norm of the vector between two points.
float L1_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the L1 norm of the vector between two points.
float PF_Norm(FloatVectorT a, FloatVectorT b, int dim, float P1, float P2)
Compute the PF norm of the vector between two points.
float B_Norm(FloatVectorT a, FloatVectorT b, int dim)
Compute the B norm of the vector between two points.