OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
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

◆ 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+(), Taylor< T >::operator+=(), Taylor< T >::operator-(), operator-(), Taylor< T >::operator-=(), and operator/().

◆ begin() [2/2]

template<class T >
const T * Taylor< T >::begin
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+(), Taylor< T >::operator+=(), operator-(), Taylor< T >::operator-=(), and operator/().

◆ end() [2/2]

template<class T >
const T * Taylor< T >::end
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
inline

Return order of this series.

Definition at line 192 of file Taylor.hpp.

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

◆ integrate()

template<class T >
Taylor< T > Taylor< T >::integrate

Integrate with respect to the variable.

Definition at line 167 of file Taylor.hpp.

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

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

Here is the call graph for this function:

◆ operator-()

template<class T >
Taylor< T > Taylor< T >::operator-

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

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

Return sum of series.

Definition at line 185 of file Taylor.hpp.

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

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: