Sacado
Development
|
User inteface class for computing the logical sparsity pattern of a derivative via forward-mode AD. More...
#include <Sacado_LFad_LogicalSparse.hpp>
Classes | |
struct | apply |
Turn LogicalSparse into a meta-function class usable with mpl::apply. More... | |
Public Types | |
typedef LogicalSparseImp< ValT, LogT > | ImplType |
Base classes. | |
typedef Expr< ImplType > | ExprType |
typedef ExprType::value_type | value_type |
Typename of values. | |
typedef ExprType::scalar_type | scalar_type |
Typename of scalar's (which may be different from value_type) | |
Public Types inherited from Sacado::LFad::Expr< LogicalSparseImp< ValT, LogT > > | |
typedef LogicalSparseImp< ValT, LogT >::value_type | value_type |
Typename of values. | |
typedef LogicalSparseImp< ValT, LogT >::scalar_type | scalar_type |
Typename of scalar's (which may be different from value_type) | |
typedef LogicalSparse< ValT, LogT > | base_expr_type |
Typename of base-expressions. | |
Public Types inherited from Sacado::LFad::LogicalSparseImp< ValT, LogT > | |
typedef ValT | value_type |
Typename of values (e.g., double) | |
typedef ScalarType< value_type > ::type | scalar_type |
Typename of scalar's (which may be different from ValT) | |
typedef LogT | logical_type |
Logical type (i.e., type for derivative array components (e.g., bool) | |
Public Types inherited from Sacado::Fad::DynamicStorage< ValT, LogT > | |
typedef ValT | value_type |
Public Member Functions | |
~LogicalSparse () | |
Destructor. | |
Initialization methods | |
LogicalSparse () | |
Default constructor. More... | |
template<typename S > | |
LogicalSparse (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) | |
Constructor with supplied value x of type ValueT. More... | |
LogicalSparse (const int sz, const ValT &x) | |
Constructor with size sz and value x . More... | |
LogicalSparse (const int sz, const int i, const ValT &x) | |
Constructor with size sz , index i , and value x . More... | |
LogicalSparse (const LogicalSparse &x) | |
Copy constructor. | |
template<typename S > | |
LogicalSparse (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) | |
Copy constructor from any Expression object. | |
Public Member Functions inherited from Sacado::LFad::Expr< LogicalSparseImp< ValT, LogT > > | |
Expr () | |
Default constructor. | |
template<typename S > | |
Expr (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) | |
Constructor with supplied value x . More... | |
Expr (const int sz, const ValT &x) | |
Constructor with size sz and value x . More... | |
Expr (const int sz, const int i, const ValT &x) | |
Constructor with size sz , index i , and value x . More... | |
Expr (const Expr &x) | |
Copy constructor. | |
template<typename S > | |
Expr (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) | |
Copy constructor from any Expression object. | |
~Expr () | |
Destructor. | |
Public Member Functions inherited from Sacado::LFad::LogicalSparseImp< ValT, LogT > | |
LogicalSparseImp () | |
Default constructor. | |
template<typename S > | |
LogicalSparseImp (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) | |
Constructor with supplied value x . More... | |
LogicalSparseImp (const int sz, const value_type &x) | |
Constructor with size sz and value x . More... | |
LogicalSparseImp (const int sz, const int i, const value_type &x) | |
Constructor with size sz , index i , and value x . More... | |
LogicalSparseImp (const LogicalSparseImp &x) | |
Copy constructor. | |
template<typename S > | |
LogicalSparseImp (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) | |
Copy constructor from any Expression object. | |
~LogicalSparseImp () | |
Destructor. | |
void | diff (const int ith, const int n) |
Set LogicalSparseImp object as the ith independent variable. More... | |
template<typename S > | |
SACADO_ENABLE_EXPR_FUNC (bool) isEqualTo(const Expr< S > &x) const | |
Returns whether two Fad objects have the same values. | |
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. | |
Public Member Functions inherited from Sacado::Fad::DynamicStorage< ValT, LogT > | |
DynamicStorage (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) | |
Default constructor. | |
DynamicStorage (const int sz, const ValT &x, const DerivInit zero_out=InitDerivArray) | |
Constructor with size sz . More... | |
DynamicStorage (const DynamicStorage &x) | |
Copy constructor. | |
~DynamicStorage () | |
Destructor. | |
DynamicStorage & | operator= (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. More... | |
void | resizeAndZero (int sz) |
Resize the derivative array to sz. More... | |
void | expand (int sz) |
Expand derivative array to size sz. More... | |
void | zero () |
Zero out derivative array. | |
const ValT & | val () const |
Returns value. | |
ValT & | val () |
Returns value. | |
const LogT * | dx () const |
Returns derivative array. | |
LogT | dx (int i) const |
Returns derivative component i with bounds checking. | |
LogT & | fastAccessDx (int i) |
Returns derivative component i without bounds checking. | |
const LogT & | fastAccessDx (int i) const |
Returns derivative component i without bounds checking. | |
Additional Inherited Members | |
Protected Attributes inherited from Sacado::Fad::DynamicStorage< ValT, LogT > | |
ValT | val_ |
Value. | |
int | sz_ |
Derivative array size. | |
int | len_ |
Derivative array length. | |
LogT * | dx_ |
Derivative array. | |
User inteface class for computing the logical sparsity pattern of a derivative via forward-mode AD.
|
inline |
Default constructor.
Initializes value to 0 and derivative array is empty
|
inline |
Constructor with supplied value x
of type ValueT.
Initializes value to x
and derivative array is empty
|
inline |
Constructor with size sz
and value x
.
Initializes value to x
and derivative array 0 of length sz
|
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.