Go to the documentation of this file.
34 template <TRobustKernelType KERNEL_TYPE,
typename T =
double>
48 inline T
eval(
const T r2, T& out_1st_deriv, T& out_2nd_deriv)
67 inline T
eval(
const T r2, T& out_1st_deriv, T& out_2nd_deriv)
69 const T param_sq_inv = 1.0 / param_sq;
70 const T
a = 1 + r2 * param_sq_inv;
71 const T
b = std::sqrt(
a);
72 out_1st_deriv = 1. /
b;
73 out_2nd_deriv = -0.5 * param_sq_inv * out_1st_deriv /
a;
74 return 2 * param_sq * (
b - 1);
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
T param_sq
The kernel parameter (the "threshold") squared [Not used in this class, provided for consistency with...
TRobustKernelType
The different types of kernels for usage within a robustified least-squares estimator.
T eval(const T r2, T &out_1st_deriv, T &out_2nd_deriv)
Evaluates the kernel function for the squared error r2 and returns robustified squared error and deri...
@ rkPseudoHuber
Pseudo-huber robust kernel.
T eval(const T r2, T &out_1st_deriv, T &out_2nd_deriv)
Evaluates the kernel function for the squared error r2 and returns robustified squared error and deri...
@ rkLeastSquares
No robust kernel, use standard least squares: rho(r)= 1/2 * r^2.
T param_sq
The kernel parameter (the "threshold") squared.
GLubyte GLubyte GLubyte a
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST | |