Sacado Package Browser (Single Doxygen Collection) Version of the Day
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
Sacado::Tay::CacheTaylorImplementation< T > Class Template Reference

Taylor polynomial class using caching expression templates. More...

#include <Sacado_Tay_CacheTaylor.hpp>

Inheritance diagram for Sacado::Tay::CacheTaylorImplementation< T >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef T value_type
 Typename of values.

Public Member Functions

 CacheTaylorImplementation ()
 Default constructor.
 CacheTaylorImplementation (const T &x)
 Constructor with supplied value x.
 CacheTaylorImplementation (unsigned int d, const T &x)
 Constructor with degree d and value x.
 CacheTaylorImplementation (const CacheTaylorImplementation &x)
 Copy constructor.
 ~CacheTaylorImplementation ()
 Destructor.

Protected Member Functions

void resizeCoeffs (unsigned int dnew)
 Resize coefficient array to new size.

Protected Attributes

std::valarray< T > coeff_
 Taylor polynomial coefficients.

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 std::valarray< T > & coeff () const
 Returns Taylor coefficient array.
const T coeff (unsigned int i) const
 Returns degree i term with bounds checking.
coeff (unsigned int i)
 Returns degree i term with bounds checking.
T & fastAccessCoeff (unsigned int i)
 Returns degree i term without bounds checking.
fastAccessCoeff (unsigned int i) const
 Returns degree i term without bounds checking.
void allocateCache (unsigned int d) const
 Allocate coefficient cache.

Detailed Description

template<typename T>
class Sacado::Tay::CacheTaylorImplementation< T >

Taylor polynomial class using caching expression templates.

This class provides the implementation of the Taylor object required for expression templating. Class CacheTaylor provides the complete user inteface.

Definition at line 58 of file Sacado_Tay_CacheTaylor.hpp.


Member Typedef Documentation

template<typename T>
typedef T Sacado::Tay::CacheTaylorImplementation< T >::value_type

Typename of values.

Definition at line 63 of file Sacado_Tay_CacheTaylor.hpp.


Constructor & Destructor Documentation

template<typename T>
Sacado::Tay::CacheTaylorImplementation< T >::CacheTaylorImplementation ( ) [inline]

Default constructor.

Definition at line 66 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylorImplementation< T >::CacheTaylorImplementation ( const T &  x) [inline]

Constructor with supplied value x.

Sets the first coefficient to x

Definition at line 72 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylorImplementation< T >::CacheTaylorImplementation ( unsigned int  d,
const T &  x 
) [inline]

Constructor with degree d and value x.

Initializes first coeffienct to x and of a polynomial of degree d

Definition at line 78 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylorImplementation< T >::CacheTaylorImplementation ( const CacheTaylorImplementation< T > &  x) [inline]

Copy constructor.

Definition at line 84 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylorImplementation< T >::~CacheTaylorImplementation ( ) [inline]

Destructor.

Definition at line 88 of file Sacado_Tay_CacheTaylor.hpp.


Member Function Documentation

template<typename T>
const T& Sacado::Tay::CacheTaylorImplementation< T >::val ( ) const [inline]

Returns value.

Definition at line 96 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
T& Sacado::Tay::CacheTaylorImplementation< T >::val ( ) [inline]

Returns value.

Definition at line 99 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
unsigned int Sacado::Tay::CacheTaylorImplementation< T >::degree ( ) const [inline]

Returns degree of polynomial.

Definition at line 109 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
bool Sacado::Tay::CacheTaylorImplementation< T >::hasFastAccess ( unsigned int  d) const [inline]

Returns true if polynomial has degree >= d.

Definition at line 112 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
const std::valarray<T>& Sacado::Tay::CacheTaylorImplementation< T >::coeff ( ) const [inline]

Returns Taylor coefficient array.

Definition at line 115 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
const T Sacado::Tay::CacheTaylorImplementation< T >::coeff ( unsigned int  i) const [inline]

Returns degree i term with bounds checking.

Definition at line 118 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
T Sacado::Tay::CacheTaylorImplementation< T >::coeff ( unsigned int  i) [inline]

Returns degree i term with bounds checking.

Definition at line 122 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
T& Sacado::Tay::CacheTaylorImplementation< T >::fastAccessCoeff ( unsigned int  i) [inline]

Returns degree i term without bounds checking.

Definition at line 126 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
T Sacado::Tay::CacheTaylorImplementation< T >::fastAccessCoeff ( unsigned int  i) const [inline]

Returns degree i term without bounds checking.

Definition at line 129 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
void Sacado::Tay::CacheTaylorImplementation< T >::allocateCache ( unsigned int  d) const [inline]

Allocate coefficient cache.

Definition at line 132 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
void Sacado::Tay::CacheTaylorImplementation< T >::resizeCoeffs ( unsigned int  dnew) [inline, protected]

Resize coefficient array to new size.

Definition at line 139 of file Sacado_Tay_CacheTaylor.hpp.


Member Data Documentation

template<typename T>
std::valarray<T> Sacado::Tay::CacheTaylorImplementation< T >::coeff_ [protected]

Taylor polynomial coefficients.

Definition at line 149 of file Sacado_Tay_CacheTaylor.hpp.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines