casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Public Attributes
casa::SparseDiffRep< T > Class Template Reference

Representation of data for the spare automatic differentiation calss. More...

#include <SparseDiffRep.h>

List of all members.

Public Types

typedef T value_type
typedef value_typereference
typedef const value_typeconst_reference
typedef value_typeiterator
typedef const value_typeconst_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

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)

Detailed Description

template<class T>
class casa::SparseDiffRep< T >

Representation of data for the spare automatic differentiation calss.

Intended use:

Internal

Review Status

Reviewed By:
UNKNOWN
Test programs:
tSparseDiff

Prerequisite

Etymology

Class that represents partial derivatives obtained by automatic differentiation.

Synopsis

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.

Example

See the example in SparseDiff

Motivation

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.

Template Type Argument Requirements (T)

To Do

Definition at line 89 of file SparseDiffRep.h.


Member Typedef Documentation

template<class T>
typedef const value_type* casa::SparseDiffRep< T >::const_iterator

Definition at line 96 of file SparseDiffRep.h.

template<class T>
typedef const value_type& casa::SparseDiffRep< T >::const_reference

Definition at line 94 of file SparseDiffRep.h.

template<class T>
typedef value_type* casa::SparseDiffRep< T >::iterator

Definition at line 95 of file SparseDiffRep.h.

template<class T>
typedef value_type& casa::SparseDiffRep< T >::reference

Definition at line 93 of file SparseDiffRep.h.

template<class T>
typedef T casa::SparseDiffRep< T >::value_type

Definition at line 92 of file SparseDiffRep.h.


Constructor & Destructor Documentation

template<class T>
casa::SparseDiffRep< T >::SparseDiffRep ( )

Construct a constant with a value of zero.

Zero derivatives.


Member Function Documentation

template<class T>
void casa::SparseDiffRep< T >::clear ( ) [inline]

Clear for reuse.

Definition at line 117 of file SparseDiffRep.h.

References casa::SparseDiffRep< T >::grad_p.

template<class T>
void casa::SparseDiffRep< T >::operator*= ( const T  other)
template<class T>
void casa::SparseDiffRep< T >::operator+= ( const T  other)
template<class T>
void casa::SparseDiffRep< T >::operator-= ( const T  other)
template<class T>
void casa::SparseDiffRep< T >::operator/= ( const T  other)
template<class T>
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= ( const T &  v)

Assignment operators.

template<class T>
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= ( const vector< pair< uInt, T > > &  grad)
template<class T>
SparseDiffRep<T>& casa::SparseDiffRep< T >::operator= ( const SparseDiffRep< T > &  other)

Member Data Documentation

template<class T>
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().

template<class T>
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.

template<class T>
T casa::SparseDiffRep< T >::val_p

The function value.

Definition at line 121 of file SparseDiffRep.h.


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