#include <Sacado_Tay_Taylor.hpp>
Collaboration diagram for Sacado::Tay::Taylor< T >:
Public Types | |
typedef T | value_type |
Typename of values. | |
Public Member Functions | |
Taylor () | |
Default constructor. | |
Taylor (const T &x) | |
Constructor with supplied value x . | |
Taylor (unsigned int d, const T &x) | |
Constructor with degree d and value x . | |
Taylor (unsigned int d) | |
Constructor with degree d. | |
Taylor (const Taylor &x) | |
Copy constructor. | |
~Taylor () | |
Destructor. | |
void | resize (unsigned int d, bool keep_coeffs) |
Resize polynomial to degree d. | |
void | reserve (unsigned int d) |
Reserve space for a degree d polynomial. | |
void | copyForWrite () |
Prepare polynomial for writing. | |
Assignment operators | |
Taylor< T > & | operator= (const T &val) |
Assignment operator with constant right-hand-side. | |
Taylor< T > & | operator= (const Taylor< T > &x) |
Assignment with Taylor right-hand-side. | |
Value accessor methods | |
const T & | val () const |
Returns value. | |
T & | val () |
Returns value. | |
Taylor coefficient accessor methods | |
unsigned int | degree () const |
Returns degree of polynomial. | |
bool | hasFastAccess (unsigned int d) const |
Returns true if polynomial has degree >= d. | |
const T * | coeff () const |
Returns Taylor coefficient array. | |
T * | coeff () |
Returns Taylor coefficient array. | |
T | coeff (unsigned int i) const |
Returns degree i term with bounds checking. | |
T & | fastAccessCoeff (unsigned int i) |
Returns degree i term without bounds checking. | |
T | fastAccessCoeff (unsigned int i) const |
Returns degree i term without bounds checking. | |
Unary operators | |
Taylor< T > | operator+ () const |
Unary-plus operator. | |
Taylor< T > | operator- () const |
Unary-minus operator. | |
Taylor< T > & | operator+= (const T &x) |
Addition-assignment operator with constant right-hand-side. | |
Taylor< T > & | operator-= (const T &x) |
Subtraction-assignment operator with constant right-hand-side. | |
Taylor< T > & | operator *= (const T &x) |
Multiplication-assignment operator with constant right-hand-side. | |
Taylor< T > & | operator/= (const T &x) |
Division-assignment operator with constant right-hand-side. | |
Taylor< T > & | operator+= (const Taylor< T > &x) |
Addition-assignment operator with Taylor right-hand-side. | |
Taylor< T > & | operator-= (const Taylor< T > &x) |
Subtraction-assignment operator with Taylor right-hand-side. | |
Taylor< T > & | operator *= (const Taylor< T > &x) |
Multiplication-assignment operator with Taylor right-hand-side. | |
Taylor< T > & | operator/= (const Taylor< T > &x) |
Division-assignment operator with Taylor right-hand-side. | |
Protected Member Functions | |
unsigned int | length () const |
Return length of array. | |
void | resizeCoeffs (unsigned int len) |
Resize coefficient array to new size. | |
Protected Attributes | |
Sacado::Handle< TaylorData > | th |
Uses a handle and a "copy-on-write" strategy for efficient copying, but no expression templating.
|
Constructor with supplied value Sets the first coefficient to x |
|
Constructor with degree d and value
Initializes first coeffienct to |
|
Constructor with degree d. Initializes all components to zero |
|
Prepare polynomial for writing. This method prepares the polynomial for writing through coeff() and fastAccessCoeff() member functions. It ensures the handle for the Taylor coefficients is not shared among any other Taylor polynomial objects. If the handle is not shared it does nothing, so there is no cost in calling this method in this case. If the handle is shared and this method is not called, any changes to the coefficients by coeff() or fastAccessCoeff() may change other polynomial objects. |
|
Reserve space for a degree d polynomial. Coefficients are preserved. |
|
Resize polynomial to degree d.
Coefficients are preserved if |