A polynomial of arbitrary order and dimension. More...
#include <polynomial.h>
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< VectorXd >  coeff_ 
Private Attributes  
CoeffIDVec  coeff_ids_ 
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.
using towr::Polynomial::CoeffIDVec = std::vector<Coefficients> 
Definition at line 56 of file polynomial.h.
using towr::Polynomial::VectorXd = Eigen::VectorXd 
Definition at line 57 of file polynomial.h.
Enumerator  

A  
B  
C  
D  
E  
F  
G  
H  
I  
J 
Definition at line 55 of file polynomial.h.

explicit 
Constructs a polynomial with zero coefficient values.
poly_order  The highest exponent of t, e.g. 5th order > t^5. 
poly_dim  The dimensions of f(t), e.g. x,y,z. 
Definition at line 38 of file polynomial.cc.

virtualdefault 
double towr::Polynomial::GetDerivativeWrtCoeff  (  double  t, 
Dx  poly_deriv,  
Coefficients  coeff  
)  const 
The derivative of the polynomial with respect to the coefficients.
t  The time at which the derivative should be evaluated. 
poly_deriv  Which polynomial derivative f(t), fd(t), function to use. 
coeff  The coefficient with respect to which to calculate the derivative. 
Definition at line 64 of file polynomial.cc.
State towr::Polynomial::GetPoint  (  double  t  )  const 
Definition at line 47 of file polynomial.cc.

protected 
Definition at line 83 of file polynomial.h.

private 
Definition at line 86 of file polynomial.h.