MeVisLab Toolbox Reference
ml::MatrixSizedTemplate< T, SIZE_X, SIZE_Y > Class Template Reference

general Matrix class based on MatrixTemplate<T> to allow fixed size setting with object declaration. More...

#include <mlMatrixTemplate.h>

Inheritance diagram for ml::MatrixSizedTemplate< T, SIZE_X, SIZE_Y >:
ml::MatrixTemplate< T >

Public Member Functions

 MatrixSizedTemplate ()
 ctor: initialise size at object creation with desired value
 
- Public Member Functions inherited from ml::MatrixTemplate< T >
 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< Trow (size_t i)
 itterator access to i-te row slice
 
Cslice_iter< Trow (size_t i) const
 const itterator access to i-te row slice
 
Slice_iter< Tcolumn (size_t i)
 itterator access to i-te column slice
 
Cslice_iter< Tcolumn (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
 
Toperator() (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< Toperator() (size_t i)
 slice of first argument (i.e column(i))
 
Cslice_iter< Toperator() (size_t i) const
 const slice of first argument (i.e column(i))
 
Slice_iter< Toperator[] (size_t i)
 slice of column(i)
 
Cslice_iter< Toperator[] (size_t i) const
 const slice of column(i)
 
MatrixTemplate< T > & operator*= (T)
 multiplication of all matrix elements with element-type multiplicator
 

Detailed Description

template<class T, size_t SIZE_X, size_t SIZE_Y>
class ml::MatrixSizedTemplate< T, SIZE_X, SIZE_Y >

general Matrix class based on MatrixTemplate<T> to allow fixed size setting with object declaration.

The class MatrixSizedTemplate<...> allows full access to functionality of class MatrixTemplate<> and the internal valarray, hence the matrix size can be adjusted dynamic if needed.

Definition at line 249 of file mlMatrixTemplate.h.

Constructor & Destructor Documentation

◆ MatrixSizedTemplate()

template<class T , size_t SIZE_X, size_t SIZE_Y>
ml::MatrixSizedTemplate< T, SIZE_X, SIZE_Y >::MatrixSizedTemplate ( )
inline

ctor: initialise size at object creation with desired value

Definition at line 253 of file mlMatrixTemplate.h.


The documentation for this class was generated from the following file: