Sacado Development
Loading...
Searching...
No Matches
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op > Class Template Reference

Binary expression template with second argument constant. More...

#include <Sacado_Tay_CacheTaylorExpr.hpp>

Inheritance diagram for Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >:
Collaboration diagram for Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >:

Public Types

typedef ConstExpr< typename ExprT1::value_type > ExprT2
 Typename of constant expression.
typedef ExprT1::value_type value_type
 Typename of the second argument value.
typedef ExprT1::scalar_type scalar_type
typedef ExprT1::base_expr_type base_expr_type
typedef ExprT1::value_type value_type_1
 Typename of the expression values.
typedef ConstExpr< typename ExprT1::value_type >::value_type value_type_2
typedef ExprT1::scalar_type scalar_type_1
 Typename of the expression scalars.
typedef ConstExpr< typename ExprT1::value_type >::scalar_type scalar_type_2
typedef ExprT1::base_expr_type base_expr_type_1
 Typename of the base expression.
typedef ConstExpr< typename ExprT1::value_type >::base_expr_type base_expr_type_2

Public Member Functions

 BinaryExpr (const ExprT1 &expr1, const ExprT2 &expr2)
 Constructor.
void allocateCache (unsigned int d) const
 Allocate coefficient cache.
unsigned int degree () const
 Return degree of polynomial.
bool hasFastAccess (unsigned int d) const
 Return if operation has fast access.
value_type coeff (unsigned int i) const
 Return degree i term of expression.
value_type fastAccessCoeff (unsigned int i) const
 eturn degree i term of expression

Protected Attributes

ExprT1 expr1_
 Left argument.
ExprT2 expr2_
 Right argument.
Op< ExprT1, ExprT2op_
 Operator.

Detailed Description

template<typename ExprT1, template< typename, typename > class Op>
class Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >

Binary expression template with second argument constant.

This template class represents a binary operation of the form op(a1,a2) where a1 is the left argument of type ExprT1, r is the right argument of type ExprT2, and op is the operation represented by type Op. The operation is evaluated by the static methods Op::computeValue() and Op::computeDx().

Constructor & Destructor Documentation

◆ BinaryExpr()

template<typename ExprT1, template< typename, typename > class Op>
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::BinaryExpr ( const ExprT1 & expr1,
const ExprT2 & expr2 )
inline

Constructor.

References expr1_, expr2_, and op_.

Member Function Documentation

◆ allocateCache()

template<typename ExprT1, template< typename, typename > class Op>
void Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::allocateCache ( unsigned int d) const
inline

Allocate coefficient cache.

References expr1_, and op_.

◆ coeff()

template<typename ExprT1, template< typename, typename > class Op>
value_type Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::coeff ( unsigned int i) const
inline

Return degree i term of expression.

References expr1_, expr2_, and op_.

◆ degree()

template<typename ExprT1, template< typename, typename > class Op>
unsigned int Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::degree ( ) const
inline

Return degree of polynomial.

References expr1_.

◆ fastAccessCoeff()

template<typename ExprT1, template< typename, typename > class Op>
value_type Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::fastAccessCoeff ( unsigned int i) const
inline

eturn degree i term of expression

References expr1_, expr2_, and op_.

◆ hasFastAccess()

template<typename ExprT1, template< typename, typename > class Op>
bool Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::hasFastAccess ( unsigned int d) const
inline

Return if operation has fast access.

References expr1_.

Member Data Documentation

◆ expr1_

template<typename ExprT1, template< typename, typename > class Op>
ExprT1 Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::expr1_
protected

◆ expr2_

template<typename ExprT1, template< typename, typename > class Op>
ExprT2 Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::expr2_
protected

Right argument.

Referenced by BinaryExpr(), coeff(), and fastAccessCoeff().

◆ op_

template<typename ExprT1, template< typename, typename > class Op>
Op<ExprT1,ExprT2> Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::op_
protected

Operator.

Referenced by allocateCache(), BinaryExpr(), coeff(), and fastAccessCoeff().


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