roboptim::GenericLinearFunction< T > Class Template Reference

Define an abstract linear function. More...

#include <roboptim/core/linear-function.hh>

Inheritance diagram for roboptim::GenericLinearFunction< T >:
Collaboration diagram for roboptim::GenericLinearFunction< T >:

List of all members.

Public Types

typedef
GenericQuadraticFunction< T > 
parent_t
typedef parent_t::size_type size_type
 Size type.
typedef parent_t::vector_t vector_t
 Basic vector type.
typedef parent_t::argument_t argument_t
 Type of a function evaluation argument.
typedef parent_t::result_t result_t
 Type of a function evaluation result.
typedef parent_t::hessian_t hessian_t
 Hessian type.

Public Member Functions

 GenericLinearFunction (size_type inputSize, size_type outputSize=1, std::string name=std::string()) throw ()
 Concrete class constructor should call this constructor.
virtual std::ostream & print (std::ostream &) const throw ()
 Display the function on the specified output stream.

Protected Member Functions

void impl_hessian (hessian_t &hessian, const argument_t &argument, size_type functionId=0) const throw ()
 Hessian evaluation.

Detailed Description

template<typename T>
class roboptim::GenericLinearFunction< T >

Define an abstract linear function.

Inherit from this class when implementing linear functions.


Member Typedef Documentation

Type of a function evaluation argument.

Reimplemented from roboptim::GenericFunction< T >.

template<typename T >
typedef parent_t::hessian_t roboptim::GenericLinearFunction< T >::hessian_t

Hessian type.

Hessians are symmetric matrices.

Reimplemented from roboptim::GenericTwiceDifferentiableFunction< T >.

template<typename T >
typedef parent_t::result_t roboptim::GenericLinearFunction< T >::result_t

Type of a function evaluation result.

Reimplemented from roboptim::GenericFunction< T >.

template<typename T >
typedef parent_t::size_type roboptim::GenericLinearFunction< T >::size_type

Size type.

This type is used to represent sizes, indexes, etc.

Reimplemented from roboptim::GenericQuadraticFunction< T >.

template<typename T >
typedef parent_t::vector_t roboptim::GenericLinearFunction< T >::vector_t

Basic vector type.

This basic vector type is used each time a vector of values is required.

Attention:
It is good practice in RobOptim to rely on this type when a vector of values is needed instead of relying on a particular implementation.

Reimplemented from roboptim::GenericFunction< T >.

Examples:
constant-function.cc, identity-function.cc, and problem-cc.cc.

Constructor & Destructor Documentation

template<typename T >
roboptim::GenericLinearFunction< T >::GenericLinearFunction ( size_type  inputSize,
size_type  outputSize = 1,
std::string  name = std::string () 
) throw ()

Concrete class constructor should call this constructor.

Parameters:
inputSizefunction arity
outputSizeresult size
namefunction's name

Member Function Documentation

template<typename T >
void roboptim::GenericLinearFunction< T >::impl_hessian ( hessian_t hessian,
const argument_t argument,
size_type  functionId = 0 
) const throw () [protected, virtual]

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.

Warning:
Do not call this function directly, call hessian instead.
Parameters:
hessianhessian will be stored here
argumentpoint where the hessian will be computed
functionIdevaluated function id in the split representation

Implements roboptim::GenericTwiceDifferentiableFunction< T >.

template<typename T >
std::ostream & roboptim::GenericLinearFunction< T >::print ( std::ostream &  o) const throw () [virtual]

Display the function on the specified output stream.

Parameters:
ooutput stream used for display
Returns:
output stream

Reimplemented from roboptim::GenericQuadraticFunction< T >.

Reimplemented in roboptim::GenericNumericLinearFunction< T >, roboptim::IdentityFunction, and roboptim::ConstantFunction.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines