Class AbsoluteValueRegularizedWithPolynomial

Inheritance Relationships

Base Type

Class Documentation

class Mechatronix::AbsoluteValueRegularizedWithPolynomial : public Mechatronix::RegularizedBase

Absolute value smoothed

Evaluate

\[\begin{split} |x| \approx \begin{cases} -x-h/3 & x < -h \\[1em] (3h+x)(x/h)^2/3 & x<0 \\[1em] (3h-x)(x/h)^2/3 & x<h \\[1em] x-h/3 & \textrm{otherwise} \end{cases} \end{split}\]

../_images/AbsoluteValueRegularizedWithPolynomial_0.jpeg

Inizialization

inline explicit AbsoluteValueRegularizedWithPolynomial()
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 AbsoluteValueRegularizedWithPolynomial given 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

../_images/AbsoluteValueRegularizedWithPolynomial_0.jpeg

virtual real_type D(real_type x) const override

First derivative

../_images/AbsoluteValueRegularizedWithPolynomial_1.jpeg

virtual real_type DD(real_type x) const override

Second derivative

../_images/AbsoluteValueRegularizedWithPolynomial_2.jpeg

Info

virtual string info() const override