Drake
CubicPolynomial Class Reference

A cubic polynomial, f(p) = a + b*p + c*p^2 + d*p^3. More...

#include <drake/automotive/maliput/multilane/cubic_polynomial.h>

Public Member Functions

 CubicPolynomial ()
 Default constructor, all zero coefficients. More...
 
 CubicPolynomial (double a, double b, double c, double d)
 Constructs a cubic polynomial given all four coefficients. More...
 
double a () const
 
double b () const
 
double c () const
 
double d () const
 
int order () const
 Returns the order of the polynomial, based on its nonzero coefficients. More...
 
bool is_zero () const
 Checks whether the polynomial is exactly zero. More...
 
double f_p (double p) const
 Evaluates the polynomial f at p. More...
 
double f_dot_p (double p) const
 Evaluates the derivative df/dp at p. More...
 
double f_ddot_p (double p) const
 Evaluates the double-derivative d^2f/dp^2 at p. More...
 
double s_p (double p) const
 Returns the path-length s along the curve (p, f(p)) from p = 0 to p. More...
 
double p_s (double s) const
 Returns the inverse of the path-length parameterization s_p(p). More...
 
double fake_gprime (double p) const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 CubicPolynomial (const CubicPolynomial &)=default
 
CubicPolynomialoperator= (const CubicPolynomial &)=default
 
 CubicPolynomial (CubicPolynomial &&)=default
 
CubicPolynomialoperator= (CubicPolynomial &&)=default
 

Detailed Description

A cubic polynomial, f(p) = a + b*p + c*p^2 + d*p^3.

Constructor & Destructor Documentation

◆ CubicPolynomial() [1/4]

CubicPolynomial ( const CubicPolynomial )
default

◆ CubicPolynomial() [2/4]

CubicPolynomial ( CubicPolynomial &&  )
default

◆ CubicPolynomial() [3/4]

CubicPolynomial ( )
inline

Default constructor, all zero coefficients.

◆ CubicPolynomial() [4/4]

CubicPolynomial ( double  a,
double  b,
double  c,
double  d 
)
inline

Constructs a cubic polynomial given all four coefficients.

Member Function Documentation

◆ a()

double a ( ) const
inline

◆ b()

double b ( ) const
inline

◆ c()

double c ( ) const
inline

◆ d()

double d ( ) const
inline

◆ f_ddot_p()

double f_ddot_p ( double  p) const
inline

Evaluates the double-derivative d^2f/dp^2 at p.

◆ f_dot_p()

double f_dot_p ( double  p) const
inline

Evaluates the derivative df/dp at p.

◆ f_p()

double f_p ( double  p) const
inline

Evaluates the polynomial f at p.

◆ fake_gprime()

double fake_gprime ( double  p) const
inline

◆ is_zero()

bool is_zero ( ) const
inline

Checks whether the polynomial is exactly zero.

◆ operator=() [1/2]

CubicPolynomial& operator= ( CubicPolynomial &&  )
default

◆ operator=() [2/2]

CubicPolynomial& operator= ( const CubicPolynomial )
default

◆ order()

int order ( ) const
inline

Returns the order of the polynomial, based on its nonzero coefficients.

◆ p_s()

double p_s ( double  s) const
inline

Returns the inverse of the path-length parameterization s_p(p).

◆ s_p()

double s_p ( double  p) const
inline

Returns the path-length s along the curve (p, f(p)) from p = 0 to p.


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