OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
LinearFun< T, N > Class Template Reference

Linear function in N variables of type T. More...

#include <LinearFun.h>

Collaboration diagram for LinearFun< T, N >:

Public Member Functions

 LinearFun ()
 Default constructor.
 LinearFun (const T &)
 Conversion.
 LinearFun (int)
 Conversion.
LinearFunoperator= (const T &y)
 Convert and assign.
const T getCoefficient (int index) const
 Get coefficient.
void setCoefficient (int index, const T &value)
 Set coefficient.
const T operator[] (int index) const
 Get coefficient.
T & operator[] (int index)
 Get coefficient.
LinearFun operator+ () const
 Unary plus.
LinearFun operator- () const
 Unary minus.
LinearFunoperator+= (const LinearFun &y)
 Add and assign.
LinearFunoperator-= (const LinearFun &y)
 Subtract and assign.
LinearFunoperator*= (const LinearFun &y)
 Multiply and assign.
LinearFunoperator/= (const LinearFun &y)
 Approximate division and assignation.
LinearFunoperator+= (const T &y)
 Add constant and assign.
LinearFunoperator-= (const T &y)
 Subtract constant and assign.
LinearFunoperator*= (const T &y)
 Multiply by constant and assign.
LinearFunoperator/= (const T &y)
 Divide by constant and assign.
bool operator== (const LinearFun &y) const
 Equality operator.
bool operator== (const T &y) const
 Equality with constant.
bool operator!= (const LinearFun &y) const
 Inequality operator.
bool operator!= (const T &y) const
 Inequality with constant.
LinearFun inverse () const
 Approximate reciprocal value 1/(*this).
LinearFun multiply (const LinearFun &y) const
 Multiplication truncated to order one.
evaluate (const FVector< T, N > &) const
 Evaluate LinearFun at point.
LinearFun< T, N > substitute (const LinearMap< T, N > &m) const
 Substitute.
LinearFun< T, N > substitute (const FMatrix< T, N, N > &M) const
 Substitute.
LinearFun taylor (const T series[2]) const
 Taylor series.
std::istream & get (std::istream &is)
 Read LinearFun on the stream [b]is[/b].
std::ostream & put (std::ostream &os) const
 Write LinearFun on the stream [b]os[/b].

Static Public Member Functions

static LinearFun makeVariable (int var)
 Make variable.

Private Attributes

data [N+1]
 Representation.

Detailed Description

template<class T, int N>
class LinearFun< T, N >

Linear function in N variables of type T.

Definition at line 39 of file LinearFun.h.

Constructor & Destructor Documentation

◆ LinearFun() [1/3]

template<class T, int N>
LinearFun< T, N >::LinearFun ( )

◆ LinearFun() [2/3]

template<class T, int N>
LinearFun< T, N >::LinearFun ( const T & rhs)

Conversion.

Definition at line 45 of file LinearFun.hpp.

References data.

◆ LinearFun() [3/3]

template<class T, int N>
LinearFun< T, N >::LinearFun ( int rhs)

Conversion.

Definition at line 52 of file LinearFun.hpp.

References data.

Member Function Documentation

◆ evaluate()

template<class T, int N>
T LinearFun< T, N >::evaluate ( const FVector< T, N > & rhs) const

Evaluate LinearFun at point.

Definition at line 239 of file LinearFun.hpp.

References data.

◆ get()

template<class T, int N>
std::istream & LinearFun< T, N >::get ( std::istream & is)

Read LinearFun on the stream [b]is[/b].

Definition at line 290 of file LinearFun.hpp.

References data, LinearFun(), and Tps< T >::truncOrder.

Referenced by operator>>().

Here is the call graph for this function:

◆ getCoefficient()

template<class T, int N>
const T LinearFun< T, N >::getCoefficient ( int index) const

Get coefficient.

Definition at line 67 of file LinearFun.hpp.

References data.

◆ inverse()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::inverse ( ) const

Approximate reciprocal value 1/(*this).

Definition at line 211 of file LinearFun.hpp.

References data, and LinearFun().

Referenced by operator/(), operator/(), and LinearMap< T, N >::operator/=().

