roboptim::LinearFunction Class Reference

Define an abstract linear function. More...

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

+ Inheritance diagram for roboptim::LinearFunction:

List of all members.

Public Member Functions

 LinearFunction (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

Define an abstract linear function.

Inherit from this class when implementing linear functions.


Constructor & Destructor Documentation

roboptim::LinearFunction::LinearFunction ( 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

void roboptim::LinearFunction::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::TwiceDerivableFunction.

std::ostream & roboptim::LinearFunction::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::QuadraticFunction.

Reimplemented in roboptim::NumericLinearFunction, roboptim::ConstantFunction, and roboptim::IdentityFunction.