#include <Sacado_LFad_LogicalSparse.hpp>
Inheritance diagram for Sacado::LFad::LogicalSparseImp< ValT, LogT >:

Public Types | |
| typedef ValT | value_type |
| Typename of values (e.g., double). | |
| typedef LogT | logical_type |
| Logical type (i.e., type for derivative array components (e.g., bool). | |
Public Member Functions | |
Initialization methods | |
| LogicalSparseImp () | |
| Default constructor. | |
| LogicalSparseImp (const value_type &x) | |
Constructor with supplied value x. | |
| LogicalSparseImp (const int sz, const value_type &x) | |
Constructor with size sz and value x. | |
| LogicalSparseImp (const int sz, const int i, const value_type &x) | |
Constructor with size sz, index i, and value x. | |
| LogicalSparseImp (const LogicalSparseImp &x) | |
| Copy constructor. | |
| template<typename S> | |
| LogicalSparseImp (const Expr< S > &x) | |
| Copy constructor from any Expression object. | |
| ~LogicalSparseImp () | |
| Destructor. | |
| void | diff (const int ith, const int n) |
Set LogicalSparseImp 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 value_type & | val () const |
| Returns value. | |
| value_type & | 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 logical_type * | dx () const |
| Returns derivative array. | |
| logical_type | dx (int i) const |
Returns derivative component i with bounds checking. | |
| logical_type & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. | |
| const logical_type & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. | |
Assignment operators | |
| LogicalSparseImp & | operator= (const value_type &val) |
| Assignment operator with constant right-hand-side. | |
| LogicalSparseImp & | operator= (const LogicalSparseImp &x) |
| Assignment with Expr right-hand-side. | |
| template<typename S> | |
| LogicalSparseImp & | operator= (const Expr< S > &x) |
| Assignment operator with any expression right-hand-side. | |
Unary operators | |
| LogicalSparseImp & | operator+= (const value_type &x) |
| Addition-assignment operator with constant right-hand-side. | |
| LogicalSparseImp & | operator-= (const value_type &x) |
| Subtraction-assignment operator with constant right-hand-side. | |
| LogicalSparseImp & | operator *= (const value_type &x) |
| Multiplication-assignment operator with constant right-hand-side. | |
| LogicalSparseImp & | operator/= (const value_type &x) |
| Division-assignment operator with constant right-hand-side. | |
| template<typename S> | |
| LogicalSparseImp & | operator+= (const Expr< S > &x) |
| Addition-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| LogicalSparseImp & | operator-= (const Expr< S > &x) |
| Subtraction-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| LogicalSparseImp & | operator *= (const Expr< S > &x) |
| Multiplication-assignment operator with Expr right-hand-side. | |
| template<typename S> | |
| LogicalSparseImp & | operator/= (const Expr< S > &x) |
| Division-assignment operator with Expr right-hand-side. | |
Protected Attributes | |
|
Fad::DynamicStorage< value_type, logical_type > | s_ |
| Value & Sparsity. | |
| Sacado::LFad::LogicalSparseImp< ValT, LogT >::LogicalSparseImp | ( | const value_type & | x | ) | [inline] |
Constructor with supplied value x.
Initializes value to x and derivative array is empty
| Sacado::LFad::LogicalSparseImp< ValT, LogT >::LogicalSparseImp | ( | const int | sz, | |
| const value_type & | x | |||
| ) | [inline] |
Constructor with size sz and value x.
Initializes value to x and derivative array 0 of length sz
| Sacado::LFad::LogicalSparseImp< ValT, LogT >::LogicalSparseImp | ( | const int | sz, | |
| const int | i, | |||
| const value_type & | 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.
| void Sacado::LFad::LogicalSparseImp< ValT, LogT >::diff | ( | const int | ith, | |
| const int | n | |||
| ) | [inline] |
Set LogicalSparseImp 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.
| void Sacado::LFad::LogicalSparseImp< ValT, LogT >::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.
1.4.7