maliput_malidrive
CubicPolynomial Class Reference

Detailed Description

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>

Inheritance diagram for CubicPolynomial:
[legend]

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
 

Constructor & Destructor Documentation

◆ CubicPolynomial()

CubicPolynomial ( double  a,
double  b,
double  c,
double  d,
double  p0,
double  p1,
double  linear_tolerance 
)

Constructs a cubic polynomial.

Parameters
aThe coefficient of third degree monomial.
bThe coefficient of second degree monomial.
cThe coefficient of first degree monomial.
dThe coefficient of independent monomial.
p0Lower bound extreme of the parameter range. It must not be negative and must be less than p1.
p1Upper bound extreme of the parameter range. It must be greater than p0.
linear_toleranceTolerance of the range [p0; p1] that will be used to evaluate the parameter.
Exceptions
maliput::common::assertion_errorWhen p0 is negative or p1 is less or equal to p0.
maliput::common::assertion_errorWhen linear_tolerance is not positive.

Member Function Documentation

◆ MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN()

MALIDRIVE_NO_COPY_NO_MOVE_NO_ASSIGN ( CubicPolynomial  )

The documentation for this class was generated from the following file: