30 #ifndef SACADO_TAY_CACHETAYLOREXPR_HPP
31 #define SACADO_TAY_CACHETAYLOREXPR_HPP
44 template <
typename ExprT>
69 return expr_.hasFastAccess(d);}
76 expr_.fastAccessCoeff(i);}
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>
404 #endif // SACADO_TAY_CACHETAYLOREXPR_HPP
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Expr(const ExprT &expr)
Constructor with given expression expr.
Tay::Expr< T >::base_expr_type type
unsigned int degree() const
Return degree of polynomial.
Constant expression template.
Op< ExprT1, ExprT2 > op_
Operator.
unsigned int degree() const
Return degree of polynomial.
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
value_type coeff(unsigned int i) const
Return degree i term of expression.
unsigned int degree() const
Return degree of polynomial.
ExprT1::value_type value_type_1
Typename of the expression values.
value_type coeff(unsigned int i) const
Return degree i term of expression.
ExprT1::base_expr_type base_expr_type
ExprT1::base_expr_type base_expr_type_1
Typename of the base expression.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ExprT::value_type value_type
Typename of values.
Binary expression template.
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Unary expression template.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
ExprT1 expr1_
Left argument.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
UnaryExpr(const ExprT &expr)
Constructor.
ExprT1 expr1_
Left argument.
value_type fastAccessCoeff(unsigned int i) const
eturn degree i term of expression
value_type coeff(unsigned int i) const
Return degree i term of expression.
Sacado::Promote< base_expr_type_1, base_expr_type_2 >::type base_expr_type
ConstT value_type
Typename of argument values.
ExprT2 expr2_
Right argument.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
ConstT constant_
The constant.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
bool hasFastAccess(unsigned int d) const
Return if expression has fast access.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
ExprT1 expr1_
Left argument.
Get the base Fad type from a view/expression.
ExprT2::value_type value_type
Typename of the second argument value.
ConstT base_expr_type
Typename of base-expressions.
ExprT::value_type value_type
Typename of argument value.
ExprT2 expr2_
Right argument.
value_type coeff(unsigned int i) const
Return degree i term of expression.
ExprT1::value_type value_type
Typename of the second argument value.
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
ExprT2::base_expr_type base_expr_type_2
unsigned int degree() const
Return degree of polynomial.
Sacado::Promote< value_type_1, value_type_2 >::type value_type
value_type coeff(unsigned int i) const
Return degree i term of expression.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
ExprT1::scalar_type scalar_type
ConstExpr< typename ExprT2::value_type > ExprT1
Typename of constant expression.
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from ConstT)
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Op< ExprT1, ExprT2 > op_
Operator.
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
ExprT expr_
Left argument.
unsigned int degree() const
Return degree of polynomial.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Op< ExprT1, ExprT2 > op_
Operator.
ConstExpr< typename ExprT1::value_type > ExprT2
Typename of constant expression.
ExprT2::scalar_type scalar_type
unsigned int degree() const
Return degree of polynomial.
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Wrapper for a generic expression template.
ExprT2::value_type value_type_2
ExprT2::scalar_type scalar_type_2
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Expr()
Disallow default constructor.
ExprT2 expr2_
Right argument.
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
ExprT1::scalar_type scalar_type_1
Typename of the expression scalars.
value_type coeff(unsigned int i) const
Return degree i term of expression.
value_type fastAccessCoeff(unsigned int i) const
Return derivative component i of operation.
ExprT2::base_expr_type base_expr_type
ConstExpr(const ConstT &constant)
Constructor.