Polynomial function. More...
#include <roboptim/core/function/polynomial.hh>
Public Member Functions | |
ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericTwiceDifferentiableFunction< T >) | |
Polynomial (const_vector_ref coefficients) | |
Build a polynomial function. More... | |
virtual | ~Polynomial () |
virtual std::ostream & | print (std::ostream &o) const |
Display the function on the specified output stream. More... | |
![]() | |
ROBOPTIM_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericDifferentiableFunction< T >) | |
ROBOPTIM_GENERATE_TRAITS_REFS_ (hessian) | |
Hessian type. More... | |
hessianSize_t | hessianSize () const |
Return the size of a hessian. More... | |
bool | isValidHessian (const_hessian_ref hessian) const |
Check if the hessian is valid (check sizes). More... | |
hessian_t | hessian (const_argument_ref argument, size_type functionId=0) const |
Compute the hessian at a given point. More... | |
void | hessian (hessian_ref hessian, const_argument_ref argument, size_type functionId=0) const |
Compute the hessian at a given point. More... | |
Protected Member Functions | |
void | impl_compute (result_ref result, const_argument_ref x) const |
void | impl_gradient (gradient_ref gradient, const_argument_ref x, size_type) const |
void | impl_jacobian (jacobian_ref jacobian, const_argument_ref x) const |
void | impl_hessian (hessian_ref hessian, const_argument_ref x, size_type) const |
Hessian evaluation. More... | |
value_type | applyPolynomial (const_vector_ref coeffs, const_argument_ref x) const |
Implement Horner's method. More... | |
![]() | |
GenericTwiceDifferentiableFunction (size_type inputSize, size_type outputSize=1, std::string name=std::string()) | |
Concrete class constructor should call this constructor. More... | |
void | setZero (hessian_ref symmetric) const |
Set a symmetric matrix to zero. More... | |
Additional Inherited Members | |
![]() | |
typedef std::pair< size_type, size_type > | hessianSize_t |
Hessian size type represented as a pair of values. More... | |
Polynomial function.
Implement a polynomial function using the formula:
where polynomial coefficients are set when the class is instanciated
|
explicit |
Build a polynomial function.
coefficients | polynomial coefficients given in increasing degree order |
std::runtime_error |
|
inlinevirtual |
|
protected |
Implement Horner's method.
|
protected |
|
protected |
|
protectedvirtual |
Hessian evaluation.
Compute the hessian, has to be implemented in concrete classes. The hessian is computed for a specific sub-function which id is passed through the functionId argument.
hessian | hessian will be stored here |
argument | point where the hessian will be computed |
functionId | evaluated function id in the split representation |
Implements roboptim::GenericTwiceDifferentiableFunction< T >.
|
protected |
|
virtual |
Display the function on the specified output stream.
o | output stream used for display |
Reimplemented from roboptim::GenericTwiceDifferentiableFunction< T >.
References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().
roboptim::Polynomial< T >::ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericTwiceDifferentiableFunction< T > | ) |