Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
towr::Polynomial Class Reference

A polynomial of arbitrary order and dimension. More...

#include <polynomial.h>

Inheritance diagram for towr::Polynomial:
Inheritance graph

Public Types

enum  Coefficients {
  A =0, B, C, D,
  E, F, G, H,
  I, J
using CoeffIDVec = std::vector< Coefficients >
using VectorXd = Eigen::VectorXd

Public Member Functions

double GetDerivativeWrtCoeff (double t, Dx poly_deriv, Coefficients coeff) const
 The derivative of the polynomial with respect to the coefficients. More...
State GetPoint (double t) const
 Polynomial (int poly_order, int poly_dim)
 Constructs a polynomial with zero coefficient values. More...
virtual ~Polynomial ()=default

Protected Attributes

std::vector< VectorXdcoeff_

Private Attributes

CoeffIDVec coeff_ids_

Detailed Description

A polynomial of arbitrary order and dimension.

A polynomial, e.g. 5th order is defined as: f(t) = Ft^5 + Et^4 + Dt^3 + Ct^2 + Bt + A fd(t) = 5Ft^4 + 4Et^3 + 3Dt^2 + 2Ct + B fdd(t) = 20Ft^3 + 12Et^2 + 6Dt + 2C

This class is responsible for calculating the values f(t) and higher order derivatives from the coefficient values.

Definition at line 53 of file polynomial.h.

Member Typedef Documentation

Definition at line 56 of file polynomial.h.

using towr::Polynomial::VectorXd = Eigen::VectorXd

Definition at line 57 of file polynomial.h.

Member Enumeration Documentation


Definition at line 55 of file polynomial.h.

Constructor & Destructor Documentation

towr::Polynomial::Polynomial ( int  poly_order,
int  poly_dim 

Constructs a polynomial with zero coefficient values.

poly_orderThe highest exponent of t, e.g. 5-th order -> t^5.
poly_dimThe dimensions of f(t), e.g. x,y,z.

Definition at line 38 of file

virtual towr::Polynomial::~Polynomial ( )

Member Function Documentation

double towr::Polynomial::GetDerivativeWrtCoeff ( double  t,
Dx  poly_deriv,
Coefficients  coeff 
) const

The derivative of the polynomial with respect to the coefficients.

tThe time at which the derivative should be evaluated.
poly_derivWhich polynomial derivative f(t), fd(t), function to use.
coeffThe coefficient with respect to which to calculate the derivative.

Definition at line 64 of file

State towr::Polynomial::GetPoint ( double  t) const
The state of the polyomial at a specific time t.

Definition at line 47 of file

Member Data Documentation

std::vector<VectorXd> towr::Polynomial::coeff_

Definition at line 83 of file polynomial.h.

CoeffIDVec towr::Polynomial::coeff_ids_

Definition at line 86 of file polynomial.h.

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

Author(s): Alexander W. Winkler
autogenerated on Sat Apr 13 2019 02:28:00