Here is the call graph for this function:

◆ makeVariable()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::makeVariable ( int var)
static

Make variable.

Definition at line 91 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ multiply()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::multiply ( const LinearFun< T, N > & y) const

Multiplication truncated to order one.

Definition at line 226 of file LinearFun.hpp.

References data, and LinearFun().

Referenced by operator*(), operator*=(), and operator/().

Here is the call graph for this function:

◆ operator!=() [1/2]

template<class T, int N>
bool LinearFun< T, N >::operator!= ( const LinearFun< T, N > & y) const
inline

Inequality operator.

Definition at line 199 of file LinearFun.hpp.

References LinearFun().

Here is the call graph for this function:

◆ operator!=() [2/2]

template<class T, int N>
bool LinearFun< T, N >::operator!= ( const T & y) const
inline

Inequality with constant.

Definition at line 205 of file LinearFun.hpp.

◆ operator*=() [1/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator*= ( const LinearFun< T, N > & y)

Multiply and assign.

Definition at line 128 of file LinearFun.hpp.

References LinearFun(), and multiply().

Here is the call graph for this function:

◆ operator*=() [2/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator*= ( const T & y)

Multiply by constant and assign.

Definition at line 162 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator+()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::operator+ ( ) const
inline

Unary plus.

Definition at line 100 of file LinearFun.hpp.

References LinearFun().

Here is the call graph for this function:

◆ operator+=() [1/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator+= ( const LinearFun< T, N > & y)

Add and assign.

Definition at line 114 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator+=() [2/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator+= ( const T & y)
inline

Add constant and assign.

Definition at line 148 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator-()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::operator- ( ) const

Unary minus.

Definition at line 106 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator-=() [1/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator-= ( const LinearFun< T, N > & y)

Subtract and assign.

Definition at line 121 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator-=() [2/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator-= ( const T & y)
inline

Subtract constant and assign.

Definition at line 155 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator/=() [1/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator/= ( const LinearFun< T, N > & y)

Approximate division and assignation.

Definition at line 134 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator/=() [2/2]

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator/= ( const T & y)

Divide by constant and assign.

Definition at line 169 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator=()

template<class T, int N>
LinearFun< T, N > & LinearFun< T, N >::operator= ( const T & y)

Convert and assign.

Definition at line 59 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator==() [1/2]

template<class T, int N>
bool LinearFun< T, N >::operator== ( const LinearFun< T, N > & y) const

Equality operator.

Definition at line 177 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ operator==() [2/2]

template<class T, int N>
bool LinearFun< T, N >::operator== ( const T & y) const

Equality with constant.

Definition at line 187 of file LinearFun.hpp.

References data.

◆ operator[]() [1/2]

template<class T, int N>
T & LinearFun< T, N >::operator[] ( int index)
inline

Get coefficient.

Definition at line 85 of file LinearFun.hpp.

References data.

◆ operator[]() [2/2]

template<class T, int N>
const T LinearFun< T, N >::operator[] ( int index) const
inline

Get coefficient.

Definition at line 79 of file LinearFun.hpp.

References data.

◆ put()

template<class T, int N>
std::ostream & LinearFun< T, N >::put ( std::ostream & os) const

Write LinearFun on the stream [b]os[/b].

Definition at line 343 of file LinearFun.hpp.

References data.

Referenced by operator<<().

◆ setCoefficient()

template<class T, int N>
void LinearFun< T, N >::setCoefficient ( int index,
const T & value )

Set coefficient.

Definition at line 73 of file LinearFun.hpp.

References data.

◆ substitute() [1/2]

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::substitute ( const FMatrix< T, N, N > & M) const

Substitute.

Definition at line 247 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ substitute() [2/2]

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::substitute ( const LinearMap< T, N > & m) const

Substitute.

Definition at line 262 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

◆ taylor()

template<class T, int N>
LinearFun< T, N > LinearFun< T, N >::taylor ( const T series[2]) const

Taylor series.

Definition at line 277 of file LinearFun.hpp.

References data, and LinearFun().

Here is the call graph for this function:

Member Data Documentation

◆ data


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