|
| polynomial () |
| Empty constructor. More...
|
|
| polynomial (const coeff_t &coefficients, const time_t min, const time_t max) |
| Constructor. More...
|
|
| polynomial (const T_Point &coefficients, const time_t min, const time_t max) |
| Constructor. More...
|
|
template<typename In > |
| polynomial (In zeroOrderCoefficient, In out, const time_t min, const time_t max) |
| Constructor. More...
|
|
| polynomial (const Point &init, const Point &end, const time_t min, const time_t max) |
| Constructor from boundary condition with C0 : create a polynomial that connect exactly init and end (order 1) More...
|
|
| polynomial (const Point &init, const Point &d_init, const Point &end, const Point &d_end, const time_t min, const time_t max) |
| Constructor from boundary condition with C1 : create a polynomial that connect exactly init and end and thier first order derivatives(order 3) More...
|
|
| polynomial (const Point &init, const Point &d_init, const Point &dd_init, const Point &end, const Point &d_end, const Point &dd_end, const time_t min, const time_t max) |
| Constructor from boundary condition with C2 : create a polynomial that connect exactly init and end and thier first and second order derivatives(order 5) More...
|
|
| ~polynomial () |
| Destructor. More...
|
|
| polynomial (const polynomial &other) |
|
virtual point_t | operator() (const time_t t) const |
| Evaluation of the cubic spline at time t using horner's scheme. More...
|
|
bool | isApprox (const polynomial_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
| isApprox check if other and *this are approximately equals. More...
|
|
virtual bool | isApprox (const curve_abc_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
|
virtual bool | operator== (const polynomial_t &other) const |
|
virtual bool | operator!= (const polynomial_t &other) const |
|
virtual point_t | derivate (const time_t t, const std::size_t order) const |
| Evaluation of the derivative of order N of spline at time t. More...
|
|
polynomial_t | compute_derivate (const std::size_t order) const |
|
polynomial_t * | compute_derivate_ptr (const std::size_t order) const |
| Compute the derived curve at order N. More...
|
|
Eigen::MatrixXd | coeff () const |
|
point_t | coeffAtDegree (const std::size_t degree) const |
|
virtual std::size_t | dim () const |
| Get dimension of curve. More...
|
|
virtual num_t | min () const |
| Get the minimum time for which the curve is defined. More...
|
|
virtual num_t | max () const |
| Get the maximum time for which the curve is defined. More...
|
|
virtual std::size_t | degree () const |
| Get the degree of the curve. More...
|
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
| curve_abc () |
| Constructor. More...
|
|
virtual | ~curve_abc () |
| Destructor. More...
|
|
bool | isEquivalent (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision(), const size_t order=5) const |
| isEquivalent check if other and *this are approximately equal by values, given a precision treshold. More...
|
|
virtual bool | isApprox (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const=0 |
| isApprox check if other and *this are approximately equals given a precision treshold Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent. More...
|
|
std::pair< time_t, time_t > | timeRange () |
|
void | serialize (Archive &, const unsigned int version) |
|
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
class curves::polynomial< Time, Numeric, Safe, Point, T_Point >
Represents a polynomial of an arbitrary order defined on the interval
.
It follows the equation :

where N is the order and
.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Empty constructor.
Curve obtained this way can not perform other class functions.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Constructor from boundary condition with C0 : create a polynomial that connect exactly init and end (order 1)
- Parameters
-
init | the initial point of the curve |
end | the final point of the curve |
min | : LOWER bound on interval definition of the spline. |
max | : UPPER bound on interval definition of the spline. |
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Constructor from boundary condition with C1 : create a polynomial that connect exactly init and end and thier first order derivatives(order 3)
- Parameters
-
init | the initial point of the curve |
d_init | the initial value of the derivative of the curve |
end | the final point of the curve |
d_end | the final value of the derivative of the curve |
min | : LOWER bound on interval definition of the spline. |
max | : UPPER bound on interval definition of the spline. |
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::min(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial |
( |
const Point & |
init, |
|
|
const Point & |
d_init, |
|
|
const Point & |
dd_init, |
|
|
const Point & |
end, |
|
|
const Point & |
d_end, |
|
|
const Point & |
dd_end, |
|
|
const time_t |
min, |
|
|
const time_t |
max |
|
) |
| |
|
inline |
Constructor from boundary condition with C2 : create a polynomial that connect exactly init and end and thier first and second order derivatives(order 5)
- Parameters
-
init | the initial point of the curve |
d_init | the initial value of the derivative of the curve |
d_init | the initial value of the second derivative of the curve |
end | the final point of the curve |
d_end | the final value of the derivative of the curve |
d_end | the final value of the second derivative of the curve |
min | : LOWER bound on interval definition of the spline. |
max | : UPPER bound on interval definition of the spline. |
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::min(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Eigen::MatrixXd curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff |
( |
| ) |
const |
|
inline |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate_ptr().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual std::size_t curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree |
( |
| ) |
const |
|
inlinevirtual |
Get the degree of the curve.
- Returns
, the degree of the curve.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Evaluation of the derivative of order N of spline at time t.
- Parameters
-
t | : the time when to evaluate the spline. |
order | : order of derivative. |
- Returns
point corresponding on derivative spline at time t.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual std::size_t curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim |
( |
| ) |
const |
|
inlinevirtual |
Get dimension of curve.
- Returns
- dimension of curve.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
bool curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox |
( |
const polynomial_t & |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits<Numeric>::dummy_precision() |
|
) |
| const |
|
inline |
isApprox check if other and *this are approximately equals.
Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
- Parameters
-
other | the other curve to check |
prec | the precision treshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true is the two curves are approximately equals
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::max(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::min(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator==().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
virtual bool curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox |
( |
const curve_abc_t * |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits<Numeric>::dummy_precision() |
|
) |
| const |
|
inlinevirtual |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Get the maximum time for which the curve is defined.
- Returns
upper bound of time range.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Get the minimum time for which the curve is defined.
- Returns
lower bound of time range.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Evaluation of the cubic spline at time t using horner's scheme.
- Parameters
-
t | : time when to evaluate the spline. |
- Returns
point corresponding on spline at time t.
Implements curves::curve_abc< Time, Numeric, Safe, Point >.
References curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coefficients_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree_, curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_max_, and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::T_min_.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
friend class boost::serialization::access |
|
friend |
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeff(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeffAtDegree(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator()(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::coeffAtDegree(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::degree(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator()(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::dim(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::max(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator()(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point = std::vector<Point, Eigen::aligned_allocator<Point> >>
Referenced by curves::polynomial< Time, Numeric, Safe, Point, T_Point >::compute_derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::derivate(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::isApprox(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::min(), curves::polynomial< Time, Numeric, Safe, Point, T_Point >::operator()(), and curves::polynomial< Time, Numeric, Safe, Point, T_Point >::polynomial().