LocARNA-2.0.0
|
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) |
![]() | |
Matrix () | |
Matrix (size_type xdim, size_type ydim, const elem_t *from=nullptr) | |
size_pair_type | sizes () const |
void | resize (size_type xdim, size_type ydim) |
const elem_t & | operator() (size_type i, size_type j) const |
elem_t & | operator() (size_type i, size_type j) |
const elem_t & | get (size_type i, size_type j) const |
void | set (size_type i, size_type j, const elem_t &x) |
void | fill (const elem_t &val) |
Fill the whole matrix with the given value. More... | |
void | clear () |
void | transform (UnaryOperator f) |
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 |
![]() | |
size_type | addr (size_type i, size_type j) const |
Protected Attributes | |
size_t | xrot_ |
rotation in dimension 1 | |
size_t | yrot_ |
rotation in dimension 2 | |
![]() | |
std::vector< elem_t > | mat_ |
vector storing the matrix entries | |
size_type | xdim_ |
first dimension | |
size_type | ydim_ |
second dimension | |
Additional Inherited Members | |
![]() | |
typedef elem_t | elem_t |
type of elements | |
typedef std::vector< elem_t >::size_type | size_type |
size type (from underlying vector) | |
typedef std::pair< size_type, size_type > | size_pair_type |
type for pair of sizes | |
A matrix class with rotation.
|
inline |
Construct as empty 0x0-matrix.
|
inlineprotected |
Computes address/index in 1D vector from 2D matrix indices
Does the rotation.
i | first index |
j | second index |
|
inline |
Read access to matrix element
i | |
j |
|
inline |
Change rotation
xrot | new first rotation |
yrot | new second rotation |
|
inline |
Read/write access to matrix element
i | |
j |
|
inline |
Read access to matrix element
i | |
j |
|
inline |
Resize matrix
xdim | first dimension |
ydim | second dimension |
xrot | rotation in first dimension |
yrot | rotation in second dimension |
|
inlineprotected |
Compute index rotation for one dimension
x | index |
r | amount of rotation |
d | dimension size |
|
inline |
Write access to matrix element
i | |
j | |
x | element value |