RobotArmLib  0.0.4
Robot Arm Library [WIP]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Attributes | List of all members
rb::math::Polynomial Class Reference

A class for constructing polynomial function. More...

#include <polynomial.h>

Public Member Functions

 Polynomial ()
 Default Construction.
 
 Polynomial (const short deg, const double t=0.)
 Construct polynomial with given degree. More...
 
void coeffQuintic (const std::vector< double > &start, const std::vector< double > &end, const double &T)
 Compute the coefficients of quintic (fifth order) polynomial by giving initial conditions of start and end. More...
 
double getPosition (const double &T) const
 Get the value (position) of polynomial f(t) at time T. More...
 
double getVelocity (const double &T) const
 Get the 1st order differential value (velocity) of polynomial f(t) at time T. More...
 
short getDegree (void) const
 Get the degree (order) of the polynomial function. More...
 
rb::math::VectorX getCoeff (void) const
 Get the coefficients of the polynomial function. More...
 

Protected Attributes

short degree_
 An integer indicate degree of polynomial. More...
 
rb::math::VectorX c_
 A vector of coefficient of polynomial. More...
 
double t_
 The duration (time) of polynomial function f(t). More...
 

Detailed Description

A class for constructing polynomial function.

Constructor & Destructor Documentation

rb::math::Polynomial::Polynomial ( const short  deg,
const double  t = 0. 
)
inline

Construct polynomial with given degree.

Member Function Documentation

void rb::math::Polynomial::coeffQuintic ( const std::vector< double > &  start,
const std::vector< double > &  end,
const double &  T 
)
inline

Compute the coefficients of quintic (fifth order) polynomial by giving initial conditions of start and end.

Parameters
startinitial condition of f[0], fd[0], fdd[0].
endinitial condition of f[T], fd[T], fdd[T].
Tduration (time interval) of polynomial function.
rb::math::VectorX rb::math::Polynomial::getCoeff ( void  ) const
inline

Get the coefficients of the polynomial function.

Returns
rb::math::VectorX
short rb::math::Polynomial::getDegree ( void  ) const
inline

Get the degree (order) of the polynomial function.

Returns
short
double rb::math::Polynomial::getPosition ( const double &  T) const
inline

Get the value (position) of polynomial f(t) at time T.

Parameters
Tthe value of certain time.
Returns
double
double rb::math::Polynomial::getVelocity ( const double &  T) const
inline

Get the 1st order differential value (velocity) of polynomial f(t) at time T.

Parameters
Tthe value of a certain time.
Returns
double

Member Data Documentation

rb::math::VectorX rb::math::Polynomial::c_
protected

A vector of coefficient of polynomial.

short rb::math::Polynomial::degree_
protected

An integer indicate degree of polynomial.

double rb::math::Polynomial::t_
protected

The duration (time) of polynomial function f(t).


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