Public Types | Public Member Functions | Protected Attributes | Private Attributes
towr::Polynomial Class Reference

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

#include <polynomial.h>

Inheritance diagram for towr::Polynomial:
Inheritance graph
[legend]

List of all members.

Public Types

enum  Coefficients {
  A = 0, B, C, D,
  E, F, G, H,
  I, J
}

Public Member Functions

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

Protected Attributes

std::vector< VectorXd > coeff_

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 Enumeration Documentation

Enumerator:
A 
B 
C 
D 
E 
F 
G 
H 
I 
J 

Definition at line 55 of file polynomial.h.


Constructor & Destructor Documentation

towr::Polynomial::Polynomial ( int  poly_order,
int  poly_dim 
) [explicit]

Constructs a polynomial with zero coefficient values.

Parameters:
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 polynomial.cc.

virtual towr::Polynomial::~Polynomial ( ) [virtual]

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.

Parameters:
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 polynomial.cc.

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

Definition at line 47 of file polynomial.cc.


Member Data Documentation

std::vector<VectorXd> towr::Polynomial::coeff_ [protected]

Definition at line 83 of file polynomial.h.

CoeffIDVec towr::Polynomial::coeff_ids_ [private]

Definition at line 86 of file polynomial.h.


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


towr
Author(s): Alexander W. Winkler
autogenerated on Mon Apr 15 2019 02:42:32