OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Public Member Functions | Private Attributes | List of all members
Taylor< T > Class Template Reference

A representation for a Taylor series in one variable,. More...

#include <Taylor.h>

Public Member Functions

 Taylor (int)
 Construct a zero series of a given order.
 
 Taylor ()
 
 Taylor (const Taylor &)
 
 ~Taylor ()
 
const Taylor & operator= (const Taylor &)
 
T * begin ()
 Get pointer to beginning of series (zero-order term).
 
const T * begin () const
 Get pointer to beginning of series (zero-order term).
 
T * end ()
 Get pointer to end of series (one beyond highest term).
 
const T * end () const
 Get pointer to end of series (one beyond highest term).
 
T & operator[] (int n)
 Get coefficient.
 
const T & operator[] (int n) const
 Get coefficient.
 
Taylor operator- () const
 Change sign of series.
 
Taylor & operator*= (const T &)
 Multiply by scalar and assign.
 
Taylor & operator/= (const T &)
 Divide by scalar and assign.
 
Taylor & operator+= (const Taylor &)
 Add series and assign.
 
Taylor & operator-= (const Taylor &)
 Subtract series and assign.
 
void clear ()
 Clear all coefficients.
 
Taylor integrate () const
 Integrate with respect to the variable.
 
T sum () const
 Return sum of series.
 
int getOrder () const
 Return order of this series.
 

Private Attributes

Array1D< T > itsCoeffs
 

Detailed Description

template<class T>
class Taylor< T >

A representation for a Taylor series in one variable,.

Definition at line 36 of file Taylor.h.

Constructor & Destructor Documentation

◆ Taylor() [1/3]

template<class T >
Taylor< T >::Taylor ( int  order)
explicit

Construct a zero series of a given order.

Definition at line 33 of file Taylor.hpp.

◆ Taylor() [2/3]

template<class T >
Taylor< T >::Taylor ( )

Definition at line 40 of file Taylor.hpp.

◆ Taylor() [3/3]

template<class T >
Taylor< T >::Taylor ( const Taylor< T > &  rhs)

Definition at line 47 of file Taylor.hpp.

◆ ~Taylor()

template<class T >
Taylor< T >::~Taylor ( )

Definition at line 54 of file Taylor.hpp.

Member Function Documentation

◆ begin() [1/2]

template<class T >
T * Taylor< T >::begin ( )
inline

Get pointer to beginning of series (zero-order term).

Definition at line 68 of file Taylor.hpp.

Referenced by Taylor< T >::integrate(), operator*(), operator*(), operator+(), Taylor< T >::operator+=(), Taylor< T >::operator-(), operator-(), Taylor< T >::operator-=(), and operator/().

◆ begin() [2/2]

template<class T >
const T * Taylor< T >::begin ( ) const
inline

Get pointer to beginning of series (zero-order term).

Definition at line 75 of file Taylor.hpp.

◆ clear()

template<class T >
void Taylor< T >::clear ( )

Clear all coefficients.

Definition at line 160 of file Taylor.hpp.

References begin(), and end().

Here is the call graph for this function:

◆ end() [1/2]

template<class T >
T * Taylor< T >::end ( )
inline

Get pointer to end of series (one beyond highest term).

Definition at line 82 of file Taylor.hpp.

Referenced by operator*(), operator*(), operator+(), Taylor< T >::operator+=(), operator-(), Taylor< T >::operator-=(), and operator/().

◆ end() [2/2]

template<class T >
const T * Taylor< T >::end ( ) const
inline

Get pointer to end of series (one beyond highest term).

Definition at line 89 of file Taylor.hpp.

◆ getOrder()

template<class T >
int Taylor< T >::getOrder ( ) const
inline

◆ integrate()

template<class T >
Taylor< T > Taylor< T >::integrate ( ) const

Integrate with respect to the variable.

Definition at line 167 of file Taylor.hpp.

References Taylor< T >::begin(), begin(), and end().

Here is the call graph for this function:

◆ operator*=()

template<class T >
Taylor< T > & Taylor< T >::operator*= ( const T &  val)

Multiply by scalar and assign.

Definition at line 116 of file Taylor.hpp.

References begin(), and end().

Here is the call graph for this function:

◆ operator+=()

template<class T >
Taylor< T > & Taylor< T >::operator+= ( const Taylor< T > &  rhs)

Add series and assign.

Definition at line 132 of file Taylor.hpp.

References Taylor< T >::begin(), begin(), Taylor< T >::end(), end(), and Taylor< T >::getOrder().

Here is the call graph for this function:

◆ operator-()

template<class T >
Taylor< T > Taylor< T >::operator- ( ) const

Change sign of series.

Definition at line 108 of file Taylor.hpp.

References Taylor< T >::begin(), begin(), and end().

Here is the call graph for this function:

◆ operator-=()

template<class T >
Taylor< T > & Taylor< T >::operator-= ( const Taylor< T > &  rhs)

Subtract series and assign.

Definition at line 146 of file Taylor.hpp.

References Taylor< T >::begin(), begin(), Taylor< T >::end(), end(), and Taylor< T >::getOrder().

Here is the call graph for this function:

◆ operator/=()

template<class T >
Taylor< T > & Taylor< T >::operator/= ( const T &  val)

Divide by scalar and assign.

Definition at line 124 of file Taylor.hpp.

References begin(), and end().

Here is the call graph for this function:

◆ operator=()

template<class T >
const Taylor< T > & Taylor< T >::operator= ( const Taylor< T > &  rhs)

Definition at line 60 of file Taylor.hpp.

References Taylor< T >::itsCoeffs.

◆ operator[]() [1/2]

template<class T >
T & Taylor< T >::operator[] ( int  n)
inline

Get coefficient.

Definition at line 96 of file Taylor.hpp.

◆ operator[]() [2/2]

template<class T >
const T & Taylor< T >::operator[] ( int  n) const
inline

Get coefficient.

Definition at line 102 of file Taylor.hpp.

◆ sum()

template<class T >
T Taylor< T >::sum ( ) const

Return sum of series.

Definition at line 185 of file Taylor.hpp.

References begin(), and end().

Here is the call graph for this function:

Member Data Documentation

◆ itsCoeffs

template<class T >
Array1D<T> Taylor< T >::itsCoeffs
private

Definition at line 108 of file Taylor.h.

Referenced by Taylor< T >::operator=().


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