casa
$Rev:20696$
|
Representation of an automatic differential class data. More...
#include <AutoDiffRep.h>
Public Types | |
typedef T | value_type |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef value_type * | iterator |
typedef const value_type * | const_iterator |
Public Member Functions | |
AutoDiffRep () | |
Construct a constant with a value of zero. | |
AutoDiffRep (const T &v) | |
Construct a constant with a value of v. | |
AutoDiffRep (const T &v, const uInt ndiffs, const uInt n) | |
Given a function f(x0,x1,...,xn,...). | |
AutoDiffRep (const T &v, const uInt ndiffs) | |
Given a function f(x0,x1,...,xn,...). | |
AutoDiffRep (const uInt ndiffs) | |
Construct with ndiffs derivatives. | |
AutoDiffRep (const AutoDiffRep< T > &other) | |
Construct one from another (deep copy) | |
AutoDiffRep (const T &v, const Vector< T > &derivs) | |
Construct a function f(x0,x1,...,xn) of a value v and a vector of derivatives derivs(0) = df/dx0, derivs(1) = df/dx1, ... | |
~AutoDiffRep () | |
Destructor. | |
AutoDiffRep< T > & | operator= (const T &v) |
Assign a constant to variable. | |
AutoDiffRep< T > & | operator= (const AutoDiffRep< T > &other) |
Assign one to another (deep copy). | |
Public Attributes | |
T | val_p |
The function value. | |
uInt | nd_p |
The number of derivatives. | |
Bool | nocopy_p |
A flag indicating that value will not be used anymore (to stop superfluous copying) | |
Vector< T > | grad_p |
The derivatives. |
Representation of an automatic differential class data.
Internal
Class that represents partial derivatives obtained by automatic differentiation.
Structure (only a class since cxx2html cannot handle struct) representing the data necessary for automatic differentiation. The structure contains a value, and the derivatives of the value with respect to the number of dependend variables.
The actual differentiation and access is done through the AutoDiff class.
See the example in AutoDiff
To separate the data container from the actual calculations. To be able to create special conatiners; constructors and destructors (including memory allocation) to speed up processes.
Definition at line 85 of file AutoDiffRep.h.
typedef const value_type* casa::AutoDiffRep< T >::const_iterator |
Definition at line 92 of file AutoDiffRep.h.
typedef const value_type& casa::AutoDiffRep< T >::const_reference |
Definition at line 90 of file AutoDiffRep.h.
typedef value_type* casa::AutoDiffRep< T >::iterator |
Definition at line 91 of file AutoDiffRep.h.
typedef value_type& casa::AutoDiffRep< T >::reference |
Definition at line 89 of file AutoDiffRep.h.
typedef T casa::AutoDiffRep< T >::value_type |
Definition at line 88 of file AutoDiffRep.h.
casa::AutoDiffRep< T >::AutoDiffRep | ( | ) |
Construct a constant with a value of zero.
Zero derivatives.
casa::AutoDiffRep< T >::AutoDiffRep | ( | const T & | v | ) | [explicit] |
Construct a constant with a value of v.
Zero derivatives.
casa::AutoDiffRep< T >::AutoDiffRep | ( | const T & | v, |
const uInt | ndiffs, | ||
const uInt | n | ||
) |
Given a function f(x0,x1,...,xn,...).
Construct with a total number of derivatives ndiffs. The nth derivative is one, and all others are zero. The value v is the value of xn.
casa::AutoDiffRep< T >::AutoDiffRep | ( | const T & | v, |
const uInt | ndiffs | ||
) |
Given a function f(x0,x1,...,xn,...).
Construct with a total number of derivatives ndiffs, and a value of xn. All derivatives are zero.
casa::AutoDiffRep< T >::AutoDiffRep | ( | const uInt | ndiffs | ) |
Construct with ndiffs derivatives.
All values and derivatives zero
casa::AutoDiffRep< T >::AutoDiffRep | ( | const AutoDiffRep< T > & | other | ) |
Construct one from another (deep copy)
casa::AutoDiffRep< T >::AutoDiffRep | ( | const T & | v, |
const Vector< T > & | derivs | ||
) |
Construct a function f(x0,x1,...,xn) of a value v and a vector of derivatives derivs(0) = df/dx0, derivs(1) = df/dx1, ...
casa::AutoDiffRep< T >::~AutoDiffRep | ( | ) |
Destructor.
AutoDiffRep<T>& casa::AutoDiffRep< T >::operator= | ( | const T & | v | ) |
Assign a constant to variable.
All derivatives are zero.
AutoDiffRep<T>& casa::AutoDiffRep< T >::operator= | ( | const AutoDiffRep< T > & | other | ) |
Assign one to another (deep copy).
Vector<T> casa::AutoDiffRep< T >::grad_p |
The derivatives.
Definition at line 143 of file AutoDiffRep.h.
uInt casa::AutoDiffRep< T >::nd_p |
The number of derivatives.
Definition at line 138 of file AutoDiffRep.h.
Bool casa::AutoDiffRep< T >::nocopy_p |
A flag indicating that value will not be used anymore (to stop superfluous copying)
Definition at line 141 of file AutoDiffRep.h.
T casa::AutoDiffRep< T >::val_p |
The function value.
Definition at line 136 of file AutoDiffRep.h.