template<typename T>
class rl::math::Function< T >
A mathematical mapping from Real -> ArrayX.
A Function is guaranteed to be defined in the interval [lower() upper()], and may be defined outside this interval. Its computation is expected to be numerically stable, accurate and efficient.
Evaluates the function or a derivative thereof for a given value x.
Some functions are only defined in the interval [lower(), upper()], and fail to evaluate outside of [lower() - FUNCTION_BOUNDARY, upper() + FUNCTION_BOUNDARY]. In Debug mode, this is signaled by failing asserts. In Release mode, the function is evaluated if algebraically possible, or will return an empty ArrayX otherwise. Some functions are not indefinitely often differentiable, and will return a NaN array for all higher orders.
- Parameters
-
[in] | x | Input value of the function or derivative |
[in] | derivative | Order of the derivative to be evaluated |
Implemented in rl::math::Spline< Quaternion >, rl::math::Spline< T >, rl::math::Polynomial< Quaternion >, rl::math::Polynomial< T >, rl::math::NestedFunction< T2, T >, rl::math::Circular< Vector3 >, and rl::math::Circular< Vector2 >.