OpenNN
2.2
Open Neural Networks Library
|
#include <numerical_differentiation.h>
Public Types | |
enum | NumericalDifferentiationMethod { ForwardDifferences, CentralDifferences } |
Public Member Functions | |
NumericalDifferentiation (void) | |
NumericalDifferentiation (const NumericalDifferentiation &) | |
virtual | ~NumericalDifferentiation (void) |
NumericalDifferentiation & | operator= (const NumericalDifferentiation &) |
bool | operator== (const NumericalDifferentiation &) const |
const NumericalDifferentiationMethod & | get_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 |
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.
|
explicit |
Default constructor. It creates a numerical differentiation object with the default members.
Definition at line 26 of file numerical_differentiation.cpp.
|
inline |
Returns the derivative of a function using the central differences method.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 128 of file numerical_differentiation.h.
|
inline |
Returns the derivatives of a vector function using the central differences method.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 214 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 309 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 712 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 832 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 956 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 1082 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1243 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 1471 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 1701 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 2621 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2867 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 3114 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 3364 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1896 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2027 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2162 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2301 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int_1 | Dummy integer for the method prototype. |
dummy_int_2 | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2443 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a function using the central differences method.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 404 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a vector function using the central differences method.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 503 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 600 of file numerical_differentiation.h.
|
inline |
Returns the derivative of a function acording to the numerical differentiation method to be used.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 150 of file numerical_differentiation.h.
|
inline |
Returns the derivatives of a vector function acording to the numerical differentiation method to be used.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 241 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 336 of file numerical_differentiation.h.
|
inline |
Returns the derivative of a function using the forward differences method.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 106 of file numerical_differentiation.h.
|
inline |
Returns the derivatives of a vector function using the forward differences method.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 190 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 283 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 674 of file numerical_differentiation.h.
|
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>&).
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 794 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 916 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 1042 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1169 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 1395 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 1625 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 2539 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2781 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 3030 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 3277 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1855 of file numerical_differentiation.h.
|
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.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 1985 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2119 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2256 of file numerical_differentiation.h.
|
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.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int_1 | Dummy integer for the method prototype. |
dummy_int_2 | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2398 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a function using the forward differences method.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 378 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a vector function using the forward differences method.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 479 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 574 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 754 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 874 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 1000 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input 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.
x | Input value. |
Definition at line 269 of file numerical_differentiation.cpp.
Calculates a vector of step sizes for computing the derivatives, as a function of a vector of inputs.
x | Input vector. |
Definition at line 282 of file numerical_differentiation.cpp.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1353 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 1583 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 1813 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 2737 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2987 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 3232 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 3485 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 1944 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2076 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2212 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int | Dummy integer for the method prototype. |
dummy_vector | Dummy vector for the method prototype. |
x | Input vector. |
Definition at line 2353 of file numerical_differentiation.h.
|
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.
t | Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy_int_1 | Dummy integer for the method prototype. |
dummy_int_2 | Dummy integer for the method prototype. |
x | Input vector. |
Definition at line 2495 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a function acording to the numerical differentiation method to be used.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Differentiation point. |
Definition at line 440 of file numerical_differentiation.h.
|
inline |
Returns the second derivative of a vector function acording to the numerical differentiation method to be used.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
x | Input vector. |
Definition at line 533 of file numerical_differentiation.h.
|
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.
t | : Object constructor containing the member method to differentiate. |
f | Pointer to the member method. |
dummy | Dummy integer for the method prototype. |
x | Input 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.
document | TinyXML 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.
other_numerical_differentiation | Numerical 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.
other_numerical_differentiation | Numerical 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.
other_numerical_differentiation | Numerical 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:
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.
new_display | Display 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).
new_numerical_differentiation_method | New 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.
new_numerical_differentiation_method | Numerical 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.
new_precision_digits | Number of precision digits. |
Definition at line 239 of file numerical_differentiation.cpp.