casa
$Rev:20696$
|
Representation of data for the spare automatic differentiation calss. More...
#include <SparseDiffRep.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 | |
SparseDiffRep () | |
Construct a constant with a value of zero. | |
SparseDiffRep< T > & | operator= (const T &v) |
Assignment operators. | |
SparseDiffRep< T > & | operator= (const vector< pair< uInt, T > > &grad) |
SparseDiffRep< T > & | operator= (const SparseDiffRep< T > &other) |
void | operator*= (const T other) |
void | operator/= (const T other) |
void | operator+= (const T other) |
void | operator-= (const T other) |
void | clear () |
Clear for reuse. | |
Public Attributes | |
T | val_p |
The function value. | |
vector< pair< uInt, T > > | grad_p |
The derivatives. | |
uInt | link_p |
Link to indicate its status (1=linked in stack; 2=used in modules) |
Representation of data for the spare automatic differentiation calss.
Internal
Class that represents partial derivatives obtained by automatic differentiation.
Class representing the data necessary for automatic differentiation. The structure contains a value, and the derivatives of the value with respect to a number of dependent variables.
The actual differentiation and access is done through the SparseDiff class.
See the example in SparseDiff
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 89 of file SparseDiffRep.h.
typedef const value_type* casa::SparseDiffRep< T >::const_iterator |
Definition at line 96 of file SparseDiffRep.h.
typedef const value_type& casa::SparseDiffRep< T >::const_reference |
Definition at line 94 of file SparseDiffRep.h.
typedef value_type* casa::SparseDiffRep< T >::iterator |
Definition at line 95 of file SparseDiffRep.h.
typedef value_type& casa::SparseDiffRep< T >::reference |
Definition at line 93 of file SparseDiffRep.h.
typedef T casa::SparseDiffRep< T >::value_type |
Definition at line 92 of file SparseDiffRep.h.
casa::SparseDiffRep< T >::SparseDiffRep | ( | ) |
Construct a constant with a value of zero.
Zero derivatives.
void casa::SparseDiffRep< T >::clear | ( | ) | [inline] |
Clear for reuse.
Definition at line 117 of file SparseDiffRep.h.
References casa::SparseDiffRep< T >::grad_p.
void casa::SparseDiffRep< T >::operator*= | ( | const T | other | ) |
void casa::SparseDiffRep< T >::operator+= | ( | const T | other | ) |
void casa::SparseDiffRep< T >::operator-= | ( | const T | other | ) |
void casa::SparseDiffRep< T >::operator/= | ( | const T | other | ) |
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= | ( | const T & | v | ) |
Assignment operators.
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= | ( | const vector< pair< uInt, T > > & | grad | ) |
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= | ( | const SparseDiffRep< T > & | other | ) |
vector<pair<uInt, T> > casa::SparseDiffRep< T >::grad_p |
The derivatives.
Definition at line 123 of file SparseDiffRep.h.
Referenced by casa::SparseDiffRep< T >::clear().
uInt casa::SparseDiffRep< T >::link_p |
Link to indicate its status (1=linked in stack; 2=used in modules)
Definition at line 125 of file SparseDiffRep.h.
T casa::SparseDiffRep< T >::val_p |
The function value.
Definition at line 121 of file SparseDiffRep.h.