OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
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 <AbstractMapper.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 27 of file AbstractMapper.h.

Constructor & Destructor Documentation

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

Default constructor.

Definition at line 38 of file LinearMap.hpp.

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.

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.

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

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.

Referenced by Period::findClosedOrbit(), Micado::findClosedOrbit(), and Twiss::put().

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.

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 LinearMap< T, N >::data.

Referenced by operator>>().

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.

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

Set to identity.

Definition at line 214 of file LinearMap.hpp.

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

Inverse.

Definition at line 201 of file LinearMap.hpp.

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

Here is the call graph for this function:

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.

Referenced by Period::findClosedOrbit(), Micado::findClosedOrbit(), IdealMapper::getMatrix(), and Twiss::put().

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.

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.

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

Unary plus.

Definition at line 97 of file LinearMap.hpp.

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.

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.

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

Unary minus.

Definition at line 103 of file LinearMap.hpp.

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.

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.

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:

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.

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.

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.

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

Here is the call graph for this function:

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.

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.

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.

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

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 >::get(), and LinearMap< T, N >::substitute().


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