Classes | |
| class | roboptim::GenericConstantFunction< T > |
| Constant function. More... | |
| class | roboptim::Cos< T > |
| Cos function. More... | |
| class | roboptim::GenericIdentityFunction< T > |
| Identity function. More... | |
| class | roboptim::Polynomial< T > |
| Polynomial function. More... | |
| class | roboptim::Sin< T > |
| Sin function. More... | |
| class | roboptim::NTimesDerivableFunction< DerivabilityOrder > |
Define a ![]() ![]() | |
| class | roboptim::GenericNumericLinearFunction< T > |
| Build a linear function from a vector and a matrix. More... | |
| class | roboptim::GenericNumericQuadraticFunction< T > |
| Build a quadratic function from a matrix and a vector. More... | |
Functions | |
| roboptim::ROBOPTIM_GENERATE_TRAITS_REFS_T (derivative, traits_t) | |
| Explicit specialization for the stop case of NTimesDerivable class. | |
| virtual size_type | roboptim::derivabilityOrderMax () const |
| Returns the maximum derivability order (relevant for N>2 only). | |
| virtual | roboptim::~NTimesDerivableFunction () |
| size_type | roboptim::derivativeSize () const |
| Return the size of the derivative vector. | |
| bool | roboptim::isValidDerivative (const_derivative_ref derivative) const |
| Check if a derivative is valid (check sizes). | |
| result_t | roboptim::operator() (value_type argument) const |
| Evaluate the function at a specified point. | |
| void | roboptim::operator() (result_ref result, value_type argument) const |
| Evaluate the function at a specified point. | |
| derivative_t | roboptim::derivative (value_type argument, size_type order=1) const |
| Compute the derivative of the function. | |
| void | roboptim::derivative (derivative_ref derivative, value_type argument, size_type order=1) const |
| Compute the derivative of the function. | |
| virtual std::ostream & | roboptim::print (std::ostream &o) const |
| Display the function on the specified output stream. | |
| roboptim::NTimesDerivableFunction (size_type outputSize=1, std::string name=std::string()) | |
| Concrete class constructor should call this constructor. | |
| void | roboptim::impl_compute (result_ref result, const_argument_ref argument) const |
| Function evaluation. | |
| virtual void | roboptim::impl_compute (result_ref result, value_type t) const =0 |
| Function evaluation. | |
| void | roboptim::impl_gradient (gradient_ref gradient, const_argument_ref argument, size_type functionId=0) const |
| Gradient evaluation. | |
| virtual void | roboptim::impl_derivative (derivative_ref derivative, value_type argument, size_type order=1) const =0 |
| Derivative evaluation. | |
| void | roboptim::impl_hessian (hessian_ref hessian, const_argument_ref argument, size_type functionId=0) const |
| Hessian evaluation. | |
| void | roboptim::Cos< T >::impl_gradient (gradient_ref gradient, const_argument_ref x, size_type) const |
| void | roboptim::Cos< T >::impl_jacobian (jacobian_ref jacobian, const_argument_ref x) const |
| Jacobian evaluation. | |
| void | roboptim::Cos< T >::impl_hessian (hessian_ref hessian, const_argument_ref x, size_type) const |
| void | roboptim::GenericIdentityFunction< T >::impl_gradient (gradient_ref gradient, const_argument_ref, size_type idFunction) const |
| void | roboptim::Sin< T >::impl_gradient (gradient_ref gradient, const_argument_ref x, size_type) const |
| void | roboptim::Sin< T >::impl_jacobian (jacobian_ref jacobian, const_argument_ref x) const |
| Jacobian evaluation. | |
| void | roboptim::Sin< T >::impl_hessian (hessian_ref hessian, const_argument_ref x, size_type) const |
Variables | |
| static const size_type | roboptim::derivabilityOrder = 2 |
| Function derivability order. | |
|
virtual |
Returns the maximum derivability order (relevant for N>2 only).
Referenced by derivative().
| void roboptim::derivative | ( | derivative_ref | derivative, |
| value_type | argument, | ||
| size_type | order = 1 ) const |
Compute the derivative of the function.
Derivative is computed for a certain order, at a given point.
| derivative | derivative will be stored in this vector |
| argument | point at which the derivative will be computed |
| order | derivative order (if 0 then function is evaluated) |
References derivabilityOrderMax(), derivative(), impl_derivative(), and isValidDerivative().
| derivative_t roboptim::derivative | ( | value_type | argument, |
| size_type | order = 1 ) const |
Compute the derivative of the function.
Derivative is computed for a certain order, at a given point.
| argument | point at which the derivative will be computed |
| order | derivative order (if 0 then function is evaluated) |
References derivative().
Referenced by roboptim::CachedFunction< T >::cachedFunctionDerivative(), derivative(), derivative(), roboptim::CachedFunction< T >::impl_derivative(), impl_derivative(), roboptim::Split< T >::impl_derivative(), impl_gradient(), impl_hessian(), isValidDerivative(), ROBOPTIM_GENERATE_TRAITS_REFS_T(), roboptim::GenericFunctionTraits< EigenMatrixDense >::ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF(), and roboptim::GenericFunctionTraits< EigenMatrixSparse >::ROBOPTIM_GENERATE_TYPEDEFS_EIGEN_REF().
| size_type roboptim::derivativeSize | ( | ) | const |
Return the size of the derivative vector.
Referenced by isValidDerivative().
|
protected |
Function evaluation.
Implement generic function evaluation, as required by Function, using this class evaluation method (using a double instead of a vector).
| result | result will be stored in this vector |
| argument | point at which the function will be evaluated |
Referenced by operator()(), and roboptim::ParametrizedFunction< F >::operator()().
|
protectedpure virtual |
Function evaluation.
Evaluate the function, has to be implemented in concrete classes.
| result | result will be stored in this vector |
| t | point at which the function will be evaluated |
|
protectedpure virtual |
Derivative evaluation.
Compute the derivative, has to be implemented in concrete classes.
| derivative | derivative will be store in this argument |
| argument | point where the gradient will be computed |
| order | derivative order (if 0 evaluates the function) |
References derivative().
Referenced by derivative().
|
protected |
|
protected |
|
protected |
Gradient evaluation.
Implement the gradient computation, as required by DerivableFunction. The gradient is computed for a specific sub-function which id is passed through the functionId argument.
| gradient | gradient will be store in this argument |
| argument | point where the gradient will be computed |
| functionId | evaluated function id in the split representation |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
References derivative(), is_malloc_allowed(), and set_is_malloc_allowed().
|
protected |
|
protected |
|
protected |
Hessian evaluation.
Implement the hessian computation, as required by the TwiceDerivableFunction class using the derivative method. 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 |
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
ROBOPTIM_DO_NOT_CHECK_ALLOCATION
References derivative(), is_malloc_allowed(), and set_is_malloc_allowed().
|
protected |
|
protectedvirtual |
Jacobian evaluation.
Computes the jacobian, can be overridden by concrete classes. The default behavior is to compute the jacobian from the gradient.
| jacobian | jacobian will be store in this argument |
| arg | point where the jacobian will be computed |
Reimplemented from roboptim::GenericDifferentiableFunction< T >.
References roboptim::GenericDifferentiableFunction< T >::jacobian().
|
protectedvirtual |
Jacobian evaluation.
Computes the jacobian, can be overridden by concrete classes. The default behavior is to compute the jacobian from the gradient.
| jacobian | jacobian will be store in this argument |
| arg | point where the jacobian will be computed |
Reimplemented from roboptim::GenericDifferentiableFunction< T >.
References roboptim::GenericDifferentiableFunction< T >::jacobian().
| bool roboptim::isValidDerivative | ( | const_derivative_ref | derivative | ) | const |
Check if a derivative is valid (check sizes).
| derivative | derivative vector to be checked |
References derivative(), and derivativeSize().
Referenced by derivative().
|
protected |
Concrete class constructor should call this constructor.
| outputSize | output size (result size) |
| name | function's name |
| void roboptim::operator() | ( | result_ref | result, |
| value_type | argument ) const |
Evaluate the function at a specified point.
The program will abort if the argument does not have the expected size.
| result | result will be stored in this vector |
| argument | point at which the function will be evaluated |
References impl_compute().
| result_t roboptim::operator() | ( | value_type | argument | ) | const |
Evaluate the function at a specified point.
The program will abort if the argument does not have the expected size.
| argument | point at which the function will be evaluated |
|
virtual |
Display the function on the specified output stream.
| o | output stream used for display |
References roboptim::NTimesDerivableFunction< DerivabilityOrder >::derivabilityOrderMax().
| roboptim::ROBOPTIM_GENERATE_TRAITS_REFS_T | ( | derivative | , |
| traits_t | ) |
Explicit specialization for the stop case of NTimesDerivable class.
This specialization defines the interface of a ``n times derivable function'' and implements generic methods required by upper classes using this class specific interface. */ template <> class NTimesDerivableFunction<2> : public TwiceDifferentiableFunction { public:
/ Parent type. typedef TwiceDifferentiableFunction parent_t;
/ Traits type. typedef parent_t::traits_t traits_t;
/** Derivative type.
Derivatives are column vectors.
References derivative().
|
virtual |