|
| | Expr () |
| | Default constructor.
|
| template<typename S> |
| | Expr (const S &x, typename Sacado::mpl::enable_if< std::is_convertible< S, value_type >, void * >::type=0) |
| | Constructor with supplied value x.
|
| | Expr (const int sz, const T &x, const DerivInit zero_out=InitDerivArray) |
| | Constructor with size sz and value x.
|
| | Expr (const int sz, const int i, const T &x) |
| | Constructor with size sz, index i, and value x.
|
| | Expr (const Expr &x) |
| | Copy constructor.
|
| template<typename S> |
| | Expr (const Expr< S > &x, typename mpl::enable_if_c< std::is_convertible< typename Expr< S >::value_type, value_type >::value &&ExprLevel< typename Expr< S >::value_type >::value==ExprLevel< value_type >::value, void * >::type=0) |
| | Copy constructor from any Expression object.
|
|
| ~Expr () |
| | Destructor.
|
| void | diff (const int ith, const int n) |
| | Set Fad object as the ith independent variable.
|
| void | resize (int sz) |
| | Resize derivative array to length sz.
|
| void | expand (int sz) |
| | Expand derivative array to size sz.
|
| void | zero () |
| | Zero out the derivative array.
|
|
void | setUpdateValue (bool update_val) |
| | Set whether this Fad object should update values.
|
|
bool | updateValue () const |
| | Return whether this Fad object has an updated value.
|
|
void | cache () const |
| | Cache values.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, bool >::type | isEqualTo (const Expr< S > &x) const |
| | Returns whether two Fad objects have the same values.
|
| const T & | val () const |
| | Returns value.
|
| T & | val () |
| | Returns value.
|
| int | size () const |
| | Returns number of derivative components.
|
|
int | availableSize () const |
| | Returns number of derivative components that can be stored without reallocation.
|
|
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.
|
| const 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.
|
|
void | computePartials (const T &bar, value_type partials[]) const |
| | Return partials w.r.t. arguments.
|
| void | getTangents (int i, value_type dots[]) const |
| | Return tangent component i of arguments.
|
|
template<int Arg> |
| bool | isActive () const |
| | Return whether argument is active.
|
| template<int Arg> |
| const T & | getTangent (int i) const |
| | Return tangent component i of argument Arg.
|
| const value_type * | getDx (int j) const |
| | Get dx array.
|
| template<typename S> |
| Sacado::mpl::enable_if< std::is_convertible< S, value_type >, Expr & >::type | operator= (const S &v) |
| | Assignment operator with constant right-hand-side.
|
| Expr & | operator= (const Expr &x) |
| | Assignment with Expr right-hand-side.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, Expr & >::type | operator= (const Expr< S > &x) |
| | Assignment operator with any expression right-hand-side.
|
|
| T | dx_ [Num] |
| | Derivatives.
|
| T | val_ |
| | Value.
|
| template<typename S> |
| Sacado::mpl::enable_if< std::is_convertible< S, value_type >, Expr & >::type | operator+= (const S &v) |
| | Addition-assignment operator with constant right-hand-side.
|
| template<typename S> |
| Sacado::mpl::enable_if< std::is_convertible< S, value_type >, Expr & >::type | operator-= (const S &v) |
| | Subtraction-assignment operator with constant right-hand-side.
|
| template<typename S> |
| Sacado::mpl::enable_if< std::is_convertible< S, value_type >, Expr & >::type | operator*= (const S &v) |
| | Multiplication-assignment operator with constant right-hand-side.
|
| template<typename S> |
| Sacado::mpl::enable_if< std::is_convertible< S, value_type >, Expr & >::type | operator/= (const S &v) |
| | Division-assignment operator with constant right-hand-side.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, Expr & >::type | operator+= (const Expr< S > &x) |
| | Addition-assignment operator with Expr right-hand-side.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, Expr & >::type | operator-= (const Expr< S > &x) |
| | Subtraction-assignment operator with Expr right-hand-side.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, Expr & >::type | operator*= (const Expr< S > &x) |
| | Multiplication-assignment operator with Expr right-hand-side.
|
| template<typename S> |
| mpl::enable_if_c< std::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, Expr & >::type | operator/= (const Expr< S > &x) |
| | Division-assignment operator with Expr right-hand-side.
|
template<typename T, int Num>
class Sacado::ELRFad::Expr< SFadExprTag< T, Num > >
Expression template forward-mode AD class with static memory allocation.
This classes specializes Expr to SFad expressions.
template<typename T, int Num>
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.
References dx_, val_, and Sacado::ss_array< T, isScalar >::zero().