maliput_malidrive
|
Describes cubic polynomial function behind Function interface.
Models the following function:
\( F(p) = a p^3 + b p^2 + c p + d / p ∈ [p0; p1] \).
Provided that it is a polynomial: \( F(p) is G¹ ⩝ p ∈ ℝ \).
Queries accept p ∈ [p0, p1] with a linear tolerance.
#include <src/maliput_malidrive/road_curve/cubic_polynomial.h>
Public Member Functions | |
MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (CubicPolynomial) | |
CubicPolynomial (double a, double b, double c, double d, double p0, double p1, double linear_tolerance) | |
Constructs a cubic polynomial. More... | |
Public Member Functions inherited from Function | |
MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN (Function) | |
virtual | ~Function ()=default |
double | f (double p) const |
Evaluates \( F(p) \). More... | |
double | f_dot (double p) const |
Evaluates \( F'(p) \). More... | |
double | f_dot_dot (double p) const |
Evaluates \( F''(p) \). More... | |
double | p0 () const |
double | p1 () const |
bool | IsG1Contiguous () const |
Additional Inherited Members | |
Static Public Attributes inherited from Function | |
static constexpr double | kEpsilon = 0. |
Implementations may opt to allow a tolerance or be up to kEpsilon away from [p0(); p1()]. More... | |
Protected Member Functions inherited from Function | |
Function ()=default | |
CubicPolynomial | ( | double | a, |
double | b, | ||
double | c, | ||
double | d, | ||
double | p0, | ||
double | p1, | ||
double | linear_tolerance | ||
) |
Constructs a cubic polynomial.
a | The coefficient of third degree monomial. |
b | The coefficient of second degree monomial. |
c | The coefficient of first degree monomial. |
d | The coefficient of independent monomial. |
p0 | Lower bound extreme of the parameter range. It must not be negative and must be less than p1 . |
p1 | Upper bound extreme of the parameter range. It must be greater than p0 . |
linear_tolerance | Tolerance of the range [p0 ; p1 ] that will be used to evaluate the parameter. |
maliput::common::assertion_error | When p0 is negative or p1 is less or equal to p0 . |
maliput::common::assertion_error | When linear_tolerance is not positive. |
MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN | ( | CubicPolynomial | ) |