Sacado::Fad::DynamicStorage< T, S > Class Template Reference

Derivative array storage class using dynamic memory allocation. More...

#include <Sacado_Fad_DynamicStorage.hpp>

Inheritance diagram for Sacado::Fad::DynamicStorage< T, S >:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DynamicStorage (const T &x)
 Default constructor.
 DynamicStorage (const int sz, const T &x)
 Constructor with size sz.
 DynamicStorage (const DynamicStorage &x)
 Copy constructor.
 ~DynamicStorage ()
 Destructor.
DynamicStorageoperator= (const DynamicStorage &x)
 Assignment.
int size () const
 Returns number of derivative components.
int length () const
 Returns array length.
void resize (int sz)
 Resize the derivative array to sz.
void zero ()
 Zero out derivative array.
const T & val () const
 Returns value.
T & val ()
 Returns value.
const S * dx () const
 Returns derivative array.
dx (int i) const
 Returns derivative component i with bounds checking.
S & fastAccessDx (int i)
 Returns derivative component i without bounds checking.
const S & fastAccessDx (int i) const
 Returns derivative component i without bounds checking.

Private Attributes

val_
 Value.
int sz_
 Derivative array size.
int len_
 Derivative array length.
S * dx_
 Derivative array.

Detailed Description

template<typename T, typename S = T>
class Sacado::Fad::DynamicStorage< T, S >

Derivative array storage class using dynamic memory allocation.

Definition at line 44 of file Sacado_Fad_DynamicStorage.hpp.


Constructor & Destructor Documentation

template<typename T, typename S = T>
Sacado::Fad::DynamicStorage< T, S >::DynamicStorage ( const T &  x  )  [inline]

Default constructor.

Definition at line 49 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
Sacado::Fad::DynamicStorage< T, S >::DynamicStorage ( const int  sz,
const T &  x 
) [inline]

Constructor with size sz.

Initializes derivative array 0 of length sz

Definition at line 56 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
Sacado::Fad::DynamicStorage< T, S >::DynamicStorage ( const DynamicStorage< T, S > &  x  )  [inline]

Copy constructor.

Definition at line 62 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
Sacado::Fad::DynamicStorage< T, S >::~DynamicStorage (  )  [inline]

Destructor.

Definition at line 68 of file Sacado_Fad_DynamicStorage.hpp.


Member Function Documentation

template<typename T, typename S = T>
DynamicStorage& Sacado::Fad::DynamicStorage< T, S >::operator= ( const DynamicStorage< T, S > &  x  )  [inline]

Assignment.

Definition at line 74 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
int Sacado::Fad::DynamicStorage< T, S >::size (  )  const [inline]

Returns number of derivative components.

Definition at line 94 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
int Sacado::Fad::DynamicStorage< T, S >::length (  )  const [inline]

Returns array length.

Definition at line 97 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
void Sacado::Fad::DynamicStorage< T, S >::resize ( int  sz  )  [inline]

Resize the derivative array to sz.

Definition at line 100 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
void Sacado::Fad::DynamicStorage< T, S >::zero (  )  [inline]

Zero out derivative array.

Definition at line 111 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
const T& Sacado::Fad::DynamicStorage< T, S >::val (  )  const [inline]

Returns value.

Definition at line 116 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
T& Sacado::Fad::DynamicStorage< T, S >::val (  )  [inline]

Returns value.

Definition at line 119 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
const S* Sacado::Fad::DynamicStorage< T, S >::dx (  )  const [inline]

Returns derivative array.

Definition at line 122 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
S Sacado::Fad::DynamicStorage< T, S >::dx ( int  i  )  const [inline]

Returns derivative component i with bounds checking.

Definition at line 125 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
S& Sacado::Fad::DynamicStorage< T, S >::fastAccessDx ( int  i  )  [inline]

Returns derivative component i without bounds checking.

Definition at line 128 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
const S& Sacado::Fad::DynamicStorage< T, S >::fastAccessDx ( int  i  )  const [inline]

Returns derivative component i without bounds checking.

Definition at line 131 of file Sacado_Fad_DynamicStorage.hpp.


Member Data Documentation

template<typename T, typename S = T>
T Sacado::Fad::DynamicStorage< T, S >::val_ [private]

Value.

Definition at line 136 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
int Sacado::Fad::DynamicStorage< T, S >::sz_ [private]

Derivative array size.

Definition at line 139 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
int Sacado::Fad::DynamicStorage< T, S >::len_ [private]

Derivative array length.

Definition at line 142 of file Sacado_Fad_DynamicStorage.hpp.

template<typename T, typename S = T>
S* Sacado::Fad::DynamicStorage< T, S >::dx_ [private]

Derivative array.

Definition at line 145 of file Sacado_Fad_DynamicStorage.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Wed Apr 13 10:19:44 2011 for Sacado Package Browser (Single Doxygen Collection) by  doxygen 1.6.3