Sacado
Development
|
Forward-mode AD class using dynamic memory allocation and expression templates. More...
#include <Sacado_Fad_DFad_tmpl.hpp>
Classes | |
struct | apply |
Turn DFad into a meta-function class usable with mpl::apply. More... | |
struct | apply_N |
Replace static derivative length. More... | |
Public Types | |
typedef Fad::DynamicStorage < ValueT > | StorageType |
Base classes. | |
typedef GeneralFad< ValueT, StorageType > | GeneralFadType |
typedef Expr< GeneralFadType > | 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) | |
typedef ScalarType< ValueT >::type | ScalarT |
Typename of scalar's (which may be different from ValueT) | |
Public Member Functions | |
SACADO_INLINE_FUNCTION | ~DFad () |
Destructor. | |
Initialization methods | |
SACADO_INLINE_FUNCTION | DFad () |
Default constructor. More... | |
template<typename S > | |
SACADO_INLINE_FUNCTION | DFad (const S &x, SACADO_ENABLE_VALUE_CTOR_DECL) |
Constructor with supplied value x convertible to ValueT. More... | |
SACADO_INLINE_FUNCTION | DFad (const int sz, const ValueT &x, const DerivInit zero_out=InitDerivArray) |
Constructor with size sz and value x . More... | |
SACADO_INLINE_FUNCTION | DFad (const int sz, const int i, const ValueT &x) |
Constructor with size sz , index i , and value x . More... | |
SACADO_INLINE_FUNCTION | DFad (const DFad &x) |
Copy constructor. | |
template<typename S > | |
SACADO_INLINE_FUNCTION | DFad (const Expr< S > &x, SACADO_ENABLE_EXPR_CTOR_DECL) |
Copy constructor from any Expression object. | |
Forward-mode AD class using dynamic memory allocation and expression templates.
This is the user-level class for forward mode AD with dynamic memory allocation, and is appropriate for whenever the number of derivative components is not known at compile time. The user interface is provided by Sacado::FAD_NS::GeneralFad.
|
inline |
Default constructor.
Initializes value to 0 and derivative array is empty
|
inline |
Constructor with supplied value x
convertible to ValueT.
Initializes value to ValueT(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.