#include <Sacado_Fad_GeneralFad.hpp>
Inheritance diagram for Sacado::Fad::GeneralFad< T, Storage >:

Initialization methods | |
| GeneralFad () | |
| Default constructor. | |
| GeneralFad (const T &x) | |
Constructor with supplied value x. | |
| GeneralFad (const int sz, const T &x) | |
Constructor with size sz and value x. | |
| GeneralFad (const int sz, const int i, const T &x) | |
Constructor with size sz, index i, and value x. | |
| GeneralFad (const GeneralFad &x) | |
| Copy constructor. | |
| template<typename S> | |
| GeneralFad (const Expr< S > &x) | |
| Copy constructor from any Expression object. | |
| ~GeneralFad () | |
| Destructor. | |
| void | diff (const int ith, const int n) |
Set GeneralFad object as the ith independent variable. | |
| void | resize (int sz) |
Resize derivative array to length sz. | |
| void | zero () |
| Zero out the derivative array. | |
Value accessor methods | |
| const T & | val () const |
| Returns value. | |
| T & | val () |
| Returns value. | |
Derivative accessor methods | |
| int | size () const |
| Returns number of derivative components. | |
| bool | hasFastAccess () const |
| Returns true if derivative array is not empty. | |
| bool | isPassive () const |
| Returns true if derivative array is empty. | |
| void | setIsConstant (bool is_const) |
| Set whether variable is constant. | |
| const T * | dx () const |
| Returns derivative array. | |
| T | dx (int i) const |
Returns derivative component i with bounds checking. | |
| T & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. | |
| const T & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. | |
Assignment operators | |
| GeneralFad & | operator= (const T &val) |
| Assignment operator with constant right-hand-side. | |
| GeneralFad & | operator= (const GeneralFad &x) |
| Assignment with Expr right-hand-side. | |
| template<typename S> | |
| GeneralFad & | operator= (const Expr< S > &x) |
| Assignment operator with any expression right-hand-side. | |
Unary operators | |
| GeneralFad & | operator+= (const T &x) |
| Addition-assignment operator with constant right-hand-side. | |
| GeneralFad & | operator-= (const T &x) |
| Subtraction-assignment operator with constant right-hand-side. | |
| GeneralFad & | operator *= (const T &x) |
| Multiplication-assignment operator with constant right-hand-side. | |
| GeneralFad & | operator/= (const T &x) |
| Division-assignment operator with constant right-hand-side. | |
| template<typename S> | |
| GeneralFad & | operator+= (const Expr< S > &x) |
| Addition-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| GeneralFad & | operator-= (const Expr< S > &x) |
| Subtraction-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| GeneralFad & | operator *= (const Expr< S > &x) |
| Multiplication-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| GeneralFad & | operator/= (const Expr< S > &x) |
| Division-assignment operator with Expr right-hand-side. | |
Public Types | |
| typedef T | value_type |
| Typename of values. | |
Protected Attributes | |
| Storage | s_ |
| Value & Derivatives. | |
This class provides a general forward mode AD implementation for any type of derivative array storage. It does not incorporate expression templates.
Definition at line 71 of file Sacado_Fad_GeneralFad.hpp.
| typedef T Sacado::Fad::GeneralFad< T, Storage >::value_type |
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | ) | [inline] |
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | const T & | x | ) | [inline] |
Constructor with supplied value x.
Initializes value to x and derivative array is empty
Definition at line 90 of file Sacado_Fad_GeneralFad.hpp.
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | const int | sz, | |
| const T & | x | |||
| ) | [inline] |
Constructor with size sz and value x.
Initializes value to x and derivative array 0 of length sz
Definition at line 96 of file Sacado_Fad_GeneralFad.hpp.
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | const int | sz, | |
| const int | i, | |||
| const T & | x | |||
| ) | [inline] |
Constructor with size sz, index i, and value x.
Initializes value to x and derivative array of length sz as row i of the identity matrix, i.e., sets derivative component i to 1 and all other's to zero.
Definition at line 104 of file Sacado_Fad_GeneralFad.hpp.
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | const GeneralFad< T, Storage > & | x | ) | [inline] |
| Sacado::Fad::GeneralFad< T, Storage >::GeneralFad | ( | const Expr< S > & | x | ) | [inline] |
Copy constructor from any Expression object.
Definition at line 58 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage >::~GeneralFad | ( | ) | [inline] |
| void Sacado::Fad::GeneralFad< T, Storage >::diff | ( | const int | ith, | |
| const int | n | |||
| ) | [inline] |
Set GeneralFad object as the ith independent variable.
Sets the derivative array of length n to the ith row of the identity matrix and has the same affect as the Implementation(const int sz, const int i, const T & x) constructor.
Definition at line 81 of file Sacado_Fad_GeneralFadImp.hpp.
| void Sacado::Fad::GeneralFad< T, Storage >::resize | ( | int | sz | ) | [inline] |
Resize derivative array to length sz.
This method does not (re)initialize the derivative components, so any previous values may be lost. Also any pointers to derivative components may be invalid.
Definition at line 134 of file Sacado_Fad_GeneralFad.hpp.
| void Sacado::Fad::GeneralFad< T, Storage >::zero | ( | ) | [inline] |
| const T& Sacado::Fad::GeneralFad< T, Storage >::val | ( | ) | const [inline] |
| T& Sacado::Fad::GeneralFad< T, Storage >::val | ( | ) | [inline] |
| int Sacado::Fad::GeneralFad< T, Storage >::size | ( | ) | const [inline] |
| bool Sacado::Fad::GeneralFad< T, Storage >::hasFastAccess | ( | ) | const [inline] |
Returns true if derivative array is not empty.
Definition at line 163 of file Sacado_Fad_GeneralFad.hpp.
| bool Sacado::Fad::GeneralFad< T, Storage >::isPassive | ( | ) | const [inline] |
Returns true if derivative array is empty.
Definition at line 166 of file Sacado_Fad_GeneralFad.hpp.
| void Sacado::Fad::GeneralFad< T, Storage >::setIsConstant | ( | bool | is_const | ) | [inline] |
| const T* Sacado::Fad::GeneralFad< T, Storage >::dx | ( | ) | const [inline] |
| T Sacado::Fad::GeneralFad< T, Storage >::dx | ( | int | i | ) | const [inline] |
Returns derivative component i with bounds checking.
Definition at line 178 of file Sacado_Fad_GeneralFad.hpp.
| T& Sacado::Fad::GeneralFad< T, Storage >::fastAccessDx | ( | int | i | ) | [inline] |
Returns derivative component i without bounds checking.
Definition at line 182 of file Sacado_Fad_GeneralFad.hpp.
| const T& Sacado::Fad::GeneralFad< T, Storage >::fastAccessDx | ( | int | i | ) | const [inline] |
Returns derivative component i without bounds checking.
Definition at line 185 of file Sacado_Fad_GeneralFad.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator= | ( | const T & | val | ) | [inline] |
Assignment operator with constant right-hand-side.
Definition at line 93 of file Sacado_Fad_GeneralFadImp.hpp.
| GeneralFad& Sacado::Fad::GeneralFad< T, Storage >::operator= | ( | const GeneralFad< T, Storage > & | x | ) |
Assignment with Expr right-hand-side.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator= | ( | const Expr< S > & | x | ) | [inline] |
Assignment operator with any expression right-hand-side.
Definition at line 119 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator+= | ( | const T & | x | ) | [inline] |
Addition-assignment operator with constant right-hand-side.
Definition at line 142 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator-= | ( | const T & | x | ) | [inline] |
Subtraction-assignment operator with constant right-hand-side.
Definition at line 151 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator *= | ( | const T & | x | ) | [inline] |
Multiplication-assignment operator with constant right-hand-side.
Definition at line 160 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator/= | ( | const T & | x | ) | [inline] |
Division-assignment operator with constant right-hand-side.
Definition at line 173 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator+= | ( | const Expr< S > & | x | ) | [inline] |
Addition-assignment operator with Expr right-hand-side.
Definition at line 187 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator-= | ( | const Expr< S > & | x | ) | [inline] |
Subtraction-assignment operator with Expr right-hand-side.
Definition at line 224 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator *= | ( | const Expr< S > & | x | ) | [inline] |
Multiplication-assignment operator with Expr right-hand-side.
Definition at line 262 of file Sacado_Fad_GeneralFadImp.hpp.
| Sacado::Fad::GeneralFad< T, Storage > & Sacado::Fad::GeneralFad< T, Storage >::operator/= | ( | const Expr< S > & | x | ) | [inline] |
Division-assignment operator with Expr right-hand-side.
Definition at line 306 of file Sacado_Fad_GeneralFadImp.hpp.
Storage Sacado::Fad::GeneralFad< T, Storage >::s_ [protected] |
1.4.7