30#ifndef SACADO_TAY_CACHETAYLOREXPR_HPP
31#define SACADO_TAY_CACHETAYLOREXPR_HPP
44 template <
typename ExprT>
69 return expr_.hasFastAccess(d);}
92 template <
typename ConstT>
113 unsigned int degree()
const {
return 0; }
142 template <
typename ExprT,
template<
typename>
class Op>
161 expr_.allocateCache(d);
162 op_.allocateCache(d);
170 return expr_.hasFastAccess(d); }
178 return op_.computeFastAccessCoeff(
i,
expr_);
199 template <
typename ExprT1,
typename ExprT2,
200 template<
typename,
typename>
class Op>
231 op_.allocateCache(d);
236 unsigned int d1 =
expr1_.degree(), d2 =
expr2_.degree();
237 return d1 > d2 ? d1 : d2;
242 return expr1_.hasFastAccess(d) &&
expr2_.hasFastAccess(d);}
274 template <
typename ExprT2,
template<
typename,
typename>
class Op>
294 op_.allocateCache(d);
304 return expr2_.hasFastAccess(d);}
336 template <
typename ExprT1,
template<
typename,
typename>
class Op>
356 op_.allocateCache(d);
366 return expr1_.hasFastAccess(d);}
392 template <
typename T>
397 template <
typename T>
unsigned int degree() const
Return degree of polynomial.
ExprT2::base_expr_type base_expr_type
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
ExprT1 expr1_
Left argument.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ConstExpr< typename ExprT2::value_type > ExprT1
Typename of constant expression.
Op< ExprT1, ExprT2 > op_
Operator.
ExprT2::scalar_type scalar_type
value_type coeff(unsigned int i) const
Return degree i term of expression.
ExprT2 expr2_
Right argument.
ExprT2::value_type value_type
Typename of the second argument value.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
Op< ExprT1, ExprT2 > op_
Operator.
value_type fastAccessCoeff(unsigned int i) const
eturn degree i term of expression
ConstExpr< typename ExprT1::value_type > ExprT2
Typename of constant expression.
ExprT1::value_type value_type
Typename of the second argument value.
value_type coeff(unsigned int i) const
Return degree i term of expression.
ExprT1::scalar_type scalar_type
ExprT1::base_expr_type base_expr_type
void allocateCache(unsigned int d) const
Allocate coefficient cache.
ExprT1 expr1_
Left argument.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
unsigned int degree() const
Return degree of polynomial.
ExprT2 expr2_
Right argument.
Binary expression template.
ExprT2::base_expr_type base_expr_type_2
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
unsigned int degree() const
Return degree of polynomial.
ExprT1::value_type value_type_1
Typename of the expression values.
ExprT1 expr1_
Left argument.
Sacado::Promote< value_type_1, value_type_2 >::type value_type
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ExprT2::value_type value_type_2
void allocateCache(unsigned int d) const
Allocate coefficient cache.
value_type coeff(unsigned int i) const
Return degree i term of expression.
Op< ExprT1, ExprT2 > op_
Operator.
ExprT2 expr2_
Right argument.
ExprT2::scalar_type scalar_type_2
Sacado::Promote< base_expr_type_1, base_expr_type_2 >::type base_expr_type
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
ExprT1::scalar_type scalar_type_1
Typename of the expression scalars.
ExprT1::base_expr_type base_expr_type_1
Typename of the base expression.
Constant expression template.
ConstT base_expr_type
Typename of base-expressions.
value_type coeff(unsigned int i) const
Return degree i term of expression.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from ConstT)
unsigned int degree() const
Return degree of polynomial.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
ConstT constant_
The constant.
ConstExpr(const ConstT &constant)
Constructor.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ConstT value_type
Typename of argument values.
Wrapper for a generic expression template.
Expr()
Disallow default constructor.
bool hasFastAccess(unsigned int d) const
Return if expression has fast access.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Expr(const ExprT &expr)
Constructor with given expression expr.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
ExprT::value_type value_type
Typename of values.
value_type coeff(unsigned int i) const
Return degree i term of expression.
unsigned int degree() const
Return degree of polynomial.
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Unary expression template.
value_type fastAccessCoeff(unsigned int i) const
Return derivative component i of operation.
ExprT expr_
Left argument.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
unsigned int degree() const
Return degree of polynomial.
value_type coeff(unsigned int i) const
Return degree i term of expression.
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
ExprT::value_type value_type
Typename of argument value.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
UnaryExpr(const ExprT &expr)
Constructor.
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Tay::Expr< T >::base_expr_type type
Get the base Fad type from a view/expression.