Class ClipIntervalWithTanh

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::ClipIntervalWithTanh : public Mechatronix::IntervalBase

interval clipping class

Inizialization

inline explicit ClipIntervalWithTanh()
void setup(real_type h, real_type delta = 0)

Set h and delta for the approximation of characteristic of clipping function: \( \textrm{clip}(x) \approx \max\{-1,\min\{1,x\}\} \)

\[ \textrm{clip}(x) = \displaystyle\frac{\ln(\cosh(\kappa(x+1)))}{2\kappa} -\displaystyle\frac{\ln(\cosh(\kappa(x-1)))}{2\kappa} \]

where \( \kappa \) satisfy \( \textrm{clip}(1) = 1-h \).

the true clipping is

\[ (1-\delta)\textrm{clip}(x) + \delta\,x \]
void setup(GenericContainer const &gc)

Update

inline void update_h(real_type h)
inline void update_delta(real_type delta)

Evaluate

virtual real_type eval(real_type x) const override

../_images/ClipIntervalWithTanh0.jpeg

virtual real_type eval_D(real_type x) const override

../_images/ClipIntervalWithTanh1.jpeg

virtual real_type eval_DD(real_type x) const override

../_images/ClipIntervalWithTanh2.jpeg

Info

virtual string info() const override