Class ClipIntervalWithPolynomial

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::ClipIntervalWithPolynomial : public Mechatronix::IntervalBase

interval clipping class

Inizialization

inline explicit ClipIntervalWithPolynomial()
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\}\} \)

\[\begin{split} \textrm{clip}(x) = \begin{cases} -1 & $x \leq 1-h$ \\[1em] -1+\frac{(3h-x-1)(1+h+x)^3}{16 h^3} & $x<h-1$ \\[1em] x & $x<1-h$ \\[1em] 1-\frac{(x-1+3h)(1+h-x)^3}{16 h^3} & $x<1+h$ \\[1em] 1 & otherwise \end{cases} \end{split}\]

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/ClipIntervalWithPolynomial0.jpeg

virtual real_type eval_D(real_type x) const override

../_images/ClipIntervalWithPolynomial1.jpeg

virtual real_type eval_DD(real_type x) const override

../_images/ClipIntervalWithPolynomial2.jpeg

Info

virtual string info() const override