10 #ifndef SACADO_TAY_CACHETAYLOREXPR_HPP
11 #define SACADO_TAY_CACHETAYLOREXPR_HPP
24 template <
typename ExprT>
49 return expr_.hasFastAccess(d);}
56 expr_.fastAccessCoeff(i);}
72 template <
typename ConstT>
93 unsigned int degree()
const {
return 0; }
122 template <
typename ExprT,
template<
typename>
class Op>
141 expr_.allocateCache(d);
142 op_.allocateCache(d);
150 return expr_.hasFastAccess(d); }
158 return op_.computeFastAccessCoeff(i,
expr_);
179 template <
typename ExprT1,
typename ExprT2,
180 template<
typename,
typename>
class Op>
211 op_.allocateCache(d);
216 unsigned int d1 =
expr1_.degree(), d2 =
expr2_.degree();
217 return d1 > d2 ? d1 : d2;
222 return expr1_.hasFastAccess(d) &&
expr2_.hasFastAccess(d);}
254 template <
typename ExprT2,
template<
typename,
typename>
class Op>
274 op_.allocateCache(d);
284 return expr2_.hasFastAccess(d);}
316 template <
typename ExprT1,
template<
typename,
typename>
class Op>
336 op_.allocateCache(d);
346 return expr1_.hasFastAccess(d);}
372 template <
typename T>
377 template <
typename T>
384 #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.