gslmm::function_base< Value, Argument, Derive, Error, Scale > Class Template Reference
[Functions]

#include <gslmm/function/function_base.hh>

Inheritance diagram for gslmm::function_base< Value, Argument, Derive, Error, Scale >:

Inheritance graph
[legend]
List of all members.

Detailed Description

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
class gslmm::function_base< Value, Argument, Derive, Error, Scale >

Abstract base class for functions of all kinds.

The sub-classes should at a minimum override the member functions function_base::evaluate to return $ f(x)$. Per default, the member function function_base::derivative does a numerical differentation, based on an increase of gslmm::type_trait<value_type>::epsilon() in the argument, and then calculates the Newton cofficient $ (f(x+dx)-f(x))/dx $. Derived classes should overload this if the derivative can be better determined.

Parameters:
Value The value type. That is, the type of the evaluation of the function $ f(x)$.
Argument The argument type. That is, the type of $ x$.
Derive The type of the derivative of the function. It can be straight forward value, or it can be a Jacobian matrix, or similar.
Error The type of error estimates.
Scale The type of scale factors in the result.
Todo:
I'm not sure I really want this class, as must of the interfaces will deal with template arguments, rather than sub-classing of a specific base class.


Public Types

typedef Value value_type
typedef Argument argument_type
typedef Error error_type
typedef Scale scale_type
typedef Derive derive_type

Public Member Functions

 function_base ()
virtual ~function_base ()
Evaluation
virtual value_type evaluate (const argument_type &x)=0
virtual value_type evaluate (const argument_type &x, error_type &e)
virtual value_type evaluate (const argument_type &x, error_type &e, scale_type &s)
Evaluation of derivative
virtual derive_type derivative (const argument_type &x)=0
virtual derive_type derivative (const argument_type &x, error_type &e)
virtual derive_type derivative (const argument_type &x, error_type &e, scale_type &s)


Member Typedef Documentation

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
typedef Argument gslmm::function_base< Value, Argument, Derive, Error, Scale >::argument_type
 

The type of the function argument.

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
typedef Derive gslmm::function_base< Value, Argument, Derive, Error, Scale >::derive_type
 

The type of the deriviative evaluation.

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
typedef Error gslmm::function_base< Value, Argument, Derive, Error, Scale >::error_type
 

The type of error estimates.

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
typedef Scale gslmm::function_base< Value, Argument, Derive, Error, Scale >::scale_type
 

The type of scaling factors.

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
typedef Value gslmm::function_base< Value, Argument, Derive, Error, Scale >::value_type
 

The type of the function value.


Constructor & Destructor Documentation

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
gslmm::function_base< Value, Argument, Derive, Error, Scale >::function_base  )  [inline]
 

Constructor.

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
virtual gslmm::function_base< Value, Argument, Derive, Error, Scale >::~function_base  )  [inline, virtual]
 

Destructor.


Member Function Documentation

template<typename V, typename A, typename D, typename E, typename S>
D gslmm::function_base< V, A, D, E, S >::derivative const argument_type x,
error_type e,
scale_type s
[inline, virtual]
 

Evaluate derivative of this function, with error estimate and scaling.

Parameters:
x The point to evaluate it at.
s The scaling factor.
e The error estimate.
Returns:
The function value at $p x .

template<typename V, typename A, typename D, typename E, typename S>
D gslmm::function_base< V, A, D, E, S >::derivative const argument_type x,
error_type e
[inline, virtual]
 

Evaluate derivative of this function, with error estimate.

Parameters:
x The point to evaluate it at.
e The error estimate.
Returns:
The function value at $p x .

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
virtual derive_type gslmm::function_base< Value, Argument, Derive, Error, Scale >::derivative const argument_type x  )  [pure virtual]
 

Evaluate derivative of this function.

Parameters:
x The point to evaluate it at.
Returns:
The function value at $p x .

template<typename V, typename A, typename D, typename E, typename S>
V gslmm::function_base< V, A, D, E, S >::evaluate const argument_type x,
error_type e,
scale_type s
[inline, virtual]
 

Evaluate this function, with error estimate and scaling.

Parameters:
x The point to evaluate it at.
s The scaling factor.
e The error estimate.
Returns:
The function value at $p x .

template<typename V, typename A, typename D, typename E, typename S>
V gslmm::function_base< V, A, D, E, S >::evaluate const argument_type x,
error_type e
[inline, virtual]
 

Evaluate this function, with error estimate.

Parameters:
x The point to evaluate it at.
e The error estimate.
Returns:
The function value at $p x .

template<typename Value, typename Argument, typename Derive = Value, typename Error = Value, typename Scale = Value>
virtual value_type gslmm::function_base< Value, Argument, Derive, Error, Scale >::evaluate const argument_type x  )  [pure virtual]
 

Evaluate this function.

Parameters:
x The point to evaluate it at.
Returns:
The function value at $p x .


The documentation for this class was generated from the following file:
Top of page Last update Tue May 9 10:11:31 2006
Christian Holm
Created by DoxyGen 1.4.6