OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Protected Attributes | List of all members
LinearMap< T, N > Class Template Reference

Linear map with values of type [b]T[/b] in [b]N[/b] variables. More...

#include <LinearMap.h>

Public Member Functions

 LinearMap ()
 Default constructor. More...
 
 LinearMap (const FVps< T, N > &rhs)
 Convert from general map. More...
 
 LinearMap (const FMatrix< T, N, N > &M)
 Convert from matrix. More...
 
 LinearMap (const FVector< T, N > &V)
 Convert from vector. More...
 
const LinearFun< T, N > & getComponent (int n) const
 Get component. More...
 
void setComponent (int, const LinearFun< T, N > &)
 Set component. More...
 
LinearFun< T, N > & operator[] (int)
 Get component. More...
 
const LinearFun< T, N > & operator[] (int) const
 Get Component. More...
 
LinearMap operator+ () const
 Unary plus. More...
 
LinearMap operator- () const
 Unary minus. More...
 
LinearMapoperator*= (const LinearFun< T, N > &rhs)
 Multiply and assign. More...
 
LinearMapoperator/= (const LinearFun< T, N > &rhs)
 Divide and assign. More...
 
LinearMapoperator*= (const T &rhs)
 Multiply and assign. More...
 
LinearMapoperator/= (const T &rhs)
 Divide and assign. More...
 
LinearMapoperator+= (const LinearMap &rhs)
 Add. More...
 
LinearMapoperator-= (const LinearMap &rhs)
 Subtract. More...
 
LinearMapoperator+= (const FVector< T, N > &)
 Add and assign. More...
 
LinearMapoperator-= (const FVector< T, N > &)
 Subtract and assign. More...
 
std::istream & get (std::istream &is)
 Get a LinearMap from stream [b]is[/b]. More...
 
std::ostream & put (std::ostream &os) const
 Put a LinearMap to stream [b]os[/b]. More...
 
LinearMap inverse () const
 Inverse. More...
 
void identity ()
 Set to identity. More...
 
FVector< T, N > constantTerm (const FVector< T, N > &P) const
 Evaluate map at point [b]P[/b]. More...
 
FVector< T, N > constantTerm () const
 
FMatrix< T, N, N > linearTerms () const
 Extract linear terms at origin. More...
 
LinearMap substitute (const FMatrix< T, N, N > &rhs) const
 Substitute matrix into map. More...
 
LinearMap substitute (const LinearMap &rhs) const
 Substitute map into map. More...
 
LinearMap substituteInto (const FMatrix< T, N, N > &lhs) const
 Substitute map into matrix. More...
 

Protected Attributes

LinearFun< T, N > data [N]
 

Detailed Description

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

Linear map with values of type [b]T[/b] in [b]N[/b] variables.

Definition at line 38 of file LinearMap.h.

Constructor & Destructor Documentation

◆ LinearMap() [1/4]

template<class T , int N>
LinearMap< T, N >::LinearMap

Default constructor.

Definition at line 38 of file LinearMap.hpp.

◆ LinearMap() [2/4]

template<class T , int N>
LinearMap< T, N >::LinearMap ( const FVps< T, N > &  rhs)
explicit

Convert from general map.

Definition at line 44 of file LinearMap.hpp.

◆ LinearMap() [3/4]

template<class T , int N>
LinearMap< T, N >::LinearMap ( const FMatrix< T, N, N > &  M)
explicit

Convert from matrix.

Definition at line 52 of file LinearMap.hpp.

◆ LinearMap() [4/4]

template<class T , int N>
LinearMap< T, N >::LinearMap ( const FVector< T, N > &  V)
explicit

Convert from vector.

Definition at line 60 of file LinearMap.hpp.

Member Function Documentation

◆ constantTerm() [1/2]

template<class T , int N>
FVector< T, N > LinearMap< T, N >::constantTerm

Evaluate map at origin. This is equivalent to extracting constant part.

Definition at line 235 of file LinearMap.hpp.

◆ constantTerm() [2/2]

template<class T , int N>
FVector< T, N > LinearMap< T, N >::constantTerm ( const FVector< T, N > &  P) const

