Public Member Functions |
| RMatrix () |
void | resize (size_type xdim, size_type ydim) |
void | restrict (size_type xl, size_type xr, size_type yl, size_type yr) |
| Set new restricted range.
|
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.
|
Protected Member Functions |
size_type | addr (size_type i, size_type j) const |
Protected Attributes |
size_type | xl_ |
| left end of restriction in first dimension
|
size_type | xr_ |
| right end of restriction in first dimension
|
size_type | yl_ |
| left end of restriction in second dimension
|
size_type | yr_ |
| right end of restriction in second dimension
|
size_type | xfactor_ |
| factor for index calculation
|
size_type | offset_ |
| offset for index calculation
|
template<class elem_t>
class LocARNA::RMatrix< elem_t >
Simple matrix class with restriction to a range.
The matrix features a fix maximal range [0..n]x[0..m]. It can be restricted to [xl..xr]x[yl..yr]. After such a restriction, the matrix is invalidated and can only be used with indices (i,j): xl<=i<=xr and yl<=j<=yr
- Note:
- I planned to use this for the M matrices in LocARNA to optimize locality. However, I didn't see a performance improvement (maybe for very large instances?)