All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
roboptim::trajectory::Monomial< N > Struct Template Reference

Monomial

\[ M (t) = t-t_0 \]

. More...

#include <roboptim/trajectory/polynomial.hh>

Inheritance diagram for roboptim::trajectory::Monomial< N >:
roboptim::trajectory::Polynomial< N >

Public Types

typedef Polynomial< N > parent_t
 
typedef parent_t::value_type value_type
 
- Public Types inherited from roboptim::trajectory::Polynomial< N >
typedef Function::interval_t interval_t
 
typedef std::vector< value_type > roots_t
 Type of the vector of roots. More...
 
typedef Eigen::Matrix
< value_type, N+1, 1 > 
coefs_t
 Fixed-size coefficient vector (N+1 if N is the polynomial degree). More...
 
typedef std::vector< value_type > values_t
 Type of the critical points. More...
 
typedef std::pair< value_type,
value_type > 
max_t
 Type of a maximum query: (t_max, P(t_max)) More...
 
typedef std::pair< value_type,
value_type > 
min_t
 Type of a minimum query: (t_min, P(t_min)) More...
 
typedef ::roboptim::Polynomial
< Function::traits_t > 
polynomialFunction_t
 Polynomial function. More...
 

Public Member Functions

 Monomial (value_type t0)
 Constructor of a monomial: (t-t₀) More...
 
- Public Member Functions inherited from roboptim::trajectory::Polynomial< N >
 ROBOPTIM_FUNCTION_FWD_TYPEDEFS_ (Function)
 
 BOOST_STATIC_ASSERT (N >=0)
 Polynomial degree >= 0. More...
 
 Polynomial ()
 Default constructor: return a null polynomial. More...
 
 Polynomial (value_type t0, const_vector_ref coefs)
 Construct of a polynomial from its center and its coefficients. More...
 
 Polynomial (value_type t0,...)
 Variadic constructor. More...
 
template<int M>
 Polynomial (const Polynomial< M > &p)
 Copy constructor of polynomials of different orders. More...
 
Polynomial< N > translate (value_type t1) const
 Return a new polynomial translated from (t-t₀) to (t-t₁). More...
 
void translateInPlace (value_type t1)
 Translate the polynomial (in place) from (t-t₀) to (t-t₁). More...
 
template<int K>
Polynomial< N-K > derivative () const
 Compute the derivative polynomial of a given order. More...
 
value_type derivative (value_type t, size_type order=1) const
 Evaluate the derivative of a given order. More...
 
template<int M>
Polynomial< N+M > operator* (const Polynomial< M > &poly) const
 Multiply polynomials of different orders. More...
 
Polynomial< N > operator+ (const Polynomial< N > &poly) const
 Addition of polynomials. More...
 
Polynomial< N > operator- (const Polynomial< N > &poly) const
 Subtraction of polynomials. More...
 
Polynomial< N > operator* (value_type lambda) const
 Scalar multiplication of a polynomial. More...
 
void operator+= (const Polynomial< N > &poly)
 Addition of polynomials. More...
 
value_type operator() (value_type t) const
 Evaluate the polynomial with Horner's method. More...
 
const coefs_tcoefs () const
 Const getter to coefs. More...
 
coefs_tcoefs ()
 Getter to coefs. More...
 
value_type t0 () const
 Const getter to t0. More...
 
value_type & t0 ()
 Reference to t0. More...
 
value_type operator[] (int i) const
 Get the i-th polynomial coefficient. More...
 
roots_t realRoots (value_type epsilon=1e-6) const
 Return the real roots of the polynomial. More...
 
values_t critPoints (const interval_t &interval) const
 Compute the critical values of the polynomial on an interval. More...
 
min_t min (const interval_t &interval, bool acceptConstant=true) const
 Compute the minimum of the polynomial on an interval. More...
 
max_t max (const interval_t &interval, bool acceptConstant=true) const
 Compute the maximum of the polynomial on an interval. More...
 
bool isNull (value_type epsilon=Function::epsilon()) const
 Return whether the polynomial is null. More...
 
bool isConstant (value_type epsilon=Function::epsilon()) const
 Return whether the polynomial is constant. More...
 
bool isLinear (value_type epsilon=Function::epsilon()) const
 Return whether the polynomial is linear. More...
 
int trueOrder (value_type epsilon=Function::epsilon()) const
 Return the "true" order of the polynomial. More...
 
polynomialFunction_t asFunction () const
 Get the equivalent Polynomial function. More...
 
virtual std::ostream & print (std::ostream &o) const
 Print the polynomial. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from roboptim::trajectory::Polynomial< N >
static int order ()
 Return the order of such a polynomial. More...
 
- Protected Types inherited from roboptim::trajectory::Polynomial< N >
enum  special_polynomials {
  all_zero_coefficients = 0,
  monomial_coefficients = 1
}
 Enum for special polynomials. More...
 
- Protected Member Functions inherited from roboptim::trajectory::Polynomial< N >
value_type impl_derivative (value_type t, size_type order, size_type start_coef=0) const
 
template<int K>
Polynomial< N-K > impl_derivative () const
 Implementation of the compile-time derivative. More...
 
coefs_t impl_translate (value_type t1) const
 
 Polynomial (value_type t0, special_polynomials key)
 Special constructor for Monomial<N> and some operators. More...
 
- Static Protected Attributes inherited from roboptim::trajectory::Polynomial< N >
static const int order_ = N
 order of the polynomial. More...
 

Detailed Description

template<int N>
struct roboptim::trajectory::Monomial< N >

Monomial

\[ M (t) = t-t_0 \]

.

Member Typedef Documentation

template<int N>
typedef Polynomial<N> roboptim::trajectory::Monomial< N >::parent_t
template<int N>
typedef parent_t::value_type roboptim::trajectory::Monomial< N >::value_type

Constructor & Destructor Documentation

template<int N>
roboptim::trajectory::Monomial< N >::Monomial ( value_type  t0)
inline

Constructor of a monomial: (t-t₀)

Parameters
t0"center" of the monomial.