casacore
Public Types | Public Member Functions | Public Attributes | List of all members
casacore::SparseDiffRep< T > Class Template Reference

More...

#include <SparseDiffRep.h>

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. More...
 
SparseDiffRep< T > & operator= (const T &v)
 Assignment operators. More...
 
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. More...
 

Public Attributes

val_p
 The function value. More...
 
vector< pair< uInt, T > > grad_p
 The derivatives. More...
 
uInt link_p
 Link to indicate its status (1=linked in stack; 2=used in modules) More...
 

Detailed Description

template<class T>
class casacore::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

◆ const_iterator

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

Definition at line 96 of file SparseDiffRep.h.

◆ const_reference

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

Definition at line 94 of file SparseDiffRep.h.

◆ iterator

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

Definition at line 95 of file SparseDiffRep.h.

◆ reference

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

Definition at line 93 of file SparseDiffRep.h.

◆ value_type

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

Definition at line 92 of file SparseDiffRep.h.

Constructor & Destructor Documentation

◆ SparseDiffRep()

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

Construct a constant with a value of zero.

Zero derivatives.

Member Function Documentation

◆ clear()

template<class T >
void casacore::SparseDiffRep< T >::clear ( )
inline

Clear for reuse.

Definition at line 117 of file SparseDiffRep.h.

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

◆ operator*=()

template<class T >
void casacore::SparseDiffRep< T >::operator*= ( const T  other)

◆ operator+=()

template<class T >
void casacore::SparseDiffRep< T >::operator+= ( const T  other)

◆ operator-=()

template<class T >
void casacore::SparseDiffRep< T >::operator-= ( const T  other)

◆ operator/=()

template<class T >
void casacore::SparseDiffRep< T >::operator/= ( const T  other)

◆ operator=() [1/3]

template<class T >
SparseDiffRep<T>& casacore::SparseDiffRep< T >::operator= ( const SparseDiffRep< T > &  other)

◆ operator=() [2/3]

template<class T >
SparseDiffRep<T>& casacore::SparseDiffRep< T >::operator= ( const T &  v)

Assignment operators.

◆ operator=() [3/3]

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

Member Data Documentation

◆ grad_p

template<class T >
vector<pair<uInt, T> > casacore::SparseDiffRep< T >::grad_p

The derivatives.

Definition at line 123 of file SparseDiffRep.h.

Referenced by casacore::SparseDiffRep< T >::clear().

◆ link_p

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

◆ val_p

template<class T >
T casacore::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: