Sacado Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | List of all members
Sacado::Tay::CacheTaylor< T > Class Template Reference

Forward-mode AD class using dynamic memory allocation. More...

#include <Sacado_Tay_CacheTaylor.hpp>

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

Classes

struct  apply
 Turn CacheTaylor into a meta-function class usable with mpl::apply. More...
 

Public Types

typedef T value_type
 Typename of values. More...
 
typedef ScalarType< T >::type scalar_type
 Typename of scalar's (which may be different from ValueT) More...
 
- Public Types inherited from Sacado::Tay::Expr< CacheTaylorImplementation< T > >
typedef CacheTaylor< Tbase_expr_type
 Typename of base-expressions. More...
 
- Public Types inherited from Sacado::Tay::CacheTaylorImplementation< T >
typedef T value_type
 Typename of values. More...
 
typedef ScalarType< T >::type scalar_type
 Typename of scalar's (which may be different from ValueT) More...
 

Public Member Functions

 ~CacheTaylor ()
 Destructor. More...
 
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)
 
- Public Member Functions inherited from Sacado::Tay::Expr< CacheTaylorImplementation< T > >
 Expr ()
 Default constructor. More...
 
 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. More...
 
- Public Member Functions inherited from Sacado::Tay::CacheTaylorImplementation< T >
 CacheTaylorImplementation ()
 Default constructor. More...
 
 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. More...
 
 ~CacheTaylorImplementation ()
 Destructor. More...
 
void resize (int d, bool keep_coeffs)
 Resize polynomial to degree d. More...
 
const Tval () const
 Returns value. More...
 
Tval ()
 Returns value. More...
 
int degree () const
 Returns degree of polynomial. More...
 
bool hasFastAccess (int d) const
 Returns true if polynomial has degree >= d. More...
 
const std::valarray< T > & coeff () const
 Returns Taylor coefficient array. More...
 
const T coeff (int i) const
 Returns degree i term with bounds checking. More...
 
T coeff (int i)
 Returns degree i term with bounds checking. More...
 
TfastAccessCoeff (int i)
 Returns degree i term without bounds checking. More...
 
const TfastAccessCoeff (int i) const
 Returns degree i term without bounds checking. More...
 
void allocateCache (int d) const
 Allocate coefficient cache. More...
 
template<typename S >
bool isEqualTo (const Expr< S > &x) const
 Returns whether two Taylor objects have the same values. More...
 

Initialization methods

 CacheTaylor ()
 Default constructor. More...
 
 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. More...
 
template<typename S >
 CacheTaylor (const Expr< S > &x)
 Copy constructor from any Expression object. More...
 

Assignment operators

CacheTaylor< T > & operator= (const T &v)
 Assignment operator with constant right-hand-side. More...
 
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. More...
 
template<typename S >
CacheTaylor< T > & operator= (const Expr< S > &x)
 Assignment operator with any expression right-hand-side. More...
 

Unary operators

Expr< UnaryExpr< CacheTaylor
< T >, UnaryPlusOp > > 
operator+ () const
 Unary-plus operator. More...
 
Expr< UnaryExpr< CacheTaylor
< T >, UnaryMinusOp > > 
operator- () const
 Unary-minus operator. More...
 
CacheTaylor< T > & operator+= (const T &x)
 Addition-assignment operator with constant right-hand-side. More...
 
CacheTaylor< T > & operator-= (const T &x)
 Subtraction-assignment operator with constant right-hand-side. More...
 
CacheTaylor< T > & operator*= (const T &x)
 Multiplication-assignment operator with constant right-hand-side. More...
 
CacheTaylor< T > & operator/= (const T &x)
 Division-assignment operator with constant right-hand-side. More...
 
template<typename S >
CacheTaylor< T > & operator+= (const S &x)
 Addition-assignment operator with Taylor right-hand-side. More...
 
template<typename S >
CacheTaylor< T > & operator-= (const S &x)
 Subtraction-assignment operator with Taylor right-hand-side. More...
 
template<typename S >
CacheTaylor< T > & operator*= (const S &x)
 Multiplication-assignment operator with Taylor right-hand-side. More...
 
template<typename S >
CacheTaylor< T > & operator/= (const S &x)
 Division-assignment operator with Taylor right-hand-side. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Sacado::Tay::CacheTaylorImplementation< T >
void resizeCoeffs (int dnew)
 Resize coefficient array to new size. More...
 
