OPAL (Object Oriented Parallel Accelerator Library)  2024.1
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. More...
 
 Taylor ()
 
 Taylor (const Taylor &)
 
 ~Taylor ()
 
const Tayloroperator= (const Taylor &)
 
T * begin ()
 Get pointer to beginning of series (zero-order term). More...
 
const T * begin () const
 Get pointer to beginning of series (zero-order term). More...
 
T * end ()
 Get pointer to end of series (one beyond highest term). More...
 
const T * end () const
 Get pointer to end of series (one beyond highest term). More...
 
T & operator[] (int n)
 Get coefficient. More...
 
const T & operator[] (int n) const
 Get coefficient. More...
 
Taylor operator- () const
 Change sign of series. More...
 
Tayloroperator*= (const T &)
 Multiply by scalar and assign. More...
 
Tayloroperator/= (const T &)
 Divide by scalar and assign. More...
 
Tayloroperator+= (const Taylor &)
 Add series and assign. More...
 
Tayloroperator-= (const Taylor &)
 Subtract series and assign. More...
 
void clear ()
 Clear all coefficients. More...
 
Taylor integrate () const
 Integrate with respect to the variable. More...
 
sum () const
 Return sum of series. More...
 
int getOrder () const
 Return order of this series. More...
 

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

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

Construct a zero series of a given order.

Definition at line 34 of file Taylor.hpp.

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

Definition at line 41 of file Taylor.hpp.

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

Definition at line 48 of file Taylor.hpp.

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

Definition at line 55 of file Taylor.hpp.

Member Function Documentation

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

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

Definition at line 69 of file Taylor.hpp.

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

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

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

Definition at line 76 of file Taylor.hpp.

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

Clear all coefficients.

Definition at line 161 of file Taylor.hpp.

References begin, and end.

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

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

Definition at line 83 of file Taylor.hpp.

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

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

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

Definition at line 90 of file Taylor.hpp.

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

Return order of this series.

Definition at line 193 of file Taylor.hpp.

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

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

Integrate with respect to the variable.

Definition at line 168 of file Taylor.hpp.

References begin, Taylor< T >::begin(), end, test::result, and Attrib::Legacy::Distribution::T.

Here is the call graph for this function:

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.

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, Taylor< T >::begin(), copy, end, Taylor< T >::end(), Taylor< T >::getOrder(), and Hypervolume::n.

Here is the call graph for this function:

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

Change sign of series.

Definition at line 108 of file Taylor.hpp.

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

Here is the call graph for this function:

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, Taylor< T >::begin(), copy, end, Taylor< T >::end(), Taylor< T >::getOrder(), and Hypervolume::n.

Here is the call graph for this function:

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.

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

Definition at line 61 of file Taylor.hpp.

References Taylor< T >::itsCoeffs.

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

Get coefficient.

Definition at line 96 of file Taylor.hpp.

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

Get coefficient.

Definition at line 102 of file Taylor.hpp.

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

Return sum of series.

Definition at line 186 of file Taylor.hpp.

References begin, end, and Attrib::Legacy::Distribution::T.

Member Data Documentation

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: