hpp-spline  4.10.0
template based classes for creating and manipulating spline and bezier curves. Comes with extra options specific to end-effector trajectories in robotics.
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point > Class Template Reference

Represents a polynomf 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 <hpp/spline/polynom.h>

Inheritance diagram for spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >:
Collaboration diagram for spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >:

Public Types

typedef Point point_t
 
typedef T_Point t_point_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_abc< Time, Numeric, Dim, Safe, Point > curve_abc_t
 
typedef Eigen::Matrix< double, Dim, Eigen::Dynamic > coeff_t
 
typedef Eigen::Ref< coeff_tcoeff_t_ref
 
- Public Types inherited from spline::curve_abc< double, double, 3, false, Eigen::Matrix< double, 3, 1 > >
typedef Eigen::Matrix< double, 3, 1 > point_t
 
typedef double time_t
 

Public Member Functions

 polynom (const coeff_t &coefficients, const time_t min, const time_t max)
 Constructor. More...
 
 polynom (const T_Point &coefficients, const time_t min, const time_t max)
 Constructor. More...
 
template<typename In >
 polynom (In zeroOrderCoefficient, In out, const time_t min, const time_t max)
 Constructor. More...
 
 ~polynom ()
 Destructor. More...
 
 polynom (const polynom &other)
 
virtual point_t operator() (const time_t t) const
 Evaluation of the cubic spline at time t using horner's scheme. More...
 
virtual point_t derivate (const time_t t, const std::size_t order) const
 Evaluation of the derivative spline at time t. More...
 
virtual num_t min () const
 Returns the minimum time for wich curve is defined. More...
 
virtual num_t max () const
 Returns the maximum time for wich curve is defined. More...
 
- Public Member Functions inherited from spline::curve_abc< double, double, 3, false, Eigen::Matrix< double, 3, 1 > >
 curve_abc ()
 Constructor. More...
 
virtual ~curve_abc ()
 Destructor. More...
 
virtual point_t operator() (const time_t t) const=0
 Evaluation of the cubic spline at time t. More...
 
virtual point_t derivate (const time_t t, const std::size_t order) const=0
 Evaluation of the derivative spline at time t. More...
 
virtual time_t min () const=0
 Returns the minimum time for wich curve is defined. More...
 
virtual time_t max () const=0
 Returns the maximum time for wich curve is defined. More...
 
std::pair< time_t, time_ttimeRange ()
 

Public Attributes

coeff_t coefficients_
 
std::size_t dim_
 
std::size_t order_
 

Detailed Description

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
class spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >

Represents a polynomf 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 Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Eigen::Matrix<double, Dim, Eigen::Dynamic> spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::coeff_t

◆ coeff_t_ref

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Eigen::Ref<coeff_t> spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::coeff_t_ref

◆ curve_abc_t

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef curve_abc<Time, Numeric, Dim, Safe, Point> spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::curve_abc_t

◆ num_t

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Numeric spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::num_t

◆ point_t

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Point spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::point_t

◆ t_point_t

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef T_Point spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::t_point_t

◆ time_t

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
typedef Time spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::time_t

Constructor & Destructor Documentation

◆ polynom() [1/4]

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::polynom ( const coeff_t coefficients,
const time_t  min,
const time_t  max 
)
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

◆ polynom() [2/4]

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::polynom ( const T_Point &  coefficients,
const time_t  min,
const time_t  max 
)
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

◆ polynom() [3/4]

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
template<typename In >
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::polynom ( In  zeroOrderCoefficient,
In  out,
const time_t  min,
const time_t  max 
)
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

◆ ~polynom()

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::~polynom ( )
inline

Destructor.

◆ polynom() [4/4]

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::polynom ( const polynom< Time, Numeric, Dim, Safe, Point, T_Point > &  other)
inline

Member Function Documentation

◆ derivate()

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual point_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_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)

◆ max()

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual num_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::max ( ) const
inlinevirtual

Returns the maximum time for wich curve is defined.

◆ min()

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual num_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::min ( ) const
inlinevirtual

Returns the minimum time for wich curve is defined.

◆ operator()()

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual point_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_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)

Member Data Documentation

◆ coefficients_

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
coeff_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::coefficients_

◆ dim_

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
std::size_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::dim_

◆ order_

template<typename Time = double, typename Numeric = Time, std::size_t Dim = 3, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Dim, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
std::size_t spline::polynom< Time, Numeric, Dim, Safe, Point, T_Point >::order_

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