A matrix class with rotation. More...
#include <matrices.hh>
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_t & | operator() (size_t i, size_t j) const |
| elem_t & | operator() (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 | |
A matrix class with rotation.
| LocARNA::RotMatrix< elem_t >::RotMatrix | ( | ) | [inline] |
Construct as empty 0x0-matrix.
| 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.
| i | first index |
| j | second index |
| const elem_t LocARNA::RotMatrix< elem_t >::get | ( | size_t | i, |
| size_t | j | ||
| ) | const [inline] |
Read access to matrix element
| i | |
| j |
| void LocARNA::RotMatrix< elem_t >::move | ( | size_t | xrot, |
| size_t | yrot | ||
| ) | [inline] |
Change rotation
| xrot | new first rotation |
| yrot | new second rotation |
| const elem_t& LocARNA::RotMatrix< elem_t >::operator() | ( | size_t | i, |
| size_t | j | ||
| ) | const [inline] |
Read access to matrix element
| i | |
| j |
| elem_t& LocARNA::RotMatrix< elem_t >::operator() | ( | size_t | i, |
| size_t | j | ||
| ) | [inline] |
Read/write access to matrix element
| i | |
| j |
| void LocARNA::RotMatrix< elem_t >::resize | ( | size_t | xdim, |
| size_t | ydim, | ||
| size_t | xrot = 0, |
||
| size_t | yrot = 0 |
||
| ) | [inline] |
Resize matrix
| xdim | first dimension |
| ydim | second dimension |
| xrot | rotation in first dimension |
| yrot | rotation in second dimension |
| size_t LocARNA::RotMatrix< elem_t >::rot | ( | size_t | x, |
| size_t | r, | ||
| size_t | d | ||
| ) | [inline, protected] |
Compute index rotation for one dimension
| x | index |
| r | amount of rotation |
| d | dimension size |
| void LocARNA::RotMatrix< elem_t >::set | ( | size_t | i, |
| size_t | j, | ||
| const elem_t & | x | ||
| ) | [inline] |
Write access to matrix element
| i | |
| j | |
| x | element value |
1.7.6.1