MeVisLabToolboxReference
|
MatricTemplate
implements general Matrix class based on valarray of objects with Template class type for nummeric calculations with dynamic size
More...
#include <mlMatrixTemplate.h>
Public Member Functions | |
MatrixTemplate (size_t x, size_t y) | |
constructor initialising memory block for requested matrix size | |
MatrixTemplate (const MatrixTemplate< T > &) | |
copy constructor | |
MatrixTemplate< T > & | operator= (const MatrixTemplate< T > &) |
assignment operator ATTENTION: implies resizing of matrix | |
~MatrixTemplate () | |
destructor: free allocated memory | |
void | freeMatrix () |
free allocated memory | |
void | resizeMatrix (size_t x, size_t y, const T &c=T()) |
resize matrix, set new allocated elements to value c | |
void | overrideMatrix (size_t x, size_t y, const T &c=T()) |
resize matrix if necessary, set all elements on value c | |
size_t | size () const |
return total number of matrix elements | |
size_t | sizeX () const |
return number of columns | |
size_t | sizeY () const |
return number of rows | |
Slice_iter< T > | row (size_t i) |
itterator access to i-te row slice | |
Cslice_iter< T > | row (size_t i) const |
const itterator access to i-te row slice | |
Slice_iter< T > | column (size_t i) |
itterator access to i-te column slice | |
Cslice_iter< T > | column (size_t i) const |
const itterator access to i-te column slice | |
std::valarray< T > & | array () |
reference to internal valarray | |
operator T * () | |
pass access to internal valarray | |
Fortran-style subscripts | |
T & | operator() (size_t x, size_t y) |
reference of element x,y | |
T | operator() (size_t x, size_t y) const |
element x,y | |
Slice_iter< T > | operator() (size_t i) |
slice of first argument (i.e column(i)) | |
Cslice_iter< T > | operator() (size_t i) const |
const slice of first argument (i.e column(i)) | |
C-style subscripts | |
Slice_iter< T > | operator[] (size_t i) |
slice of column(i) | |
Cslice_iter< T > | operator[] (size_t i) const |
const slice of column(i) | |
MatrixTemplate< T > & | operator*= (T) |
multiplication of all matrix elements with element-type multiplicator |
MatricTemplate
implements general Matrix class based on valarray of objects with Template class type for nummeric calculations with dynamic size
Definition at line 199 of file mlMatrixTemplate.h.
ml::MatrixTemplate< T >::MatrixTemplate | ( | size_t | x, |
size_t | y | ||
) |
constructor initialising memory block for requested matrix size
ctor
Definition at line 301 of file mlMatrixTemplate.h.
ml::MatrixTemplate< T >::MatrixTemplate | ( | const MatrixTemplate< T > & | mt | ) |
copy constructor
Definition at line 310 of file mlMatrixTemplate.h.
ml::MatrixTemplate< T >::~MatrixTemplate | ( | ) |
std::valarray<T>& ml::MatrixTemplate< T >::array | ( | ) | [inline] |
reference to internal valarray
Definition at line 240 of file mlMatrixTemplate.h.
Slice_iter< T > ml::MatrixTemplate< T >::column | ( | size_t | i | ) | [inline] |
itterator access to i-te column slice
slice for column access
Definition at line 287 of file mlMatrixTemplate.h.
Referenced by ml::operator*().
Cslice_iter< T > ml::MatrixTemplate< T >::column | ( | size_t | i | ) | const [inline] |
const itterator access to i-te column slice
const slice for column access
Definition at line 294 of file mlMatrixTemplate.h.
void ml::MatrixTemplate< T >::freeMatrix | ( | ) |
ml::MatrixTemplate< T >::operator T * | ( | ) | [inline] |
T & ml::MatrixTemplate< T >::operator() | ( | size_t | x, |
size_t | y | ||
) |
reference of element x,y
allows Fortran-style element access
Definition at line 377 of file mlMatrixTemplate.h.
Cslice_iter<T> ml::MatrixTemplate< T >::operator() | ( | size_t | i | ) | const [inline] |
const slice of first argument (i.e column(i))
Definition at line 229 of file mlMatrixTemplate.h.
T ml::MatrixTemplate< T >::operator() | ( | size_t | x, |
size_t | y | ||
) | const |
element x,y
Slice_iter<T> ml::MatrixTemplate< T >::operator() | ( | size_t | i | ) | [inline] |
slice of first argument (i.e column(i))
Definition at line 228 of file mlMatrixTemplate.h.
MatrixTemplate< T > & ml::MatrixTemplate< T >::operator*= | ( | T | d | ) |
multiplication of all matrix elements with element-type multiplicator
implements element-individual multiplication with element-type operator
Definition at line 457 of file mlMatrixTemplate.h.
MatrixTemplate< T > & ml::MatrixTemplate< T >::operator= | ( | const MatrixTemplate< T > & | mt | ) |
assignment operator ATTENTION: implies resizing of matrix
assignment operator
Definition at line 324 of file mlMatrixTemplate.h.
Cslice_iter<T> ml::MatrixTemplate< T >::operator[] | ( | size_t | i | ) | const [inline] |
const slice of column(i)
Definition at line 235 of file mlMatrixTemplate.h.
Slice_iter<T> ml::MatrixTemplate< T >::operator[] | ( | size_t | i | ) | [inline] |
slice of column(i)
Definition at line 234 of file mlMatrixTemplate.h.
void ml::MatrixTemplate< T >::overrideMatrix | ( | size_t | x, |
size_t | y, | ||
const T & | c = T() |
||
) |
resize matrix if necessary, set all elements on value c
dynamic resize if needed: All elements are set to value c.
Any pointers or references to elements in the controlled sequence are invalidated.
Definition at line 357 of file mlMatrixTemplate.h.
void ml::MatrixTemplate< T >::resizeMatrix | ( | size_t | x, |
size_t | y, | ||
const T & | c = T() |
||
) |
resize matrix, set new allocated elements to value c
dynamic resize: If it must lengthen the controlled sequence, it appends elements with value c.
Any pointers or references to elements in the controlled sequence are invalidated.
Definition at line 346 of file mlMatrixTemplate.h.
Cslice_iter< T > ml::MatrixTemplate< T >::row | ( | size_t | i | ) | const [inline] |
const itterator access to i-te row slice
const slice for row access
Definition at line 280 of file mlMatrixTemplate.h.
Slice_iter< T > ml::MatrixTemplate< T >::row | ( | size_t | i | ) | [inline] |
itterator access to i-te row slice
slice for row access
Definition at line 273 of file mlMatrixTemplate.h.
Referenced by ml::mul_mv(), and ml::operator*().
size_t ml::MatrixTemplate< T >::size | ( | ) | const [inline] |
return total number of matrix elements
Definition at line 213 of file mlMatrixTemplate.h.
size_t ml::MatrixTemplate< T >::sizeX | ( | ) | const [inline] |
return number of columns
Definition at line 214 of file mlMatrixTemplate.h.
Referenced by ml::mul_mv(), and ml::operator*().
size_t ml::MatrixTemplate< T >::sizeY | ( | ) | const [inline] |
return number of rows
Definition at line 215 of file mlMatrixTemplate.h.
Referenced by ml::mul_mv(), and ml::operator*().