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

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

#include <LinearMap.h>

Collaboration diagram for LinearMap< T, N >:

Public Member Functions

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

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 ( )

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

References data.

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

References data.

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

References data.

Member Function Documentation

◆ constantTerm() [1/2]

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

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

Definition at line 235 of file LinearMap.hpp.

References data.

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

References data.

Referenced by inverse().

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

References data, get(), and LinearMap().

Referenced by get(), and operator>>().

Here is the call graph for this function:

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

References data.

◆ 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 ( ) const

Inverse.

Definition at line 201 of file LinearMap.hpp.

References constantTerm(), FLUMatrix< T, N >::inverse(), LinearMap(), and linearTerms().

Here is the call graph for this function:

◆ linearTerms()

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

Extract linear terms at origin.

Definition at line 243 of file LinearMap.hpp.

References data.

Referenced by inverse().

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

References data, and LinearMap().

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)

Multiply and assign.

Definition at line 126 of file LinearMap.hpp.

References data, and LinearMap().

Here is the call graph for this function:

◆ operator+()

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

Unary plus.

Definition at line 97 of file LinearMap.hpp.

References LinearMap().

Here is the call graph for this function:

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

References data, and LinearMap().

Here is the call graph for this function:

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

References data, and LinearMap().

Here is the call graph for this function:

◆ operator-()

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

Unary minus.

Definition at line 103 of file LinearMap.hpp.

References data, and LinearMap().

Here is the call graph for this function:

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

References data, and LinearMap().

Here is the call graph for this function:

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

References data, and LinearMap().

Here is the call graph for this function:

◆ 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 data, LinearFun< T, N >::inverse(), and LinearMap().

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.

References data, and LinearMap().

Here is the call graph for this function:

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

References data.

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

References data.

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

Referenced by operator<<().

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

References data.

◆ 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 data, and LinearMap().

Here is the call graph for this function:

◆ 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 data, and LinearMap().

Here is the call graph for this function:

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

References data, and LinearMap().

Referenced by operator*().

Here is the call graph for this function:

Member Data Documentation

◆ data


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