Sacado Package Browser (Single Doxygen Collection) Version of the Day
Public Types | Public Member Functions | Static Public Attributes
Sacado::ELRFad::Expr< GeneralFad< T, Storage > > Class Template Reference

GeneralFad expression template specialization. More...

#include <Sacado_ELRFad_GeneralFadExpr.hpp>

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

List of all members.

Public Types

typedef T value_type
 Typename of values.
typedef GeneralFad< T, Storage > base_expr_type
 Typename of base-expressions.

Public Member Functions

 Expr ()
 Default constructor.
 Expr (const T &x)
 Constructor with supplied value x.
 Expr (const int sz, const T &x)
 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)
 Copy constructor from any Expression object.
 ~Expr ()
 Destructor.
void computePartials (const T &bar, T partials[]) const
 Return partials w.r.t. arguments.
void getTangents (int i, T dots[]) const
 Return tangent component i of arguments.
template<int Arg>
bool isActive () const
 Return whether argument is active.
bool isActive2 (int j) const
 Return whether argument is active.
bool isLinear () const
 Return whether expression is linear.
template<int Arg>
const T & getTangent (int i) const
 Return tangent component i of argument Arg.
const T * getDx (int j) const
 Get dx array.
const base_expr_typegetArg (int j) const
int numActiveArgs () const
void computeActivePartials (const T &bar, T *partials) const
 Return partials w.r.t. arguments.

Static Public Attributes

static const int num_args = 1
 Number of arguments.
static const bool is_linear = true
 Is expression linear.

Detailed Description

template<typename T, typename Storage>
class Sacado::ELRFad::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.

Definition at line 48 of file Sacado_ELRFad_GeneralFadExpr.hpp.


Member Typedef Documentation

template<typename T , typename Storage >
typedef T Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::value_type

Typename of values.

Reimplemented from Sacado::ELRFad::GeneralFad< T, Storage >.

Definition at line 53 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
typedef GeneralFad<T,Storage> Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::base_expr_type

Typename of base-expressions.

Definition at line 56 of file Sacado_ELRFad_GeneralFadExpr.hpp.


Constructor & Destructor Documentation

template<typename T , typename Storage >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::Expr ( ) [inline]

Default constructor.

Definition at line 65 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::Expr ( const T &  x) [inline]

Constructor with supplied value x.

Initializes value to x and derivative array is empty

Definition at line 72 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::Expr ( const int  sz,
const T &  x 
) [inline]

Constructor with size sz and value x.

Initializes value to x and derivative array 0 of length sz

Definition at line 79 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
Sacado::ELRFad::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.

Definition at line 88 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::Expr ( const Expr< GeneralFad< T, Storage > > &  x) [inline]

Copy constructor.

Definition at line 92 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
template<typename S >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::Expr ( const Expr< S > &  x) [inline]

Copy constructor from any Expression object.

Definition at line 96 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::~Expr ( ) [inline]

Destructor.

Definition at line 100 of file Sacado_ELRFad_GeneralFadExpr.hpp.


Member Function Documentation

template<typename T , typename Storage >
void Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::computePartials ( const T &  bar,
partials[] 
) const [inline]

Return partials w.r.t. arguments.

Definition at line 103 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
void Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::getTangents ( int  i,
dots[] 
) const [inline]

Return tangent component i of arguments.

Definition at line 108 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
template<int Arg>
bool Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::isActive ( ) const [inline]

Return whether argument is active.

Definition at line 117 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
bool Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::isActive2 ( int  j) const [inline]

Return whether argument is active.

Definition at line 120 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
bool Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::isLinear ( ) const [inline]

Return whether expression is linear.

Definition at line 123 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
template<int Arg>
const T& Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::getTangent ( int  i) const [inline]

Return tangent component i of argument Arg.

Definition at line 127 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
const T* Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::getDx ( int  j) const [inline]

Get dx array.

Definition at line 130 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
const base_expr_type& Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::getArg ( int  j) const [inline]

Definition at line 132 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
int Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::numActiveArgs ( ) const [inline]

Definition at line 134 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
void Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::computeActivePartials ( const T &  bar,
T *  partials 
) const [inline]

Return partials w.r.t. arguments.

Definition at line 139 of file Sacado_ELRFad_GeneralFadExpr.hpp.


Member Data Documentation

template<typename T , typename Storage >
const int Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::num_args = 1 [static]

Number of arguments.

Definition at line 59 of file Sacado_ELRFad_GeneralFadExpr.hpp.

template<typename T , typename Storage >
const bool Sacado::ELRFad::Expr< GeneralFad< T, Storage > >::is_linear = true [static]

Is expression linear.

Definition at line 62 of file Sacado_ELRFad_GeneralFadExpr.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines