dlib.math.interpolation.smoothstep

Sigmoid-like functions for clamping and non-linear interpolation of values in [0, 1] range.

Members

Functions

hermiteSmoothstep
T hermiteSmoothstep(T x, float e0, float e1)

Hermite polynomial, analogous to GLSL smoothstep. e0 and e1 define lower and upper edges of Hermite function.

rationalSmoothstep
T rationalSmoothstep(T x, float k)

Rational sigmoid that becomes linear at k=0 and discrete at k=1. Allows varying between linear and nearest-neighbour interpolation.

Meta

Authors

Timur Gafarov