Class AbsoluteValueRegularizedWithTanh0

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::AbsoluteValueRegularizedWithTanh0 : public Mechatronix::RegularizedBase

Evaluate

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

where

\[ |x|_{\kappa} = \frac{1}{\kappa}\log(\mathrm{cosh}(\kappa x)) \]

Inizialization

inline explicit AbsoluteValueRegularizedWithTanh0()
virtual 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 class setting the smoothing parameter h

inline void update_h(real_type h)

Update the smoothing parameter h

Evaluate

virtual real_type operator()(real_type x) const override
virtual real_type D(real_type x) const override

compute first derivative of regularized function

virtual real_type DD(real_type x) const override

compute second derivative of regularized function

Info

virtual string info() const override