OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
Taylor< T > Class Template Reference

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

#include <Taylor.h>

Collaboration diagram for Taylor< T >:

Public Member Functions

 Taylor (int)
 Construct a zero series of a given order.
 Taylor ()
 Taylor (const Taylor &)
 ~Taylor ()
const Tayloroperator= (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.
Tayloroperator*= (const T &)
 Multiply by scalar and assign.
Tayloroperator/= (const T &)
 Divide by scalar and assign.
Tayloroperator+= (const Taylor &)
 Add series and assign.
Tayloroperator-= (const Taylor &)
 Subtract series and assign.
void clear ()
 Clear all coefficients.
Taylor integrate () const
 Integrate with respect to the variable.
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.

References itsCoeffs.

Referenced by integrate(), operator*=(), operator+=(), operator-(), operator-=(), operator/=(), operator=(), and Taylor().

◆ Taylor() [2/3]

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

Definition at line 40 of file Taylor.hpp.

References itsCoeffs.

◆ Taylor() [3/3]

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

Definition at line 47 of file Taylor.hpp.

References itsCoeffs, and Taylor().

Here is the call graph for this function:

◆ ~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.

References itsCoeffs.

Referenced by integrate(), operator*(), operator*(), operator+(), operator+=(), operator-(), operator-(), 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.

References itsCoeffs.

◆ 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.

References itsCoeffs.

Referenced by operator*(), operator*(), operator+(), operator+=(), operator-(), 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.

References itsCoeffs.

◆ getOrder()

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

Return order of this series.

Definition at line 192 of file Taylor.hpp.

References itsCoeffs.

Referenced by integrate(), operator*(), operator*(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator<<(), and PoissonBracket().

◆ 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 begin(), begin(), end(), getOrder(), and Taylor().

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(), end(), and Taylor().

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 begin(), begin(), end(), end(), getOrder(), and Taylor().

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 begin(), begin(), end(), getOrder(), and Taylor().

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 begin(), begin(), end(), end(), getOrder(), and Taylor().

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(), end(), and Taylor().

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 itsCoeffs, and Taylor().

Here is the call graph for this function:

◆ operator[]() [1/2]

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

Get coefficient.

Definition at line 96 of file Taylor.hpp.

References itsCoeffs.

◆ 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.

References itsCoeffs.

◆ 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 begin(), begin(), end(), end(), getOrder(), operator=(), operator[](), operator[](), Taylor(), Taylor(), and Taylor().


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