10 #ifndef mrpt_robust_kernels_H    11 #define mrpt_robust_kernels_H    32         template <TRobustKernelType KERNEL_TYPE, 
typename T=
double> 
struct RobustKernel;
    41                 inline T 
eval(
const T r2, T & out_1st_deriv, T & out_2nd_deriv)
    43                         out_1st_deriv = 1; out_2nd_deriv = 0;
    55                 inline T 
eval(
const T r2, T & out_1st_deriv, T & out_2nd_deriv)
    57                         const T param_sq_inv = 1.0/param_sq;
    58                         const T 
a = 1+r2*param_sq_inv;
    59                         const T 
b = std::sqrt(
a);
    61                         out_2nd_deriv = -0.5*param_sq_inv*out_1st_deriv/
a;
    62                         return 2*param_sq*(
b-1);; 
 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...
 
T param_sq
The kernel parameter (the "threshold") squared [Not used in this class, provided for consistency with...
 
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...
 
No robust kernel, use standard least squares: rho(r)= 1/2 * r^2. 
 
TRobustKernelType
The different types of kernels for usage within a robustified least-squares estimator. 
 
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. 
 
GLubyte GLubyte GLubyte a
 
T param_sq
The kernel parameter (the "threshold") squared.