int coeff_size () const
 
- Protected Attributes inherited from Sacado::Tay::CacheTaylorImplementation< T >
std::valarray< Tcoeff_
 Taylor polynomial coefficients. More...
 

Detailed Description

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

Forward-mode AD class using dynamic memory allocation.

This class provides the user interface of the Taylor object. Class CacheTaylorImplementation provides the implementation.

Definition at line 50 of file Sacado_Tay_CacheTaylor.hpp.

Member Typedef Documentation

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

Typename of values.

Definition at line 233 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
typedef ScalarType<T>::type Sacado::Tay::CacheTaylor< T >::scalar_type

Typename of scalar's (which may be different from ValueT)

Definition at line 236 of file Sacado_Tay_CacheTaylor.hpp.

Constructor & Destructor Documentation

template<typename T>
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( )
inline

Default constructor.

Definition at line 250 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( const T x)
inline

Constructor with supplied value x.

Sets the first coefficient to x

Definition at line 256 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( const typename dummy< value_type, scalar_type >::type &  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.

Definition at line 263 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( 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 270 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( const CacheTaylor< T > &  x)
inline

Copy constructor.

Definition at line 274 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T >
template<typename S >
Sacado::Tay::CacheTaylor< T >::CacheTaylor ( const Expr< S > &  x)
inline

Copy constructor from any Expression object.

Definition at line 32 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
Sacado::Tay::CacheTaylor< T >::~CacheTaylor ( )
inline

Destructor.

Definition at line 282 of file Sacado_Tay_CacheTaylor.hpp.

Member Function Documentation

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator= ( const T v)
inline

Assignment operator with constant right-hand-side.

Definition at line 53 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator= ( const typename dummy< value_type, scalar_type >::type &  val)
inline

Assignment operator with constant right-hand-side.

Creates a dummy overload when value_type and scalar_type are the same type.

Definition at line 298 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator= ( const CacheTaylor< T > &  x)
inline

Assignment with CacheTaylor right-hand-side.

Definition at line 65 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator= ( const Expr< S > &  x)

Assignment operator with any expression right-hand-side.

template<typename T>
Expr< UnaryExpr< CacheTaylor<T>, UnaryPlusOp > > Sacado::Tay::CacheTaylor< T >::operator+ ( ) const
inline

Unary-plus operator.

Definition at line 317 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T>
Expr< UnaryExpr< CacheTaylor<T>, UnaryMinusOp > > Sacado::Tay::CacheTaylor< T >::operator- ( ) const
inline

Unary-minus operator.

Definition at line 324 of file Sacado_Tay_CacheTaylor.hpp.

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator+= ( const T x)
inline

Addition-assignment operator with constant right-hand-side.

Definition at line 108 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator-= ( const T x)
inline

Subtraction-assignment operator with constant right-hand-side.

Definition at line 117 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator*= ( const T x)
inline

Multiplication-assignment operator with constant right-hand-side.

Definition at line 126 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T >
Sacado::Tay::CacheTaylor< T > & Sacado::Tay::CacheTaylor< T >::operator/= ( const T x)
inline

Division-assignment operator with constant right-hand-side.

Definition at line 135 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator+= ( const S &  x)

Addition-assignment operator with Taylor right-hand-side.

template<typename T>
template<typename S >
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator-= ( const S &  x)

Subtraction-assignment operator with Taylor right-hand-side.

template<typename T>
template<typename S >
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator*= ( const S &  x)

Multiplication-assignment operator with Taylor right-hand-side.

template<typename T>
template<typename S >
CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator/= ( const S &  x)

Division-assignment operator with Taylor right-hand-side.

template<typename T>
template<typename S >
Sacado::Tay::CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator= ( const Expr< S > &  x)
inline

Definition at line 77 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
Sacado::Tay::CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator+= ( const S &  x)
inline

Definition at line 145 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
Sacado::Tay::CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator-= ( const S &  x)
inline

Definition at line 171 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
Sacado::Tay::CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator*= ( const S &  x)
inline

Definition at line 197 of file Sacado_Tay_CacheTaylorImp.hpp.

template<typename T>
template<typename S >
Sacado::Tay::CacheTaylor<T>& Sacado::Tay::CacheTaylor< T >::operator/= ( const S &  x)
inline

Definition at line 247 of file Sacado_Tay_CacheTaylorImp.hpp.


The documentation for this class was generated from the following files: