parametriccurves::Polynomial< Numeric, Dim, Point > Class Template Reference

Represents a Polynomialf arbitrary order defined on the interval [tBegin, tEnd]. It follows the equation x(t) = a + b(t - t_min_) + ... + d(t - t_min_)^N, where N is the order. More...

#include <parametric-curves/polynomial.hpp>

Inheritance diagram for parametriccurves::Polynomial< Numeric, Dim, Point >:
Collaboration diagram for parametriccurves::Polynomial< Numeric, Dim, Point >:

Public Types

typedef Point point_t
 
typedef Numeric time_t
 
typedef Numeric num_t
 
typedef std::vector< Point, Eigen::aligned_allocator< Point > > t_point_t
 
typedef AbstractCurve< Numeric, Point > curve_abc_t
 
typedef Eigen::Matrix< double, Dim, Eigen::Dynamic > coeff_t
 
typedef Eigen::Ref< coeff_tcoeff_t_ref
 
- Public Types inherited from parametriccurves::AbstractCurve< double, Eigen::Matrix< double, 3, 1 > >
typedef Eigen::Matrix< double, 3, 1 > point_t
 
typedef double time_t
 
typedef double num_t
 

Public Member Functions

 Polynomial (const coeff_t &coefficients, const time_t tmin, const time_t tmax)
 Constructor. More...
 
 Polynomial (const t_point_t &coefficients, const time_t tmin, const time_t tmax)
 Constructor. More...
 
 Polynomial ()
 
template<typename In >
 Polynomial (In zeroOrderCoefficient, In out, const time_t tmin, const time_t tmax)
 Constructor. More...
 
 ~Polynomial ()
 Destructor. More...
 
 Polynomial (const Polynomial &other)
 
virtual const point_t operator() (const time_t &t) const
 Evaluation of the cubic spline at time t using horner's scheme. More...
 
virtual const point_t derivate (const time_t &t, const std::size_t &order) const
 Evaluation of the derivative spline at time t. More...
 
virtual const std::size_t & size () const
 
virtual bool setInitialPoint (const point_t &)
 
virtual bool setInitialPoint (const num_t &)
 
- Public Member Functions inherited from parametriccurves::AbstractCurve< double, Eigen::Matrix< double, 3, 1 > >
 AbstractCurve (time_t t_min_, time_t t_max_)
 
 AbstractCurve ()
 
virtual ~AbstractCurve ()
 
virtual const point_t operator() (const time_t &t) const=0
 Evaluation of the cubic spline at time t. More...
 
virtual const point_t derivate (const time_t &t, const std::size_t &order) const=0
 Evaluation of the derivative spline at time t. More...
 
virtual const time_t tmin () const
 
virtual const time_t tmax () const
 
virtual bool checkRange (const time_t t) const
 
virtual bool setInitialPoint (const point_t &)=0
 
virtual bool setInitialPoint (const num_t &)=0
 
virtual bool setTimePeriod (const time_t &traj_time_)
 

Protected Attributes

coeff_t coefficients_
 
std::size_t dim_
 
std::size_t order_
 
- Protected Attributes inherited from parametriccurves::AbstractCurve< double, Eigen::Matrix< double, 3, 1 > >
time_t t_min
 
time_t t_max
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
class parametriccurves::Polynomial< Numeric, Dim, Point >

Represents a Polynomialf arbitrary order defined on the interval [tBegin, tEnd]. It follows the equation x(t) = a + b(t - t_min_) + ... + d(t - t_min_)^N, where N is the order.

Member Typedef Documentation

◆ coeff_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Eigen::Matrix<double, Dim, Eigen::Dynamic> parametriccurves::Polynomial< Numeric, Dim, Point >::coeff_t

◆ coeff_t_ref

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Eigen::Ref<coeff_t> parametriccurves::Polynomial< Numeric, Dim, Point >::coeff_t_ref

◆ curve_abc_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef AbstractCurve<Numeric, Point> parametriccurves::Polynomial< Numeric, Dim, Point >::curve_abc_t

◆ num_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Numeric parametriccurves::Polynomial< Numeric, Dim, Point >::num_t

