Sacado Development
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Sacado::CacheFad::Expr< GeneralFad< T, Storage > > Class Template Reference

GeneralFad expression template specialization. More...

#include <Sacado_CacheFad_GeneralFadExpr.hpp>

Inheritance diagram for Sacado::CacheFad::Expr< GeneralFad< T, Storage > >:
Inheritance graph
[legend]
Collaboration diagram for Sacado::CacheFad::Expr< GeneralFad< T, Storage > >:
Collaboration graph
[legend]

Public Types

typedef GeneralFad< T, Storage >::value_type value_type
 Typename of values.
 
typedef GeneralFad< T, Storage >::scalar_type scalar_type
 Typename of scalar's (which may be different from value_type)
 
typedef BaseExpr< GeneralFad< T, Storage > >::type base_expr_type
 Typename of base-expressions.
 
- Public Types inherited from Sacado::CacheFad::GeneralFad< T, Storage >
typedef RemoveConst< T >::type value_type
 Typename of values.
 
typedef ScalarType< value_type >::type scalar_type
 Typename of scalar's (which may be different from T)
 

Public Member Functions

 Expr ()
 Default constructor.
 
template<typename S >
 Expr (const S &x, typename Sacado::mpl::enable_if< Sacado::mpl::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 Storage &s)
 Constructor with supplied storage s.
 
 Expr (const Expr &x)
 Copy constructor.
 
template<typename S >
 Expr (const Expr< S > &x, typename mpl::enable_if_c< mpl::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.
 
- Public Member Functions inherited from Sacado::CacheFad::GeneralFad< T, Storage >
 GeneralFad ()
 Default constructor.
 
template<typename S >
 GeneralFad (const S &x, typename Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, void * >::type=0)
 Constructor with supplied value x.
 
 GeneralFad (const int sz, const T &x, const DerivInit zero_out=InitDerivArray)
 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 Storage &s)
 Constructor with supplied storage s.
 
 GeneralFad (const GeneralFad &x)
 Copy constructor.
 
template<typename S >
 GeneralFad (const Expr< S > &x, typename mpl::enable_if_c< mpl::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.
 
 ~GeneralFad ()
 Destructor.
 
void diff (const int ith, const int n)
 Set GeneralFad object as the ith independent variable.
 
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< mpl::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.
 
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.
 
template<typename S >
Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, GeneralFad & >::type operator= (const S &v)
 Assignment operator with constant right-hand-side.
 
GeneralFadoperator= (const GeneralFad &x)
 Assignment with Expr right-hand-side.
 
template<typename S >
mpl::enable_if_c< mpl::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, GeneralFad & >::type operator= (const Expr< S > &x)
 Assignment operator with any expression right-hand-side.
 
template<typename S >
Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, GeneralFad & >::type operator+= (const S &v)
 Addition-assignment operator with constant right-hand-side.
 
template<typename S >
Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, GeneralFad & >::type operator-= (const S &v)
 Subtraction-assignment operator with constant right-hand-side.
 
template<typename S >
Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, GeneralFad & >::type operator*= (const S &v)
 Multiplication-assignment operator with constant right-hand-side.
 
template<typename S >
Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, GeneralFad & >::type operator/= (const S &v)
 Division-assignment operator with constant right-hand-side.
 
GeneralFadoperator+= (const GeneralFad &x)
 Addition-assignment operator with GeneralFad right-hand-side.
 
GeneralFadoperator-= (const GeneralFad &x)
 Subtraction-assignment operator with GeneralFad right-hand-side.
 
GeneralFadoperator*= (const GeneralFad &x)
 Multiplication-assignment operator with GeneralFad right-hand-side.
 
GeneralFadoperator/= (const GeneralFad &x)
 Division-assignment operator with GeneralFad right-hand-side.
 
template<typename S >
mpl::enable_if_c< mpl::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, GeneralFad & >::type operator+= (const Expr< S > &x)
 Addition-assignment operator with Expr right-hand-side.
 
template<typename S >
mpl::enable_if_c< mpl::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, GeneralFad & >::type operator-= (const Expr< S > &x)
 Subtraction-assignment operator with Expr right-hand-side.
 
template<typename S >
mpl::enable_if_c< mpl::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, GeneralFad & >::type operator*= (const Expr< S > &x)
 Multiplication-assignment operator with Expr right-hand-side.
 
template<typename S >
mpl::enable_if_c< mpl::is_convertible< typenameExpr< S >::value_type, value_type >::value &&ExprLevel< typenameExpr< S >::value_type >::value==ExprLevel< value_type >::value, GeneralFad & >::type operator/= (const Expr< S > &x)
 Division-assignment operator with Expr right-hand-side.
 

Detailed Description

template<typename T, typename Storage>
class Sacado::CacheFad::Expr< GeneralFad< T, Storage > >

GeneralFad expression template specialization.

This template class represents a simple GeneralFad expression and mixes-in the GeneralFad interface and the expression template interface using the caching expression templates.

Constructor & Destructor Documentation

◆ Expr() [1/3]

template<typename T , typename Storage >
template<typename S >
Sacado::CacheFad::Expr< GeneralFad< T, Storage > >::Expr ( const S &  x,
typename Sacado::mpl::enable_if< Sacado::mpl::is_convertible< S, value_type >, void * >::type  = 0 
)
inline

Constructor with supplied value x.

Initializes value to x and derivative array is empty

◆ Expr() [2/3]

template<typename T , typename Storage >
Sacado::CacheFad::Expr< GeneralFad< T, Storage > >::Expr ( const int  sz,
const T &  x,
const DerivInit  zero_out = InitDerivArray 
)
inline

Constructor with size sz and value x.

Initializes value to x and derivative array 0 of length sz

◆ Expr() [3/3]

template<typename T , typename Storage >
Sacado::CacheFad::Expr< GeneralFad< T, Storage > >::Expr ( 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.


The documentation for this class was generated from the following file: