Class AbsoluteValueRegularizedWithErf0

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::AbsoluteValueRegularizedWithErf0 : public Mechatronix::AbsoluteValueRegularizedWithErf

Absolute value smoothed

\[ |x| \approx |x|_{0,\kappa} = |x|_{\kappa} - |0|_{\kappa} \]

where

\[ |x| \approx |x|_{\kappa} =x\cdot\mathrm{erf}(\kappa x)+\frac{\mathrm{e}^{-\kappa^2 x^2}}{\kappa\sqrt{\pi}} \]

where \( \kappa \) satisfy

\[ (|h|_{\kappa})' = 1-h \]

Public Functions

virtual real_type operator()(real_type x) const override

../_images/AbsoluteValueRegularizedWithErf_0.jpeg

void setup(GenericContainer const &gc) override

Initialize class using generic container that must contain gc("h") the value of the smoothing parameter.

void setup(real_type h)

Initialize AbsoluteValueRegularizedWithErf given h

Initialize class setting the smoothing parameter h

inline void update_h(real_type h)

Update the smoothing parameter h