◆ point_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Point parametriccurves::Polynomial< Numeric, Dim, Point >::point_t

◆ t_point_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef std::vector<Point, Eigen::aligned_allocator<Point> > parametriccurves::Polynomial< Numeric, Dim, Point >::t_point_t

◆ time_t

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
typedef Numeric parametriccurves::Polynomial< Numeric, Dim, Point >::time_t

Constructor & Destructor Documentation

◆ Polynomial() [1/5]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
parametriccurves::Polynomial< Numeric, Dim, Point >::Polynomial ( const coeff_t coefficients,
const time_t  tmin,
const time_t  tmax 
)
inline

Constructor.

Parameters
coefficients: a reference to an Eigen matrix where each column is a coefficient, from the zero order coefficient, up to the highest order. Spline order is given by the number of the columns -1.
minLOWER bound on interval definition of the spline
maxUPPER bound on interval definition of the spline

◆ Polynomial() [2/5]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
parametriccurves::Polynomial< Numeric, Dim, Point >::Polynomial ( const t_point_t coefficients,
const time_t  tmin,
const time_t  tmax 
)
inline

Constructor.

Parameters
coefficients: a container containing all coefficients of the spline, starting with the zero order coefficient, up to the highest order. Spline order is given by the size of the coefficients
minLOWER bound on interval definition of the spline
maxUPPER bound on interval definition of the spline

◆ Polynomial() [3/5]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
parametriccurves::Polynomial< Numeric, Dim, Point >::Polynomial ( )
inline

◆ Polynomial() [4/5]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
template<typename In >
parametriccurves::Polynomial< Numeric, Dim, Point >::Polynomial ( In  zeroOrderCoefficient,
In  out,
const time_t  tmin,
const time_t  tmax 
)
inline

Constructor.

Parameters
zeroOrderCoefficient: an iterator pointing to the first element of a structure containing the coefficients it corresponds to the zero degree coefficient
out: an iterator pointing to the last element of a structure ofcoefficients
minLOWER bound on interval definition of the spline
maxUPPER bound on interval definition of the spline

◆ ~Polynomial()

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
parametriccurves::Polynomial< Numeric, Dim, Point >::~Polynomial ( )
inline

Destructor.

◆ Polynomial() [5/5]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
parametriccurves::Polynomial< Numeric, Dim, Point >::Polynomial ( const Polynomial< Numeric, Dim, Point > &  other)
inline

Member Function Documentation

◆ derivate()

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual const point_t parametriccurves::Polynomial< Numeric, Dim, Point >::derivate ( const time_t t,
const std::size_t &  order 
) const
inlinevirtual

Evaluation of the derivative spline at time t.

Parameters
t: the time when to evaluate the spline
order: order of the derivative
return: the value x(t)

◆ operator()()

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual const point_t parametriccurves::Polynomial< Numeric, Dim, Point >::operator() ( const time_t t) const
inlinevirtual

Evaluation of the cubic spline at time t using horner's scheme.

Parameters
t: the time when to evaluate the spine
return: the value x(t)

◆ setInitialPoint() [1/2]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual bool parametriccurves::Polynomial< Numeric, Dim, Point >::setInitialPoint ( const num_t )
inlinevirtual

◆ setInitialPoint() [2/2]

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual bool parametriccurves::Polynomial< Numeric, Dim, Point >::setInitialPoint ( const point_t )
inlinevirtual

◆ size()

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
virtual const std::size_t& parametriccurves::Polynomial< Numeric, Dim, Point >::size ( ) const
inlinevirtual

Friends And Related Function Documentation

◆ boost::serialization::access

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
friend class boost::serialization::access
friend

Member Data Documentation

◆ coefficients_

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
coeff_t parametriccurves::Polynomial< Numeric, Dim, Point >::coefficients_
protected

◆ dim_

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
std::size_t parametriccurves::Polynomial< Numeric, Dim, Point >::dim_
protected

◆ order_

template<typename Numeric = double, Eigen::Index Dim = 3, typename Point = Eigen::Matrix<Numeric, Dim, 1>>
std::size_t parametriccurves::Polynomial< Numeric, Dim, Point >::order_
protected

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