Build a linear function from a vector and a matrix. More...
#include <roboptim/core/numeric-linear-function.hh>
Public Member Functions | |
| ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ (GenericLinearFunction< T >) | |
| GenericNumericLinearFunction (const_matrix_ref A, const_vector_ref b) | |
| Build a linear function from a matrix and a vector. | |
| GenericNumericLinearFunction (const GenericLinearFunction< T > &) | |
| Build a linear function from another one. | |
| ~GenericNumericLinearFunction () | |
| virtual std::ostream & | print (std::ostream &) const |
| Display the function on the specified output stream. | |
| const_matrix_ref | A () const |
| const_vector_ref | b () const |
| matrix_ref | A () |
| vector_ref | b () |
| void | impl_compute (result_ref, const_argument_ref) const |
| Function evaluation. | |
| void | impl_gradient (gradient_ref, const_argument_ref, size_type=0) const |
| Gradient evaluation. | |
| void | impl_jacobian (jacobian_ref, const_argument_ref) const |
| Jacobian evaluation. | |
| template<> | |
| void | impl_gradient (gradient_ref gradient, const_argument_ref, size_type idFunction) const |
| Gradient evaluation. | |
Build a linear function from a vector and a matrix.
Implement a linear function using the general formula:
where
and
are set when the class is instantiated.
| roboptim::GenericNumericLinearFunction< T >::GenericNumericLinearFunction | ( | const_matrix_ref | A, |
| const_vector_ref | b | ||
| ) |
Build a linear function from a matrix and a vector.
See class documentation for A and b definition.
| A | A matrix |
| b | b vector |
| roboptim::GenericNumericLinearFunction< T >::GenericNumericLinearFunction | ( | const GenericLinearFunction< T > & | function | ) |
Build a linear function from another one.
| roboptim::GenericNumericLinearFunction< T >::~GenericNumericLinearFunction | ( | ) |
| const_matrix_ref roboptim::GenericNumericLinearFunction< T >::A | ( | ) | const [inline] |
| matrix_ref roboptim::GenericNumericLinearFunction< T >::A | ( | ) | [inline] |
| const_vector_ref roboptim::GenericNumericLinearFunction< T >::b | ( | ) | const [inline] |
| vector_ref roboptim::GenericNumericLinearFunction< T >::b | ( | ) | [inline] |
| void roboptim::GenericNumericLinearFunction< T >::impl_compute | ( | result_ref | result, |
| const_argument_ref | argument | ||
| ) | const [virtual] |
Function evaluation.
Evaluate the function, has to be implemented in concrete classes.
| result | result will be stored in this vector |
| argument | point at which the function will be evaluated |
Implements roboptim::GenericFunction< T >.
| void roboptim::GenericNumericLinearFunction< T >::impl_gradient | ( | gradient_ref | gradient, |
| const_argument_ref | argument, | ||
| size_type | functionId = 0 |
||
| ) | const [virtual] |
Gradient evaluation.
Compute the gradient, has to be implemented in concrete classes. 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 |
Implements roboptim::GenericDifferentiableFunction< T >.
| void roboptim::GenericNumericLinearFunction< EigenMatrixSparse >::impl_gradient | ( | gradient_ref | gradient, |
| const_argument_ref | argument, | ||
| size_type | functionId | ||
| ) | const [inline, virtual] |
Gradient evaluation.
Compute the gradient, has to be implemented in concrete classes. 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 |
Implements roboptim::GenericDifferentiableFunction< T >.
| void roboptim::GenericNumericLinearFunction< T >::impl_jacobian | ( | jacobian_ref | jacobian, |
| const_argument_ref | arg | ||
| ) | const [virtual] |
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 >.
| std::ostream & roboptim::GenericNumericLinearFunction< T >::print | ( | std::ostream & | o | ) | const [virtual] |
Display the function on the specified output stream.
| o | output stream used for display |
Reimplemented from roboptim::GenericLinearFunction< T >.
References roboptim::decindent(), roboptim::iendl(), and roboptim::incindent().
| roboptim::GenericNumericLinearFunction< T >::ROBOPTIM_TWICE_DIFFERENTIABLE_FUNCTION_FWD_TYPEDEFS_ | ( | GenericLinearFunction< T > | ) |