roboptim::ParametrizedFunction< F > Class Template Referenceabstract
Mathematical abstract functions

Define an abstract parametrized mathematical function ( ). More...

`#include <roboptim/core/parametrized-function.hh>`

Inheritance diagram for roboptim::ParametrizedFunction< F >:

## Public Types

typedef F::value_type | value_type
| Import value type. More...
typedef F::size_type | size_type
| Import size type. More...
typedef F::vector_t | vector_t
| Import vector type. More...
typedef F::matrix_t | matrix_t
| Import matrix type. More...
typedef F | result_t
| Import result type. More...
typedef F::argument_t | argument_t
| Import argument type. More...

## Public Member Functions

result_t | operator() (const argument_t &argument) const throw ()
| Evaluate the function at a specified point. More...
size_type | inputSize () const throw ()
| Return the input size (i.e. More...
size_type | functionInputSize () const throw ()
| Return the function's input size (i.e. More...
size_type | functionOutputSize () const throw ()
| Return the function's output size (i.e. More...
virtual std::ostream & | print (std::ostream &) const throw ()
| Display the function on the specified output stream. More...

## Protected Member Functions

| ParametrizedFunction (size_type inputSize, size_type functionInputSize, size_type functionOutputSize) throw ()
| Concrete class constructor should call this constructor. More...
virtual | ~ParametrizedFunction ()
virtual result_t | impl_compute (const argument_t &argument) const =0 throw ()
| Function evaluation. More...

## Detailed Description

### template<typename F>
class roboptim::ParametrizedFunction< F >

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.

Template Parameters

  F | inner function type.

## Member Typedef Documentation

template<typename F>

typedef F::argument_t roboptim::ParametrizedFunction< F >::argument_t

Import argument type.

template<typename F>

typedef F::matrix_t roboptim::ParametrizedFunction< F >::matrix_t

Import matrix type.

template<typename F>

typedef F roboptim::ParametrizedFunction< F >::result_t

Import result type.

template<typename F>

typedef F::size_type roboptim::ParametrizedFunction< F >::size_type

Import size type.

template<typename F>

typedef F::value_type roboptim::ParametrizedFunction< F >::value_type

Import value type.

template<typename F>

typedef F::vector_t roboptim::ParametrizedFunction< F >::vector_t

Import vector type.

## Constructor & Destructor Documentation

template<typename F >

roboptim::ParametrizedFunction< F >::ParametrizedFunction | ( | size_type | inputSize,
|  | size_type | functionInputSize,
|  | size_type | functionOutputSize
| ) |  |
throw | ( |
| ) |  |

protected

Concrete class constructor should call this constructor.

Parameters

  inputSize | parameter size
  functionInputSize | inner function argument size
  functionOutputSize | inner function result size

template<typename F>

virtual roboptim::ParametrizedFunction< F >::~ParametrizedFunction | ( |  | ) |

inline protected virtual

## Member Function Documentation

template<typename F >

ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::functionInputSize | ( |  | ) | const
throw | ( |
| ) |  |

Return the function's input size (i.e.

argument's vector size).

Returns
  input size

template<typename F >

ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::functionOutputSize | ( |  | ) | const
throw | ( |
| ) |  |

Return the function's output size (i.e.

result's vector size).

Returns
  output size

Referenced by roboptim::DerivableParametrizedFunction< F >::impl_jacobian(), and roboptim::DerivableParametrizedFunction< F >::jacobianSize().

template<typename F>

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.

Warning
  Do not call this function directly, call operator()(const argument_t&) const throw () instead.

Parameters

  argument | point at which the function will be evaluated

template<typename F >

ParametrizedFunction< F >::size_type roboptim::ParametrizedFunction< F >::inputSize | ( |  | ) | const
throw | ( |
| ) |  |

Return the input size (i.e.

argument's vector size).

Returns
  input 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().

template<typename F >

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.

Parameters

  argument | point at which the function will be evaluated

Returns
  computed result

template<typename F >

std::ostream & roboptim::ParametrizedFunction< F >::print | ( | std::ostream & | o | ) | const
throw | ( |
| ) |  |

virtual

Display the function on the specified output stream.

Parameters

  o | output stream used for display

Returns
  output stream

Reimplemented in roboptim::DerivableParametrizedFunction< F >.