Define an abstract parametrized mathematical function ( ). More...
#include <roboptim/core/parametrized-function.hh>
Public Types | |
typedef F::value_type | value_type |
Import value type. | |
typedef F::size_type | size_type |
Import size type. | |
typedef F::vector_t | vector_t |
Import vector type. | |
typedef F::matrix_t | matrix_t |
Import matrix type. | |
typedef F | result_t |
Import result type. | |
typedef F::argument_t | argument_t |
Import argument type. | |
Public Member Functions | |
result_t | operator() (const argument_t &argument) const throw () |
Evaluate the function at a specified point. | |
size_type | inputSize () const throw () |
Return the input size (i.e. | |
size_type | functionInputSize () const throw () |
Return the function's input size (i.e. | |
size_type | functionOutputSize () const throw () |
Return the function's output size (i.e. | |
virtual std::ostream & | print (std::ostream &) const throw () |
Display the function on the specified output stream. | |
Protected Member Functions | |
ParametrizedFunction (size_type inputSize, size_type functionInputSize, size_type functionOutputSize) throw () | |
Concrete class constructor should call this constructor. | |
virtual | ~ParametrizedFunction () |
virtual result_t | impl_compute (const argument_t &argument) const =0 throw () |
Function evaluation. |
Define an abstract parametrized mathematical function ( ).
A function is an object that can be evaluated for a given point.
, where is the input size and ( ).
Functions are pure immutable objects: evaluating a function twice at a given point must give the same result.
F | inner function type. |
typedef F::argument_t roboptim::ParametrizedFunction< F >::argument_t |
Import argument type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
typedef F::matrix_t roboptim::ParametrizedFunction< F >::matrix_t |
Import matrix type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
typedef F roboptim::ParametrizedFunction< F >::result_t |
Import result type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
typedef F::size_type roboptim::ParametrizedFunction< F >::size_type |
Import size type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
typedef F::value_type roboptim::ParametrizedFunction< F >::value_type |
Import value type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
typedef F::vector_t roboptim::ParametrizedFunction< F >::vector_t |
Import vector type.
Reimplemented in roboptim::DerivableParametrizedFunction< F >.
roboptim::ParametrizedFunction< F >::ParametrizedFunction | ( | size_type | inputSize, |
size_type | functionInputSize, | ||
size_type | functionOutputSize | ||
) | throw () [protected] |
Concrete class constructor should call this constructor.
inputSize | parameter size |
functionInputSize | inner function argument size |
functionOutputSize | inner function result size |
virtual roboptim::ParametrizedFunction< F >::~ParametrizedFunction | ( | ) | [inline, protected, virtual] |
ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::functionInputSize | ( | ) | const throw () |
Return the function's input size (i.e.
argument's vector size).
ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::functionOutputSize | ( | ) | const throw () |
Return the function's output size (i.e.
result's vector size).
Referenced by roboptim::DerivableParametrizedFunction< F >::impl_jacobian(), and roboptim::DerivableParametrizedFunction< F >::jacobianSize().
virtual result_t roboptim::ParametrizedFunction< F >::impl_compute | ( | const argument_t & | argument | ) | const throw () [protected, pure virtual] |
Function evaluation.
Evaluate the function, has to be implemented in concrete classes.
argument | point at which the function will be evaluated |
ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::inputSize | ( | ) | const throw () |
Return the input size (i.e.
argument's vector size).
Referenced by roboptim::DerivableParametrizedFunction< F >::gradient(), roboptim::DerivableParametrizedFunction< F >::gradientSize(), roboptim::DerivableParametrizedFunction< F >::impl_jacobian(), roboptim::DerivableParametrizedFunction< F >::jacobian(), and roboptim::DerivableParametrizedFunction< F >::jacobianSize().
ParametrizedFunction< F >::result_t roboptim::ParametrizedFunction< F >::operator() | ( | const argument_t & | argument | ) | const throw () |
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 |
std::ostream & roboptim::ParametrizedFunction< F >::print | ( | std::ostream & | o | ) | const throw () [virtual] |
Display the function on the specified output stream.
o | output stream used for display |
Reimplemented in roboptim::DerivableParametrizedFunction< F >.