roboptim::GenericLinearFunction< T > Class Template Reference

Define an abstract linear function. More...

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

Inheritance diagram for roboptim::GenericLinearFunction< T >:
roboptim::GenericQuadraticFunction< T > roboptim::GenericTwiceDifferentiableFunction< T > roboptim::GenericDifferentiableFunction< T > roboptim::GenericFunction< T > roboptim::GenericConstantFunction< T > roboptim::GenericIdentityFunction< T > roboptim::GenericNumericLinearFunction< T >

List of all members.

Public Member Functions

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

Protected Member Functions

void impl_hessian (hessian_ref hessian, const_argument_ref argument, size_type functionId=0) const
 Hessian evaluation.

Detailed Description

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

Define an abstract linear function.

Inherit from this class when implementing linear functions.

Examples:
numeric-linear-function.cc.

Constructor & Destructor Documentation

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

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_ref  hessian,
const_argument_ref  argument,
size_type  functionId = 0 
) const [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 [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::GenericConstantFunction< T >, roboptim::GenericNumericLinearFunction< T >, and roboptim::GenericIdentityFunction< T >.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines