OpenNN  2.2
Open Neural Networks Library
Public Types | Public Member Functions | Private Attributes | List of all members
OpenNN::NumericalDifferentiation Class Reference

#include <numerical_differentiation.h>

Public Types

enum  NumericalDifferentiationMethod { ForwardDifferences, CentralDifferences }
 

Public Member Functions

 NumericalDifferentiation (void)
 
 NumericalDifferentiation (const NumericalDifferentiation &)
 
virtual ~NumericalDifferentiation (void)
 
NumericalDifferentiationoperator= (const NumericalDifferentiation &)
 
bool operator== (const NumericalDifferentiation &) const
 
const NumericalDifferentiationMethodget_numerical_differentiation_method (void) const
 
std::string write_numerical_differentiation_method (void) const
 
const size_t & get_precision_digits (void) const
 
const bool & get_display (void) const
 
void set (const NumericalDifferentiation &)
 
void set_numerical_differentiation_method (const NumericalDifferentiationMethod &)
 
void set_numerical_differentiation_method (const std::string &)
 
void set_precision_digits (const size_t &)
 
void set_display (const bool &)
 
void set_default (void)
 
double calculate_h (const double &) const
 
Vector< double > calculate_h (const Vector< double > &) const
 
tinyxml2::XMLDocument * to_XML (void) const
 
void from_XML (const tinyxml2::XMLDocument &)
 
template<class T >
double calculate_forward_differences_derivative (const T &t, double(T::*f)(const double &) const, const double &x) const
 
template<class T >
double calculate_central_differences_derivative (const T &t, double(T::*f)(const double &) const , const double &x) const
 
template<class T >
double calculate_derivative (const T &t, double(T::*f)(const double &) const , const double &x) const
 
template<class T >
Vector< double > calculate_forward_differences_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
double calculate_forward_differences_second_derivative (const T &t, double(T::*f)(const double &) const, const double &x) const
 
template<class T >
double calculate_central_differences_second_derivative (const T &t, double(T::*f)(const double &) const , const double &x) const
 
template<class T >
double calculate_second_derivative (const T &t, double(T::*f)(const double &) const , const double &x) const
 
