17 #ifndef HPP_CORE_TIME_PARAMETERIZATION_POLYNOMIAL_HH 18 # define HPP_CORE_TIME_PARAMETERIZATION_POLYNOMIAL_HH 23 # include <hpp/core/config.hh> 26 # include <path/math.hh> 30 namespace timeParameterization {
37 assert(
a[i] < std::numeric_limits<value_type>::infinity());
38 assert(
a[i] > -std::numeric_limits<value_type>::infinity());
84 return max (fabs(Jac(low)), fabs(Jac(up)));
89 const value_type M = max(fabs(Jac(low)), fabs(Jac(up)));
90 if (low < x_m && x_m < up)
91 return max (M, fabs(
a[1] -
a[2] / 3*
a[3]));
97 throw std::logic_error(
"not implemented");
122 if (order >=
a.size())
return 0;
124 if (
a.size() > MaxOrder)
125 throw std::invalid_argument (
"Cannot compute the derivative of order greater than 10.");
126 typedef path::binomials<MaxOrder> Binomials_t;
127 const Binomials_t::Factorials_t& factors = Binomials_t::factorials();
133 res +=
value_type(factors[i]/factors[i-order]) *
a[i] * tn;
144 #endif // HPP_CORE_TIME_PARAMETERIZATION_POLYNOMIAL_HH
TimeParameterizationPtr_t copy() const
Definition: polynomial.hh:47
value_type derivative(const value_type &t, const size_type &order) const
Computes .
Definition: polynomial.hh:59
pinocchio::size_type size_type
Definition: fwd.hh:156
assert(d.lhs()._blocks()==d.rhs()._blocks())
Definition: time-parameterization.hh:25
pinocchio::vector_t vector_t
Definition: fwd.hh:201
pinocchio::value_type value_type
Definition: fwd.hh:157
boost::shared_ptr< TimeParameterization > TimeParameterizationPtr_t
Definition: fwd.hh:172
value_type derivativeBound(const value_type &low, const value_type &up) const
Definition: polynomial.hh:75
Polynomial(const vector_t ¶m)
Definition: polynomial.hh:34
Definition: polynomial.hh:31
const vector_t & parameters() const
Definition: polynomial.hh:42
value_type value(const value_type &t) const
Computes .
Definition: polynomial.hh:53