LocARNA-1.9.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Protected Member Functions | Protected Attributes
LocARNA::RotMatrix< elem_t > Class Template Reference

A matrix class with rotation. More...

#include <matrices.hh>

Inheritance diagram for LocARNA::RotMatrix< elem_t >:
LocARNA::Matrix< elem_t >

List of all members.

Public Member Functions

 RotMatrix ()
void resize (size_t xdim, size_t ydim, size_t xrot=0, size_t yrot=0)
void move (size_t xrot, size_t yrot)
const elem_toperator() (size_t i, size_t j) const
elem_toperator() (size_t i, size_t j)
const elem_t get (size_t i, size_t j) const
void set (size_t i, size_t j, const elem_t &x)

Protected Member Functions

size_t rot (size_t x, size_t r, size_t d)
size_t addr (size_t i, size_t j) const

Protected Attributes

size_t xrot_
 rotation in dimension 1
size_t yrot_
 rotation in dimension 2

Detailed Description

template<class elem_t>
class LocARNA::RotMatrix< elem_t >

A matrix class with rotation.


Constructor & Destructor Documentation

template<class elem_t >
LocARNA::RotMatrix< elem_t >::RotMatrix ( ) [inline]

Construct as empty 0x0-matrix.

Returns:

Member Function Documentation

template<class elem_t >
size_t LocARNA::RotMatrix< elem_t >::addr ( size_t  i,
size_t  j 
) const [inline, protected]

Computes address/index in 1D vector from 2D matrix indices

Does the rotation.

Parameters:
ifirst index
jsecond index
Returns:
index in vector
Note:
this method is used for all internal access to the vector mat_
template<class elem_t >
const elem_t LocARNA::RotMatrix< elem_t >::get ( size_t  i,
size_t  j 
) const [inline]

Read access to matrix element

Parameters:
i
j
Returns:
entry (i,j)
Note:
: redefine since we don't want to use polymorphism
template<class elem_t >
void LocARNA::RotMatrix< elem_t >::move ( size_t  xrot,
size_t  yrot 
) [inline]

Change rotation

Parameters:
xrotnew first rotation
yrotnew second rotation
Postcondition:
matrix is rotated
template<class elem_t >
const elem_t& LocARNA::RotMatrix< elem_t >::operator() ( size_t  i,
size_t  j 
) const [inline]

Read access to matrix element

Parameters:
i
j
Returns:
entry (i,j)
Note:
: redefine since we don't want to use polymorphism
template<class elem_t >
elem_t& LocARNA::RotMatrix< elem_t >::operator() ( size_t  i,
size_t  j 
) [inline]

Read/write access to matrix element

Parameters:
i
j
Returns:
reference to entry (i,j)
Note:
: redefine since we don't want to use polymorphism
template<class elem_t >
void LocARNA::RotMatrix< elem_t >::resize ( size_t  xdim,
size_t  ydim,
size_t  xrot = 0,
size_t  yrot = 0 
) [inline]

Resize matrix

Parameters:
xdimfirst dimension
ydimsecond dimension
xrotrotation in first dimension
yrotrotation in second dimension
template<class elem_t >
size_t LocARNA::RotMatrix< elem_t >::rot ( size_t  x,
size_t  r,
size_t  d 
) [inline, protected]

Compute index rotation for one dimension

Parameters:
xindex
ramount of rotation
ddimension size
Returns:
rotated index
template<class elem_t >
void LocARNA::RotMatrix< elem_t >::set ( size_t  i,
size_t  j,
const elem_t x 
) [inline]

Write access to matrix element

Parameters:
i
j
xelement value
Note:
: redefine since we don't want to use polymorphism

The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends