Sacado Package Browser (Single Doxygen Collection)  Version of the Day
Sacado_Tay_CacheTaylorExpr.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Sacado Package
5 // Copyright (2006) Sandia Corporation
6 //
7 // Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
8 // the U.S. Government retains certain rights in this software.
9 //
10 // This library is free software; you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as
12 // published by the Free Software Foundation; either version 2.1 of the
13 // License, or (at your option) any later version.
14 //
15 // This library is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 // Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public
21 // License along with this library; if not, write to the Free Software
22 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23 // USA
24 // Questions? Contact David M. Gay (dmgay@sandia.gov) or Eric T. Phipps
25 // (etphipp@sandia.gov).
26 //
27 // ***********************************************************************
28 // @HEADER
29 
30 #ifndef SACADO_TAY_CACHETAYLOREXPR_HPP
31 #define SACADO_TAY_CACHETAYLOREXPR_HPP
32 
33 #include "Sacado_Traits.hpp"
34 
35 namespace Sacado {
36 
37  namespace Tay {
38 
40 
44  template <typename ExprT>
45  class Expr {
46 
47  public:
48 
50  typedef typename ExprT::value_type value_type;
51 
53  typedef typename ExprT::scalar_type scalar_type;
54 
56  typedef typename ExprT::base_expr_type base_expr_type;
57 
59  explicit Expr(const ExprT& expr) : expr_(expr) {}
60 
62  void allocateCache(unsigned int d) const { expr_.allocateCache(d); }
63 
65  unsigned int degree() const {return expr_.degree();}
66 
68  bool hasFastAccess(unsigned int d) const {
69  return expr_.hasFastAccess(d);}
70 
72  value_type coeff(unsigned int i) const { return expr_.coeff(i);}
73 
75  value_type fastAccessCoeff(unsigned int i) const { return
76  expr_.fastAccessCoeff(i);}
77 
78  protected:
79 
81  Expr() {}
82 
84  ExprT expr_;
85 
86  }; // class Expr
87 
89 
92  template <typename ConstT>
93  class ConstExpr {
94 
95  public:
96 
98  typedef ConstT value_type;
99 
102 
104  typedef ConstT base_expr_type;
105 
107  ConstExpr(const ConstT& constant) : constant_(constant) {}
108 
110  void allocateCache(unsigned int d) const {}
111 
113  unsigned int degree() const { return 0; }
114 
116  bool hasFastAccess(unsigned int d) const { return 1; }
117 
118  value_type value() const { return constant_; }
119 
121  value_type coeff(unsigned int i) const {
122  return i==0 ? constant_ : value_type(0); }
123 
125  value_type fastAccessCoeff(unsigned int i) const {
126  return i==0 ? constant_ : value_type(0); }
127 
128  protected:
129 
131  ConstT constant_;
132 
133  }; // class ConstExpr
134 
136 
142  template <typename ExprT, template<typename> class Op>
143  class UnaryExpr {
144 
145  public:
146 
148  typedef typename ExprT::value_type value_type;
149 
151  typedef typename ExprT::scalar_type scalar_type;
152 
154  typedef typename ExprT::base_expr_type base_expr_type;
155 
157  UnaryExpr(const ExprT& expr) : expr_(expr), op_(expr) {}
158 
160  void allocateCache(unsigned int d) const {
161  expr_.allocateCache(d);
162  op_.allocateCache(d);
163  }
164 
166  unsigned int degree() const {return expr_.degree();}
167 
169  bool hasFastAccess(unsigned int d) const {
170  return expr_.hasFastAccess(d); }
171 
173  value_type coeff(unsigned int i) const {
174  return op_.computeCoeff(i,expr_); }
175 
177  value_type fastAccessCoeff(unsigned int i) const {
178  return op_.computeFastAccessCoeff(i,expr_);
179  }
180 
181  protected:
182 
184  ExprT expr_;
185 
187  Op<ExprT> op_;
188 
189  }; // class UnaryExpr
190 
192 
199  template <typename ExprT1, typename ExprT2,
200  template<typename,typename> class Op>
201  class BinaryExpr {
202 
203  public:
204 
206  typedef typename ExprT1::value_type value_type_1;
207  typedef typename ExprT2::value_type value_type_2;
208  typedef typename Sacado::Promote<value_type_1,
210 
212  typedef typename ExprT1::scalar_type scalar_type_1;
213  typedef typename ExprT2::scalar_type scalar_type_2;
214  typedef typename Sacado::Promote<scalar_type_1,
216 
218  typedef typename ExprT1::base_expr_type base_expr_type_1;
219  typedef typename ExprT2::base_expr_type base_expr_type_2;
220  typedef typename Sacado::Promote<base_expr_type_1,
222 
224  BinaryExpr(const ExprT1& expr1, const ExprT2& expr2) :
225  expr1_(expr1), expr2_(expr2), op_(expr1,expr2) {}
226 
228  void allocateCache(unsigned int d) const {
229  expr1_.allocateCache(d);
230  expr2_.allocateCache(d);
231  op_.allocateCache(d);
232  }
233 
235  unsigned int degree() const {
236  unsigned int d1 = expr1_.degree(), d2 = expr2_.degree();
237  return d1 > d2 ? d1 : d2;
238  }
239 
241  bool hasFastAccess(unsigned int d) const {
242  return expr1_.hasFastAccess(d) && expr2_.hasFastAccess(d);}
243 
245  value_type coeff(unsigned int i) const {
246  return op_.computeCoeff(i,expr1_,expr2_); }
247 
249  value_type fastAccessCoeff(unsigned int i) const {
250  return op_.computeFastAccessCoeff(i,expr1_,expr2_);
251  }
252 
253  protected:
254 
256  ExprT1 expr1_;
257 
259  ExprT2 expr2_;
260 
262  Op<ExprT1,ExprT2> op_;
263 
264  }; // class BinaryExpr
265 
267 
274  template <typename ExprT2, template<typename,typename> class Op>
275  class BinaryExpr<ConstExpr<typename ExprT2::value_type>, ExprT2, Op> {
276 
277  public:
278 
281 
283  typedef typename ExprT2::value_type value_type;
284  typedef typename ExprT2::scalar_type scalar_type;
285  typedef typename ExprT2::base_expr_type base_expr_type;
286 
288  BinaryExpr(const ExprT1& expr1, const ExprT2& expr2) :
289  expr1_(expr1), expr2_(expr2), op_(expr1,expr2) {}
290 
292  void allocateCache(unsigned int d) const {
293  expr2_.allocateCache(d);
294  op_.allocateCache(d);
295  }
296 
298  unsigned int degree() const {
299  return expr2_.degree();
300  }
301 
303  bool hasFastAccess(unsigned int d) const {
304  return expr2_.hasFastAccess(d);}
305 
307  value_type coeff(unsigned int i) const {
308  return op_.computeCoeff(i,expr1_,expr2_); }
309 
311  value_type fastAccessCoeff(unsigned int i) const {
312  return op_.computeFastAccessCoeff(i,expr1_,expr2_);
313  }
314 
315  protected:
316 
319 
321  ExprT2 expr2_;
322 
324  Op<ExprT1,ExprT2> op_;
325 
326  }; // class BinaryExpr
327 
329 
336  template <typename ExprT1, template<typename,typename> class Op>
337  class BinaryExpr<ExprT1,ConstExpr<typename ExprT1::value_type>, Op> {
338 
339  public:
340 
343 
345  typedef typename ExprT1::value_type value_type;
346  typedef typename ExprT1::scalar_type scalar_type;
347  typedef typename ExprT1::base_expr_type base_expr_type;
348 
350  BinaryExpr(const ExprT1& expr1, const ExprT2& expr2) :
351  expr1_(expr1), expr2_(expr2), op_(expr1,expr2) {}
352 
354  void allocateCache(unsigned int d) const {
355  expr1_.allocateCache(d);
356  op_.allocateCache(d);
357  }
358 
360  unsigned int degree() const {
361  return expr1_.degree();
362  }
363 
365  bool hasFastAccess(unsigned int d) const {
366  return expr1_.hasFastAccess(d);}
367 
369  value_type coeff(unsigned int i) const {
370  return op_.computeCoeff(i,expr1_,expr2_); }
371 
373  value_type fastAccessCoeff(unsigned int i) const {
374  return op_.computeFastAccessCoeff(i,expr1_,expr2_);
375  }
376 
377  protected:
378 
380  ExprT1 expr1_;
381 
384 
386  Op<ExprT1,ExprT2> op_;
387 
388  }; // class BinaryExpr
389 
390  } // namespace Tay
391 
392  template <typename T>
393  struct IsExpr< Tay::Expr<T> > {
394  static const bool value = true;
395  };
396 
397  template <typename T>
398  struct BaseExprType< Tay::Expr<T> > {
400  };
401 
402 } // namespace Sacado
403 
404 #endif // SACADO_TAY_CACHETAYLOREXPR_HPP
Sacado::Tay::UnaryExpr::scalar_type
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
Definition: Sacado_Tay_CacheTaylorExpr.hpp:151
Sacado::Tay::Expr::expr_
ExprT expr_
Expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:84
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:311
Sacado::Tay::BinaryExpr::value_type_2
ExprT2::value_type value_type_2
Definition: Sacado_Tay_CacheTaylorExpr.hpp:207
Sacado::Tay::Expr::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if expression has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:68
Sacado::Tay::BinaryExpr::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:241
Sacado::IsExpr::value
static const bool value
Definition: Sacado_Traits.hpp:78
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::ExprT1
ConstExpr< typename ExprT2::value_type > ExprT1
Typename of constant expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:280
Sacado::Tay::UnaryExpr::UnaryExpr
UnaryExpr(const ExprT &expr)
Constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:157
Sacado::Tay::ConstExpr::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:121
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::value_type
ExprT2::value_type value_type
Typename of the second argument value.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:283
Sacado::Tay::BinaryExpr::scalar_type_1
ExprT1::scalar_type scalar_type_1
Typename of the expression scalars.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:212
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::expr2_
ExprT2 expr2_
Right argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:383
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:354
Sacado::Tay::Expr::value_type
ExprT::value_type value_type
Typename of values.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:50
Sacado::Tay::ConstExpr::value
value_type value() const
Definition: Sacado_Tay_CacheTaylorExpr.hpp:118
Sacado::Tay::BinaryExpr
Binary expression template.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:201
Sacado::Tay::BinaryExpr::expr1_
ExprT1 expr1_
Left argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:256
Sacado::Tay::BinaryExpr::value_type_1
ExprT1::value_type value_type_1
Typename of the expression values.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:206
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::BinaryExpr
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:288
Sacado::Tay::ConstExpr::scalar_type
ScalarType< value_type >::type scalar_type
Typename of scalar's (which may be different from ConstT)
Definition: Sacado_Tay_CacheTaylorExpr.hpp:101
Sacado::Tay::BinaryExpr::base_expr_type_1
ExprT1::base_expr_type base_expr_type_1
Typename of the base expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:218
Sacado::Tay::BinaryExpr::op_
Op< ExprT1, ExprT2 > op_
Operator.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:262
Sacado::Tay::Expr::base_expr_type
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:56
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::op_
Op< ExprT1, ExprT2 > op_
Operator.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:324
Sacado::Tay::Expr::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:65
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::base_expr_type
ExprT1::base_expr_type base_expr_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:347
Sacado::Promote
Base template specification for Promote.
Definition: Sacado_Traits.hpp:106
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:307
Sacado::ScalarType::type
T type
Definition: Sacado_Traits.hpp:304
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:303
Sacado::Tay::ConstExpr
Constant expression template.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:93
Sacado::Tay::UnaryExpr
Unary expression template.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:143
Sacado::Tay::UnaryExpr::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:160
Sacado_Traits.hpp
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:298
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::scalar_type
ExprT1::scalar_type scalar_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:346
Sacado::Tay::Expr::Expr
Expr()
Disallow default constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:81
Sacado::Tay::ConstExpr::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:116
Sacado::Tay::ConstExpr::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:113
Sacado::Tay::ConstExpr::constant_
ConstT constant_
The constant.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:131
Sacado::Tay::BinaryExpr::expr2_
ExprT2 expr2_
Right argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:259
Sacado::Tay::BinaryExpr::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:249
Sacado::Tay::Expr::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:62
Sacado::Tay::Expr::Expr
Expr(const ExprT &expr)
Constructor with given expression expr.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:59
Sacado::BaseExprType< Tay::Expr< T > >::type
Tay::Expr< T >::base_expr_type type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:399
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::ExprT2
ConstExpr< typename ExprT1::value_type > ExprT2
Typename of constant expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:342
Sacado::Tay::BinaryExpr::BinaryExpr
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:224
Sacado::Tay::UnaryExpr::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:166
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::scalar_type
ExprT2::scalar_type scalar_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:284
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:369
Sacado::BaseExprType
Get the base Fad type from a view/expression.
Definition: Sacado_Traits.hpp:89
Sacado::Tay::BinaryExpr::scalar_type_2
ExprT2::scalar_type scalar_type_2
Definition: Sacado_Tay_CacheTaylorExpr.hpp:213
Sacado::Tay::UnaryExpr::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:169
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::BinaryExpr
BinaryExpr(const ExprT1 &expr1, const ExprT2 &expr2)
Constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:350
Sacado
Definition: Sacado_mpl_apply.hpp:39
Sacado::Tay::UnaryExpr::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:173
Sacado::Tay::Expr::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:75
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::hasFastAccess
bool hasFastAccess(unsigned int d) const
Return if operation has fast access.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:365
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::expr2_
ExprT2 expr2_
Right argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:321
Sacado::Tay::UnaryExpr::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
Return derivative component i of operation.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:177
Sacado::Tay::UnaryExpr::value_type
ExprT::value_type value_type
Typename of argument value.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:148
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
eturn degree i term of expression
Definition: Sacado_Tay_CacheTaylorExpr.hpp:373
Sacado::Tay::BinaryExpr::base_expr_type
Sacado::Promote< base_expr_type_1, base_expr_type_2 >::type base_expr_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:221
Sacado::Tay::UnaryExpr::op_
Op< ExprT > op_
Operator.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:187
Sacado::Tay::BinaryExpr::scalar_type
Sacado::Promote< scalar_type_1, scalar_type_2 >::type scalar_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:215
Sacado::Tay::Expr::scalar_type
ExprT::scalar_type scalar_type
Typename of scalar's (which may be different from value_type)
Definition: Sacado_Tay_CacheTaylorExpr.hpp:53
Sacado::Tay::BinaryExpr::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:228
Sacado::IsExpr
Is a type an expression.
Definition: Sacado_Traits.hpp:77
Sacado::Tay::BinaryExpr::value_type
Sacado::Promote< value_type_1, value_type_2 >::type value_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:209
Sacado::Tay::ConstExpr::fastAccessCoeff
value_type fastAccessCoeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:125
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::expr1_
ExprT1 expr1_
Left argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:380
Sacado::Tay::UnaryExpr::expr_
ExprT expr_
Left argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:184
Sacado::Tay::ConstExpr::value_type
ConstT value_type
Typename of argument values.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:98
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::expr1_
ExprT1 expr1_
Left argument.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:318
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:292
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::op_
Op< ExprT1, ExprT2 > op_
Operator.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:386
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::value_type
ExprT1::value_type value_type
Typename of the second argument value.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:345
Sacado::Tay::BinaryExpr::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:245
Sacado::Tay::BinaryExpr< ExprT1, ConstExpr< typename ExprT1::value_type >, Op >::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:360
Sacado::Tay::Expr::coeff
value_type coeff(unsigned int i) const
Return degree i term of expression.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:72
Sacado::Tay::Expr
Wrapper for a generic expression template.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:45
Sacado::Tay::ConstExpr::ConstExpr
ConstExpr(const ConstT &constant)
Constructor.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:107
Sacado::Tay::BinaryExpr::base_expr_type_2
ExprT2::base_expr_type base_expr_type_2
Definition: Sacado_Tay_CacheTaylorExpr.hpp:219
Sacado::Tay::ConstExpr::base_expr_type
ConstT base_expr_type
Typename of base-expressions.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:104
Sacado::Tay::BinaryExpr< ConstExpr< typename ExprT2::value_type >, ExprT2, Op >::base_expr_type
ExprT2::base_expr_type base_expr_type
Definition: Sacado_Tay_CacheTaylorExpr.hpp:285
Sacado::Tay::BinaryExpr::degree
unsigned int degree() const
Return degree of polynomial.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:235
Sacado::Tay::ConstExpr::allocateCache
void allocateCache(unsigned int d) const
Allocate coefficient cache.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:110
Sacado::Tay::UnaryExpr::base_expr_type
ExprT::base_expr_type base_expr_type
Typename of base-expressions.
Definition: Sacado_Tay_CacheTaylorExpr.hpp:154