Evaluate map at point [b]P[/b].

Definition at line 220 of file LinearMap.hpp.

◆ get()

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

Get a LinearMap from stream [b]is[/b].

Definition at line 168 of file LinearMap.hpp.

Referenced by operator>>().

◆ getComponent()

template<class T , int N>
const LinearFun< T, N > & LinearMap< T, N >::getComponent ( int  n) const

Get component.

Definition at line 66 of file LinearMap.hpp.

◆ identity()

template<class T , int N>
void LinearMap< T, N >::identity

Set to identity.

Definition at line 214 of file LinearMap.hpp.

◆ inverse()

template<class T , int N>
LinearMap< T, N > LinearMap< T, N >::inverse

Inverse.

Definition at line 201 of file LinearMap.hpp.

References FLUMatrix< T, N >::inverse().

Here is the call graph for this function:

◆ linearTerms()

template<class T , int N>
FMatrix< T, N, N > LinearMap< T, N >::linearTerms

Extract linear terms at origin.

Definition at line 243 of file LinearMap.hpp.

◆ operator*=() [1/2]

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

Multiply and assign.

Definition at line 111 of file LinearMap.hpp.

◆ operator*=() [2/2]

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

Multiply and assign.

Definition at line 126 of file LinearMap.hpp.

◆ operator+()

template<class T , int N>
LinearMap< T, N > LinearMap< T, N >::operator+

Unary plus.

Definition at line 97 of file LinearMap.hpp.

◆ operator+=() [1/2]

template<class T , int N>
LinearMap< T, N > & LinearMap< T, N >::operator+= ( const FVector< T, N > &  rhs)

Add and assign.

Definition at line 154 of file LinearMap.hpp.

◆ operator+=() [2/2]

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

Add.

Definition at line 140 of file LinearMap.hpp.

◆ operator-()

template<class T , int N>
LinearMap< T, N > LinearMap< T, N >::operator-

Unary minus.

Definition at line 103 of file LinearMap.hpp.

◆ operator-=() [1/2]

template<class T , int N>
LinearMap< T, N > & LinearMap< T, N >::operator-= ( const FVector< T, N > &  rhs)

Subtract and assign.

Definition at line 161 of file LinearMap.hpp.

◆ operator-=() [2/2]

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

Subtract.

Definition at line 147 of file LinearMap.hpp.

◆ operator/=() [1/2]

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

Divide and assign.

Definition at line 118 of file LinearMap.hpp.

References LinearFun< T, N >::inverse().

Here is the call graph for this function:

◆ operator/=() [2/2]

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

Divide and assign.

Definition at line 133 of file LinearMap.hpp.

◆ operator[]() [1/2]

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

Get component.

Definition at line 86 of file LinearMap.hpp.

◆ operator[]() [2/2]

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

Get Component.

Definition at line 91 of file LinearMap.hpp.

◆ put()

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

Put a LinearMap to stream [b]os[/b].

Definition at line 193 of file LinearMap.hpp.

References endl().

Referenced by operator<<().

Here is the call graph for this function:

◆ setComponent()

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

Set component.

Definition at line 76 of file LinearMap.hpp.

◆ substitute() [1/2]

template<class T , int N>
LinearMap< T, N > LinearMap< T, N >::substitute ( const FMatrix< T, N, N > &  rhs) const

Substitute matrix into map.

Definition at line 274 of file LinearMap.hpp.

References LinearMap< T, N >::data.

◆ substitute() [2/2]

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

Substitute map into map.

Definition at line 257 of file LinearMap.hpp.

References LinearMap< T, N >::data.

◆ substituteInto()

template<class T , int N>
LinearMap< T, N > LinearMap< T, N >::substituteInto ( const FMatrix< T, N, N > &  lhs) const

Substitute map into matrix.

Definition at line 291 of file LinearMap.hpp.

Referenced by operator*().

Member Data Documentation

◆ data

template<class T , int N>
LinearFun<T, N> LinearMap< T, N >::data[N]
protected

Definition at line 146 of file LinearMap.h.

Referenced by LinearMap< T, N >::substitute().


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