Loading...
Searching...
No Matches
casacore::SparseDiffRep< T > Class Template Reference
scimath package (libcasa_scimath) » Mathematics_module » Mathematics_module_internal_classes

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).

## 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

- SparseDiff

### 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)

- any class that has the standard mathematical and comparison operators defined

### To Do

- Nothing I know of

Definition at line 86 of file SparseDiffRep.h.

## Member Typedef Documentation

## const_iterator

template<class T>

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

Definition at line 93 of file SparseDiffRep.h.

## const_reference

template<class T>

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

Definition at line 91 of file SparseDiffRep.h.

## iterator

template<class T>

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

Definition at line 92 of file SparseDiffRep.h.

## reference

template<class T>

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

Definition at line 90 of file SparseDiffRep.h.

## value_type

template<class T>

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

Definition at line 89 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.

Referenced by operator=(), operator=(), and operator=().

## Member Function Documentation

## clear()

template<class T>

void casacore::SparseDiffRep< T >::clear | ( |  | ) |

inline

Clear for reuse.

Definition at line 114 of file SparseDiffRep.h.

References 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 | ) |

References SparseDiffRep().

## operator=() [2/3]

template<class T>

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

Assignment operators.

References SparseDiffRep().

## operator=() [3/3]

template<class T>

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

References SparseDiffRep().

## Member Data Documentation

## grad_p

template<class T>

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

The derivatives.

Definition at line 120 of file SparseDiffRep.h.

Referenced by 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 122 of file SparseDiffRep.h.

## val_p

template<class T>

T casacore::SparseDiffRep< T >::val_p

The function value.

Definition at line 118 of file SparseDiffRep.h.

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

- scimath/Mathematics/SparseDiffRep.h