template<class T >
Vector< double > calculate_forward_differences_second_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_second_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_second_derivative (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_second_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_second_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_second_derivative (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_gradient (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_gradient (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_gradient (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_gradient (const T &t, double(T::*f)(const Vector< double > &), const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_gradient (const T &t, double(T::*f)(const Vector< double > &), const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_gradient (const T &t, double(T::*f)(const Vector< double > &), const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_gradient (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_gradient (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_gradient (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_forward_differences_gradient (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_central_differences_gradient (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< double > calculate_gradient (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Hessian (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Hessian (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Hessian (const T &t, double(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Hessian (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Hessian (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Hessian (const T &t, double(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Hessian (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Hessian (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Hessian (const T &t, double(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Jacobian (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_forward_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const size_t &, const Vector< double > &) const, const size_t &dummy_int_1, const size_t &dummy_int_2, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_central_differences_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const size_t &, const Vector< double > &) const, const size_t &dummy_int_1, const size_t &dummy_int_2, const Vector< double > &x) const
 
template<class T >
Matrix< double > calculate_Jacobian (const T &t, Vector< double >(T::*f)(const size_t &, const size_t &, const Vector< double > &) const, const size_t &dummy_int_1, const size_t &dummy_int_2, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_forward_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_central_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &) const, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_forward_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_central_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_Hessian_form (const T &t, Vector< double >(T::*f)(const Vector< double > &, const Vector< double > &) const, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_forward_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_central_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &) const, const size_t &dummy, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_forward_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_central_differences_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 
template<class T >
Vector< Matrix< double > > calculate_Hessian_form (const T &t, Vector< double >(T::*f)(const size_t &, const Vector< double > &, const Vector< double > &) const, const size_t &dummy_int, const Vector< double > &dummy_vector, const Vector< double > &x) const
 

Private Attributes

NumericalDifferentiationMethod numerical_differentiation_method
 
size_t precision_digits
 
bool display
 

Detailed Description

This class contains methods for numerical differentiation of functions. In particular it implements the forward and central differences methods for derivatives, Jacobians, Hessians or Hessian forms.

Definition at line 37 of file numerical_differentiation.h.

Constructor & Destructor Documentation

OpenNN::NumericalDifferentiation::NumericalDifferentiation ( void  )
explicit

Default constructor. It creates a numerical differentiation object with the default members.

Definition at line 26 of file numerical_differentiation.cpp.

Member Function Documentation

template<class T >
double OpenNN::NumericalDifferentiation::calculate_central_differences_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the derivative of a function using the central differences method.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 128 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function using the central differences method.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 214 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 309 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 712 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &)  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 832 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 956 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_gradient ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is used for the function definition, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1082 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1243 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 1471 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the central differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1701 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 2621 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2867 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const. The first argument is dummy, differentiation is performed with respect to the second argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 3114 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_central_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 3364 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1896 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 2027 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 2162 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2301 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_central_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const size_t &, const Vector< double > &) const  f,
const size_t &  dummy_int_1,
const size_t &  dummy_int_2,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the central differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_int_1Dummy integer for the method prototype.
dummy_int_2Dummy integer for the method prototype.
xInput vector.

Definition at line 2443 of file numerical_differentiation.h.

template<class T >
double OpenNN::NumericalDifferentiation::calculate_central_differences_second_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the second derivative of a function using the central differences method.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 404 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_second_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the second derivative of a vector function using the central differences method.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 503 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_central_differences_second_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the second derivatives of a vector function using the central differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 600 of file numerical_differentiation.h.

template<class T >
double OpenNN::NumericalDifferentiation::calculate_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the derivative of a function acording to the numerical differentiation method to be used.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 150 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function acording to the numerical differentiation method to be used.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 241 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 336 of file numerical_differentiation.h.

template<class T >
double OpenNN::NumericalDifferentiation::calculate_forward_differences_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the derivative of a function using the forward differences method.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 106 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function using the forward differences method.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 190 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the derivatives of a vector function using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 283 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 674 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &)  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const Vector<double>&).

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 794 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_gradient ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 916 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_gradient ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is used for the function definition, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1042 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1169 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 1395 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions using the forward differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1625 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 2539 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2781 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const. The first argument is dummy, differentiation is performed with respect to the second argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 3030 of file numerical_differentiation.h.

template<class T >
Vector< Matrix <double> > OpenNN::NumericalDifferentiation::calculate_forward_differences_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 3277 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1855 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 1985 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 2119 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2256 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const size_t &, const Vector< double > &) const  f,
const size_t &  dummy_int_1,
const size_t &  dummy_int_2,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs using the forward differences method. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
dummy_int_1Dummy integer for the method prototype.
dummy_int_2Dummy integer for the method prototype.
xInput vector.

Definition at line 2398 of file numerical_differentiation.h.

template<class T >
double OpenNN::NumericalDifferentiation::calculate_forward_differences_second_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the second derivative of a function using the forward differences method.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 378 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_second_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the second derivative of a vector function using the forward differences method.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 479 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_forward_differences_second_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the second derivatives of a vector function using the forward differences method. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 574 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_gradient ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 754 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_gradient ( const T &  t,
double(T::*)(const Vector< double > &)  f,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 874 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_gradient ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 1000 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_gradient ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the gradient of a function of several dimensions acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is used for the function definition, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1126 of file numerical_differentiation.h.

double OpenNN::NumericalDifferentiation::calculate_h ( const double &  x) const

Calculates a proper step size for computing the derivatives, as a function of the inputs point value.

Parameters
xInput value.

Definition at line 269 of file numerical_differentiation.cpp.

Vector< double > OpenNN::NumericalDifferentiation::calculate_h ( const Vector< double > &  x) const

Calculates a vector of step sizes for computing the derivatives, as a function of a vector of inputs.

Parameters
xInput vector.

Definition at line 282 of file numerical_differentiation.cpp.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Hessian ( const T &  t,
double(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1353 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Hessian ( const T &  t,
double(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions according to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const Vector<double>&, const Vector<double>&) const. The first vector argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 1583 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Hessian ( const T &  t,
double(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian matrix of a function of several dimensions according to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 1813 of file numerical_differentiation.h.

template<class T >
Vector< Matrix<double> > OpenNN::NumericalDifferentiation::calculate_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 2737 of file numerical_differentiation.h.

template<class T >
Vector< Matrix<double> > OpenNN::NumericalDifferentiation::calculate_Hessian_form ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2987 of file numerical_differentiation.h.

template<class T >
Vector< Matrix<double> > OpenNN::NumericalDifferentiation::calculate_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const. The first argument is dummy, differentiation is performed with respect to the second argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 3232 of file numerical_differentiation.h.

template<class T >
Vector< Matrix<double> > OpenNN::NumericalDifferentiation::calculate_Hessian_form ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Hessian form, as a vector of matrices, of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 3485 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 1944 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Jacobian ( const T &  t,
Vector< double >(T::*)(const Vector< double > &, const Vector< double > &) const  f,
const Vector< double > &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const Vector<double>&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy vector for the method prototype.
xInput vector.

Definition at line 2076 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&) const. The first integer argument is dummy, differentiation is performed with respect to the second vector argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 2212 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &, const Vector< double > &) const  f,
const size_t &  dummy_int,
const Vector< double > &  dummy_vector,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummy_intDummy integer for the method prototype.
dummy_vectorDummy vector for the method prototype.
xInput vector.

Definition at line 2353 of file numerical_differentiation.h.

template<class T >
Matrix<double> OpenNN::NumericalDifferentiation::calculate_Jacobian ( const T &  t,
Vector< double >(T::*)(const size_t &, const size_t &, const Vector< double > &) const  f,
const size_t &  dummy_int_1,
const size_t &  dummy_int_2,
const Vector< double > &  x 
) const
inline

Returns the Jacobian matrix of a function of many inputs and many outputs according to the numerical differentiation method to be used. The function to be differentiated is of the following form: double f(const size_t&, const Vector<double>&, const Vector<double>&) const. The first and second arguments are dummy, differentiation is performed with respect to the third argument.

Parameters
tObject constructor containing the member method to differentiate.
fPointer to the member method.
dummy_int_1Dummy integer for the method prototype.
dummy_int_2Dummy integer for the method prototype.
xInput vector.

Definition at line 2495 of file numerical_differentiation.h.

template<class T >
double OpenNN::NumericalDifferentiation::calculate_second_derivative ( const T &  t,
double(T::*)(const double &) const  f,
const double &  x 
) const
inline

Returns the second derivative of a function acording to the numerical differentiation method to be used.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xDifferentiation point.

Definition at line 440 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_second_derivative ( const T &  t,
Vector< double >(T::*)(const Vector< double > &) const  f,
const Vector< double > &  x 
) const
inline

Returns the second derivative of a vector function acording to the numerical differentiation method to be used.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
xInput vector.

Definition at line 533 of file numerical_differentiation.h.

template<class T >
Vector<double> OpenNN::NumericalDifferentiation::calculate_second_derivative ( const T &  t,
Vector< double >(T::*)(const size_t &, const Vector< double > &) const  f,
const size_t &  dummy,
const Vector< double > &  x 
) const
inline

Returns the second derivatives of a vector function acording to the numerical differentiation method to be used. The function to be differentiated is of the following form: Vector<double> f(const size_t&, const Vector<double>&) const.

Parameters
t: Object constructor containing the member method to differentiate.
fPointer to the member method.
dummyDummy integer for the method prototype.
xInput vector.

Definition at line 632 of file numerical_differentiation.h.

void OpenNN::NumericalDifferentiation::from_XML ( const tinyxml2::XMLDocument &  document)

Deserializes the object from a XML document.

Parameters
documentTinyXML document with the member data.

Definition at line 357 of file numerical_differentiation.cpp.

NumericalDifferentiation & OpenNN::NumericalDifferentiation::operator= ( const NumericalDifferentiation other_numerical_differentiation)

Assignment operator. This operator sets the members of this object with the members of another object.

Parameters
other_numerical_differentiationNumerical differentiation object to be copied.

Definition at line 60 of file numerical_differentiation.cpp.

bool OpenNN::NumericalDifferentiation::operator== ( const NumericalDifferentiation other_numerical_differentiation) const

Equal to operator. This operator compares another object to this object. It returns true if both objects are equal and false otherwise.

Parameters
other_numerical_differentiationNumerical differentiation object to be compared.

Definition at line 84 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set ( const NumericalDifferentiation other_numerical_differentiation)

Sets the members of this object to be equal to those of another object.

Parameters
other_numerical_differentiationNumerical differentiation object to be copied.

Definition at line 171 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set_default ( void  )

Sets default values for the members of this object:

  • Numerical differentiation method: Central differences.
  • Precision digits: 6.
  • Display: true.

Definition at line 254 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set_display ( const bool &  new_display)

Sets a new flag for displaying warnings from this class or not.

Parameters
new_displayDisplay flag.

Definition at line 228 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set_numerical_differentiation_method ( const NumericalDifferentiationMethod new_numerical_differentiation_method)

Sets the method to be used for numerical differentiation (forward differences or central differences).

Parameters
new_numerical_differentiation_methodNew numerical differentiation method.

Definition at line 188 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set_numerical_differentiation_method ( const std::string &  new_numerical_differentiation_method)

Sets the method to be used for the numerical differentiation. The argument is a string with the name of the numerical differentiation method.

Parameters
new_numerical_differentiation_methodNumerical differentiation method name string.

Definition at line 200 of file numerical_differentiation.cpp.

void OpenNN::NumericalDifferentiation::set_precision_digits ( const size_t &  new_precision_digits)

Sets a new number of precision digits required for the derivatives.

Parameters
new_precision_digitsNumber of precision digits.

Definition at line 239 of file numerical_differentiation.cpp.


The documentation for this class was generated from the following files: