Derivatives.h File Reference

#include "AlgebraicTraits.h"
#include "Matrix.h"

Include dependency graph for Derivatives.h:

Go to the source code of this file.

Functions

template<class FunctionType, class ArgumentType>
ArgumentType fastDerivative (FunctionType function, ArgumentType value)
template<class SingleArgumentFunctionType, class ValueType>
ValueType derivative (SingleArgumentFunctionType function, ValueType value)
template<class T>
partialDerivative (typename math_types< T >::MultipleArgFunction fun, typename math_types< T >::vector_type argv, int index)
template<class T>
const math_types< T >::vector_type differential (typename math_types< T >::MultipleArgFunction function, const typename math_types< T >::vector_type &value)


Detailed Description

Contains functions to compute the derivative, partial derivative or differential of functions.

Definition in file Derivatives.h.


Function Documentation

template<class SingleArgumentFunctionType, class ValueType>
ValueType derivative ( SingleArgumentFunctionType  function,
ValueType  value 
)

Compute the derivative of function at point val.

Computes the derivative of func using "Richardson's deffered approach to the limit" Returns the derivative of a function func at a point x by Ridders' method of polynomial extrapolation. The value h is input as an estimated initial stepsize; it need not be small, but rather should be an increment in x over which func changes substantially. An estimate of the error in the derivative is returned as err.

Parameters:
function pointer to function whose derivative we want to evaluate
value point in which we evaluate the derivative
Returns:
the value of the derivative

Definition at line 80 of file Derivatives.h.

References AlgebraicTraits< T >::one(), and AlgebraicTraits< T >::zero().

Here is the call graph for this function:

template<class T>
const math_types<T>::vector_type differential ( typename math_types< T >::MultipleArgFunction  function,
const typename math_types< T >::vector_type &  value 
)

Compute the differential of a multi-variable function

Parameters:
function multiple variable function whose differential we want to determine
value a vector containing the point in which to evaluate the differential
Returns:
the value of the differential (a vector)

Definition at line 241 of file Derivatives.h.

References partialDerivative().

Here is the call graph for this function:

template<class FunctionType, class ArgumentType>
ArgumentType fastDerivative ( FunctionType  function,
ArgumentType  value 
)

Compute the derivative of function at point value. This function is fast but not so accurate for more accuracy use Richardson's deferred approach to the limit implemented in the function derivative(...)

Parameters:
function pointer to function whose derivative we want to evaluate. It must be a single argument function pointer or a functional object that declares operator() with one argument of type ArgumentType
value the point in which we evaluate the derivative
Returns:
the derivative value
See also:
derivative

Definition at line 36 of file Derivatives.h.

References AlgebraicTraits< T >::one().

Here is the call graph for this function:

template<class T>
T partialDerivative ( typename math_types< T >::MultipleArgFunction  fun,
typename math_types< T >::vector_type  argv,
int  index 
)

Compute the partial derivative of fun with respect to argument index

Computes the derivative of func using "Richardson's deffered approach to the limit" Returns the derivative of a function func at a point x by Ridders' method of polynomial extrapolation. The value h is input as an estimated initial stepsize; it need not be small, but rather should be an increment in x over which func changes substantially. An estimate of the error in the derivative is returned as err.

Parameters:
fun pointer to function whose derivative we want to evaluate
argv vector of arguments
index index in the arguments vector that tells with respect to which variable to compute the derivative
Returns:
derivative value

Definition at line 158 of file Derivatives.h.

References AlgebraicTraits< T >::one(), and AlgebraicTraits< T >::zero().

Referenced by differential().

Here is the call graph for this function:

Here is the caller graph for this function:


Math-Objects Library Docs  Generated by: doxygen