Sacado
Development
|
Forward-mode AD class using dynamic memory allocation. More...
#include <Sacado_Tay_CacheTaylor.hpp>
Classes | |
struct | apply |
Turn CacheTaylor into a meta-function class usable with mpl::apply. More... | |
Public Types | |
typedef T | value_type |
Typename of values. | |
typedef ScalarType< T >::type | scalar_type |
Typename of scalar's (which may be different from ValueT) | |
Public Types inherited from Sacado::Tay::Expr< CacheTaylorImplementation< T > > | |
typedef CacheTaylor< T > | base_expr_type |
Typename of base-expressions. | |
Public Types inherited from Sacado::Tay::CacheTaylorImplementation< T > | |
typedef T | value_type |
Typename of values. | |
typedef ScalarType< T >::type | scalar_type |
Typename of scalar's (which may be different from ValueT) | |
Public Member Functions | |
~CacheTaylor () | |
Destructor. | |
template<typename S > | |
Sacado::Tay::CacheTaylor< T > & | operator= (const Expr< S > &x) |
template<typename S > | |
Sacado::Tay::CacheTaylor< T > & | operator+= (const S &x) |
template<typename S > | |
Sacado::Tay::CacheTaylor< T > & | operator-= (const S &x) |
template<typename S > | |
Sacado::Tay::CacheTaylor< T > & | operator*= (const S &x) |
template<typename S > | |
Sacado::Tay::CacheTaylor< T > & | operator/= (const S &x) |
Initialization methods | |
CacheTaylor () | |
Default constructor. | |
CacheTaylor (const T &x) | |
Constructor with supplied value x . More... | |
CacheTaylor (const typename dummy< value_type, scalar_type >::type &x) | |
Constructor with supplied value x . More... | |
CacheTaylor (int d, const T &x) | |
Constructor with degree d and value x . More... | |
CacheTaylor (const CacheTaylor &x) | |
Copy constructor. | |
template<typename S > | |
CacheTaylor (const Expr< S > &x) | |
Copy constructor from any Expression object. | |
Assignment operators | |
CacheTaylor< T > & | operator= (const T &v) |
Assignment operator with constant right-hand-side. | |
CacheTaylor< T > & | operator= (const typename dummy< value_type, scalar_type >::type &val) |
Assignment operator with constant right-hand-side. More... | |
CacheTaylor< T > & | operator= (const CacheTaylor< T > &x) |
Assignment with CacheTaylor right-hand-side. | |
template<typename S > | |
CacheTaylor< T > & | operator= (const Expr< S > &x) |
Assignment operator with any expression right-hand-side. | |
Unary operators | |
Expr< UnaryExpr< CacheTaylor < T >, UnaryPlusOp > > | operator+ () const |
Unary-plus operator. | |
Expr< UnaryExpr< CacheTaylor < T >, UnaryMinusOp > > | operator- () const |
Unary-minus operator. | |
CacheTaylor< T > & | operator+= (const T &x) |
Addition-assignment operator with constant right-hand-side. | |
CacheTaylor< T > & | operator-= (const T &x) |
Subtraction-assignment operator with constant right-hand-side. | |
CacheTaylor< T > & | operator*= (const T &x) |
Multiplication-assignment operator with constant right-hand-side. | |
CacheTaylor< T > & | operator/= (const T &x) |
Division-assignment operator with constant right-hand-side. | |
template<typename S > | |
CacheTaylor< T > & | operator+= (const S &x) |
Addition-assignment operator with Taylor right-hand-side. | |
template<typename S > | |
CacheTaylor< T > & | operator-= (const S &x) |
Subtraction-assignment operator with Taylor right-hand-side. | |
template<typename S > | |
CacheTaylor< T > & | operator*= (const S &x) |
Multiplication-assignment operator with Taylor right-hand-side. | |
template<typename S > | |
CacheTaylor< T > & | operator/= (const S &x) |
Division-assignment operator with Taylor right-hand-side. | |
Public Member Functions inherited from Sacado::Tay::Expr< CacheTaylorImplementation< T > > | |
Expr () | |
Default constructor. | |
Expr (const T &x) | |
Constructor with supplied value x . More... | |
Expr (int d, const T &x) | |
Constructor with degree d and value x . More... | |
Expr (const Expr &x) | |
Copy constructor. | |
Public Member Functions inherited from Sacado::Tay::CacheTaylorImplementation< T > | |
CacheTaylorImplementation () | |
Default constructor. | |
CacheTaylorImplementation (const T &x) | |
Constructor with supplied value x . More... | |
CacheTaylorImplementation (int d, const T &x) | |
Constructor with degree d and value x . More... | |
CacheTaylorImplementation (const CacheTaylorImplementation &x) | |
Copy constructor. | |
~CacheTaylorImplementation () | |
Destructor. | |
void | resize (int d, bool keep_coeffs) |
Resize polynomial to degree d. More... | |
const T & | val () const |
Returns value. | |
T & | val () |
Returns value. | |
int | degree () const |
Returns degree of polynomial. | |
bool | hasFastAccess (int d) const |
Returns true if polynomial has degree >= d. | |
const std::valarray< T > & | coeff () const |
Returns Taylor coefficient array. | |
const T | coeff (int i) const |
Returns degree i term with bounds checking. | |
T | coeff (int i) |
Returns degree i term with bounds checking. | |
T & | fastAccessCoeff (int i) |
Returns degree i term without bounds checking. | |
const T & | fastAccessCoeff (int i) const |
Returns degree i term without bounds checking. | |
void | allocateCache (int d) const |
Allocate coefficient cache. | |
template<typename S > | |
bool | isEqualTo (const Expr< S > &x) const |
Returns whether two Taylor objects have the same values. | |
Additional Inherited Members | |
Protected Member Functions inherited from Sacado::Tay::CacheTaylorImplementation< T > | |
void | resizeCoeffs (int dnew) |
Resize coefficient array to new size. | |
int | coeff_size () const |
Protected Attributes inherited from Sacado::Tay::CacheTaylorImplementation< T > | |
std::valarray< T > | coeff_ |
Taylor polynomial coefficients. | |
Forward-mode AD class using dynamic memory allocation.
This class provides the user interface of the Taylor object. Class CacheTaylorImplementation provides the implementation.
|
inline |
Constructor with supplied value x
.
Sets the first coefficient to x
|
inline |
Constructor with supplied value x
.
Sets the first coefficient to x. Creates a dummy overload when ValueT and ScalarT are the same type.
|
inline |
Constructor with degree d and value x
.
Initializes first coeffienct to x
and of a polynomial of degree d
|
inline |
Assignment operator with constant right-hand-side.
Creates a dummy overload when value_type and scalar_type are the same type.
References Sacado::Tay::CacheTaylor< T >::operator=().