MDSTk Libraries  1.1.0
Medical Data Segmentation Toolkit
Public Types | Public Member Functions | Protected Member Functions
mds::math::CMatrixBase< M > Class Template Reference

Base class for all two-dimensional matrixes. More...

#include <mdsMatrixBase.h>

Inheritance diagram for mds::math::CMatrixBase< M >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef CMatrixTraits< M >
::tElement 
tElement
 Element type.
typedef M tMatrix
 Matrix type.

Public Member Functions

tElement & at (tSize row, tSize col)
 Method returns reference to the element at (row, col).
const tElement at (tSize row, tSize col) const
 Method returns element (by value) at (row, col).
tElement & at (tSize i)
 Returns the subscripted matrix coefficient.
const tElement & at (tSize i) const
tSize cols () const
template<class Function >
Function forEach (Function Func)
 Calls a function object for every matrix coefficient.
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every matrix coefficient.
tSize getColOffset () const
 Returns column offset, i.e.
tSize getIdx (tSize row, tSize col) const
 Calculates index of matrix coefficient.
tMatrix & getImpl ()
 Returns reference to the matrix implementation.
const tMatrix & getImpl () const
tSize getNumOfCols () const
tSize getNumOfRows () const
 Returns the matrix size (dimensions).
tSize getRowOffset () const
 Returns row offset, i.e.
tElement & operator() (tSize row, tSize col)
 Method returns reference to the element at (row, col).
const tElement operator() (tSize row, tSize col) const
 Method returns element (by value) at (row, col).
tElement & operator() (tSize i)
 Returns the subscripted matrix coefficient.
const tElement & operator() (tSize i) const
template<class Function >
Function pforEach (Function Func)
 Calls a function object for every matrix coefficient.
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every matrix coefficient.
tSize rows () const
 Returns the matrix size (dimensions).
tMatrix & set (tSize row, tSize col, const tElement &Value)
 Method sets value of element at (row, col).
tMatrix & set (tSize i, const tElement &Value)
 Sets the subscripted matrix coefficient.

Protected Member Functions

 CMatrixBase ()
 Default constructor.
 CMatrixBase (const CMatrixBase &)
 Copy constructor.
CMatrixBase & operator= (const CMatrixBase &)
 Assignment operator.

Detailed Description

template<class M>
class mds::math::CMatrixBase< M >

Base class for all two-dimensional matrixes.


Member Typedef Documentation

template<class M>
typedef CMatrixTraits<M>::tElement mds::math::CMatrixBase< M >::tElement
template<class M>
typedef M mds::math::CMatrixBase< M >::tMatrix

Matrix type.

Reimplemented in mds::img::CAffineMatrix.


Constructor & Destructor Documentation

template<class M>
mds::math::CMatrixBase< M >::CMatrixBase ( ) [protected]

Default constructor.

template<class M>
mds::math::CMatrixBase< M >::CMatrixBase ( const CMatrixBase< M > &  ) [protected]

Copy constructor.


Member Function Documentation

template<class M>
tElement& mds::math::CMatrixBase< M >::at ( tSize  row,
tSize  col 
)
template<class M>
const tElement mds::math::CMatrixBase< M >::at ( tSize  row,
tSize  col 
) const
template<class M>
tElement& mds::math::CMatrixBase< M >::at ( tSize  i)
template<class M>
const tElement& mds::math::CMatrixBase< M >::at ( tSize  i) const
template<class M>
tSize mds::math::CMatrixBase< M >::cols ( ) const
template<class M>
template<class Function >
Function mds::math::CMatrixBase< M >::forEach ( Function  Func)
template<class M>
template<class Function >
Function mds::math::CMatrixBase< M >::forEach ( Function  Func) const
template<class M>
tSize mds::math::CMatrixBase< M >::getColOffset ( ) const

Returns column offset, i.e.

the offset between two neighbouring elements in a matrix row.

Reimplemented in mds::math::CMatrix< T >, mds::math::CMatrix< double >, mds::math::CStaticMatrix< T, M, N >, and mds::math::CStaticMatrix< tCoordinate, 3, 3 >.

template<class M>
tSize mds::math::CMatrixBase< M >::getIdx ( tSize  row,
tSize  col 
) const
template<class M>
tMatrix& mds::math::CMatrixBase< M >::getImpl ( )

Returns reference to the matrix implementation.

template<class M>
const tMatrix& mds::math::CMatrixBase< M >::getImpl ( ) const
template<class M>
tSize mds::math::CMatrixBase< M >::getNumOfCols ( ) const
template<class M>
tSize mds::math::CMatrixBase< M >::getNumOfRows ( ) const
template<class M>
tSize mds::math::CMatrixBase< M >::getRowOffset ( ) const

Returns row offset, i.e.

the offset between two neighbouring elements in a matrix column.

Reimplemented in mds::math::CMatrix< T >, mds::math::CMatrix< double >, mds::math::CStaticMatrix< T, M, N >, and mds::math::CStaticMatrix< tCoordinate, 3, 3 >.

template<class M>
tElement& mds::math::CMatrixBase< M >::operator() ( tSize  row,
tSize  col 
)
template<class M>
const tElement mds::math::CMatrixBase< M >::operator() ( tSize  row,
tSize  col 
) const
template<class M>
tElement& mds::math::CMatrixBase< M >::operator() ( tSize  i)
template<class M>
const tElement& mds::math::CMatrixBase< M >::operator() ( tSize  i) const
template<class M>
CMatrixBase& mds::math::CMatrixBase< M >::operator= ( const CMatrixBase< M > &  ) [protected]

Assignment operator.

template<class M>
template<class Function >
Function mds::math::CMatrixBase< M >::pforEach ( Function  Func)
template<class M>
template<class Function >
Function mds::math::CMatrixBase< M >::pforEach ( Function  Func) const
template<class M>
tSize mds::math::CMatrixBase< M >::rows ( ) const
template<class M>
tMatrix& mds::math::CMatrixBase< M >::set ( tSize  row,
tSize  col,
const tElement &  Value 
)

Method sets value of element at (row, col).

template<class M>
tMatrix& mds::math::CMatrixBase< M >::set ( tSize  i,
const tElement &  Value 
)

Sets the subscripted matrix coefficient.


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