MDSTk Libraries
1.1.0
Medical Data Segmentation Toolkit
|
Class template for a two dimensional static row-major dense matrix. More...
#include <mdsStaticMatrix.h>
Public Types | |
enum | { CLASS_MATRIX } |
Templates that require members of the CStaticMatrix class can use this enum to check the existence. More... | |
enum | { SIZE = M * N } |
Size of the matrix data. More... | |
typedef CMatrixBase < CStaticMatrix< T, M, N > > | tBase |
Base class. | |
typedef T | tElement |
Matrix element type. | |
typedef CStaticMatrix< T, M, N > | tMatrix |
Matrix type. | |
typedef Eigen::Matrix < tElement, M, N, Eigen::RowMajor > | tStorage |
Underlying matrix data (see the Eigen math library). | |
Public Member Functions | |
CStaticMatrix & | abs () |
Makes absolute value of all elements. | |
tStorage & | asEigen () |
Returns reference to the underlying matrix data (see the Eigen math library). | |
const tStorage & | asEigen () const |
T & | at (tSize Row, tSize Col) |
Returns reference to the element [Row][Col]. | |
const T & | at (tSize Row, tSize Col) const |
Method returns element (by value) at (row, col). | |
T & | at (tSize i) |
Returns the subscripted pixel. | |
const T & | at (tSize i) const |
tSize | cols () const |
template<typename U > | |
CStaticMatrix (const CStaticMatrix< U, M, N > &Matrix) | |
template<typename Derived > | |
CStaticMatrix (const Eigen::MatrixBase< Derived > &Matrix) | |
CStaticMatrix () | |
Declare iterator types tIterator and tConstIterator. | |
template<typename U > | |
CStaticMatrix (const CStaticMatrix< U, M, N > &Matrix) | |
Copy constructor. | |
template<typename Derived > | |
CStaticMatrix (const Eigen::MatrixBase< Derived > &Matrix) | |
Conversion constructor. | |
CStaticMatrix (const CStaticMatrix &Matrix) | |
Copy constructor specialization. | |
CStaticMatrix & | fill (const T &Value) |
Fills the matrix using a given value. | |
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. | |
template<class Function > | |
Function | forEach (Function Func) |
Calls a function object for every matrix element. | |
template<class Function > | |
Function | forEach (Function Func) const |
Calls a function object for every matrix element. | |
tSize | getColOffset () const |
Returns column offset. | |
T * | getColPtr (tSize Col) |
Returns pointer to the first element of matrix column. | |
const T * | getColPtr (tSize Col) const |
tSize | getIdx (tSize Row, tSize Col) const |
Calculates index of a specified pixel. | |
tMatrix & | getImpl () |
Returns reference to the matrix implementation. | |
const tMatrix & | getImpl () const |
tSize | getNumOfCols () const |
tSize | getNumOfRows () const |
Returns the matrix dimensions. | |
T * | getPtr () |
Returns pointer to the first matrix element. | |
const T * | getPtr () const |
T * | getPtr (tSize Row, tSize Col) |
Returns pointer to the given element. | |
const T * | getPtr (tSize Row, tSize Col) const |
tSize | getRowOffset () const |
Returns row offset. | |
T * | getRowPtr (tSize Row) |
Returns pointer to the first element of matrix row. | |
const T * | getRowPtr (tSize Row) const |
bool | isSquare () const |
Returns true of the matrix is square. | |
template<tSize K> | |
CStaticMatrix & | mult (const CStaticMatrix< T, M, K > &Matrix1, const CStaticMatrix< T, K, N > &Matrix2) |
Matrix multiplication. | |
template<tSize K> | |
CStaticMatrix< T, M, N > & | mult (const CStaticMatrix< T, M, K > &m1, const CStaticMatrix< T, K, N > &m2) |
CStaticMatrix & | multAdd (const CStaticMatrix &Matrix, const T &Scalar) |
Provides operation this += Matrix * Scalar. | |
CStaticMatrix & | ones () |
Sets all elements to one. | |
T & | operator() (tSize Row, tSize Col) |
Returns reference to the element [Row][Col]. | |
const T & | operator() (tSize Row, tSize Col) const |
Method returns element (by value) at (row, col). | |
T & | operator() (tSize i) |
Returns the subscripted pixel. | |
const T & | operator() (tSize i) const |
template<typename U > | |
CStaticMatrix< T, M, N > & | operator*= (const CScalar< U > &c) |
CStaticMatrix & | operator*= (const CStaticMatrix &Matrix) |
Element wise product. | |
template<typename U > | |
CStaticMatrix & | operator*= (const CScalar< U > &c) |
Multiplies all elements by scalar. | |
template<typename U > | |
CStaticMatrix< T, M, N > & | operator+= (const CScalar< U > &c) |
CStaticMatrix & | operator+= (const CStaticMatrix &Matrix) |
Element wise addition. | |
template<typename U > | |
CStaticMatrix & | operator+= (const CScalar< U > &c) |
Adds scalar to all elements. | |
template<typename U > | |
CStaticMatrix< T, M, N > & | operator-= (const CScalar< U > &c) |
CStaticMatrix & | operator-= (const CStaticMatrix &Matrix) |
Element wise subtraction. | |
template<typename U > | |
CStaticMatrix & | operator-= (const CScalar< U > &c) |
Subtracts scalar to all elements. | |
template<typename U > | |
CStaticMatrix< T, M, N > & | operator/= (const CScalar< U > &c) |
CStaticMatrix & | operator/= (const CStaticMatrix &Matrix) |
Element wise addition. | |
template<typename U > | |
CStaticMatrix & | operator/= (const CScalar< U > &c) |
Divides all elements by scalar. | |
template<typename U > | |
CStaticMatrix< T, M, N > & | operator= (const CStaticMatrix< U, M, N > &Matrix) |
template<typename Derived > | |
CStaticMatrix< T, M, N > & | operator= (const Eigen::MatrixBase< Derived > &Matrix) |
template<typename U > | |
CStaticMatrix & | operator= (const CStaticMatrix< U, M, N > &Matrix) |
Assignment operator. | |
template<typename Derived > | |
CStaticMatrix & | operator= (const Eigen::MatrixBase< Derived > &Matrix) |
Assignment operator. | |
CStaticMatrix & | operator= (const CStaticMatrix &Matrix) |
Assignment operator specialization. | |
template<class Function > | |
Function | pforEach (Function Func) |
Calls a function object for every matrix coefficient. | |
template<class Function > | |
Function | pforEach (Function Func) |
Calls a function object for every matrix element. | |
template<class Function > | |
Function | pforEach (Function Func) const |
Calls a function object for every matrix coefficient. | |
template<class Function > | |
Function | pforEach (Function Func) const |
Calls a function object for every matrix element. | |
tSize | rows () const |
Returns the matrix dimensions. | |
tMatrix & | set (tSize row, tSize col, const tElement &Value) |
Method sets value of element at (row, col). | |
CStaticMatrix & | set (tSize Row, tSize Col, const T &Value) |
Sets the element of matrix at the position [Row][Col]. | |
tMatrix & | set (tSize i, const tElement &Value) |
Sets the subscripted matrix coefficient. | |
CStaticMatrix & | set (tSize i, const T &Value) |
Sets the subscripted voxel. | |
CStaticMatrix & | transpose (const CStaticMatrix< T, N, M > &Matrix) |
Makes this to be transpose of a given matrix. | |
CStaticMatrix & | unit () |
Makes the matrix unit. | |
CStaticMatrix & | zeros () |
Zeros the matrix. | |
~CStaticMatrix () | |
Destructor. | |
Protected Attributes | |
tStorage | m_Matrix |
Underlying matrix data (see the Eigen math library). |
Class template for a two dimensional static row-major dense matrix.
typedef CMatrixBase<CStaticMatrix<T, M, N> > mds::math::CStaticMatrix< T, M, N >::tBase |
Base class.
typedef T mds::math::CStaticMatrix< T, M, N >::tElement |
Matrix element type.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
typedef CStaticMatrix< T, M, N > mds::math::CMatrixBase< CStaticMatrix< T, M, N > >::tMatrix [inherited] |
Matrix type.
typedef Eigen::Matrix<tElement, M, N, Eigen::RowMajor> mds::math::CStaticMatrix< T, M, N >::tStorage |
Underlying matrix data (see the Eigen math library).
anonymous enum |
Templates that require members of the CStaticMatrix class can use this enum to check the existence.
CStaticMatrix::CStaticMatrix | ( | ) |
Declare iterator types tIterator and tConstIterator.
Constructor.
mds::math::CStaticMatrix< T, M, N >::CStaticMatrix | ( | const CStaticMatrix< U, M, N > & | Matrix | ) |
Copy constructor.
mds::math::CStaticMatrix< T, M, N >::CStaticMatrix | ( | const Eigen::MatrixBase< Derived > & | Matrix | ) |
Conversion constructor.
mds::math::CStaticMatrix< T, M, N >::CStaticMatrix | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Copy constructor specialization.
mds::math::CStaticMatrix< T, M, N >::~CStaticMatrix | ( | ) |
Destructor.
mds::math::CStaticMatrix< T, M, N >::CStaticMatrix | ( | const CStaticMatrix< U, M, N > & | Matrix | ) |
mds::math::CStaticMatrix< T, M, N >::CStaticMatrix | ( | const Eigen::MatrixBase< Derived > & | Matrix | ) |
CStaticMatrix< T, M, N > & CStaticMatrix::abs | ( | ) |
Makes absolute value of all elements.
tStorage& mds::math::CStaticMatrix< T, M, N >::asEigen | ( | ) |
Returns reference to the underlying matrix data (see the Eigen math library).
const tStorage& mds::math::CStaticMatrix< T, M, N >::asEigen | ( | ) | const |
T& mds::math::CStaticMatrix< T, M, N >::at | ( | tSize | Row, |
tSize | Col | ||
) |
Returns reference to the element [Row][Col].
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
const T& mds::math::CStaticMatrix< T, M, N >::at | ( | tSize | row, |
tSize | col | ||
) | const |
Method returns element (by value) at (row, col).
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
T& mds::math::CStaticMatrix< T, M, N >::at | ( | tSize | i | ) |
Returns the subscripted pixel.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
const T& mds::math::CStaticMatrix< T, M, N >::at | ( | tSize | i | ) | const |
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tSize mds::math::CStaticMatrix< T, M, N >::cols | ( | ) | const |
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
CStaticMatrix< T, M, N > & CStaticMatrix::fill | ( | const T & | Value | ) |
Fills the matrix using a given value.
Function mds::math::CStaticMatrix< T, M, N >::forEach | ( | Function | Func | ) |
Calls a function object for every matrix coefficient.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::forEach | ( | Function | Func | ) | const |
Calls a function object for every matrix coefficient.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::forEach | ( | Function | Func | ) |
Calls a function object for every matrix element.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::forEach | ( | Function | Func | ) | const |
Calls a function object for every matrix element.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tSize mds::math::CStaticMatrix< T, M, N >::getColOffset | ( | ) | const |
Returns column offset.
In other words, offset between two neighbouring elements in a matrix row.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
T* mds::math::CStaticMatrix< T, M, N >::getColPtr | ( | tSize | Col | ) |
Returns pointer to the first element of matrix column.
const T* mds::math::CStaticMatrix< T, M, N >::getColPtr | ( | tSize | Col | ) | const |
tSize mds::math::CStaticMatrix< T, M, N >::getIdx | ( | tSize | Row, |
tSize | Col | ||
) | const |
Calculates index of a specified pixel.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tMatrix& mds::math::CMatrixBase< CStaticMatrix< T, M, N > >::getImpl | ( | ) | [inherited] |
Returns reference to the matrix implementation.
const tMatrix& mds::math::CMatrixBase< CStaticMatrix< T, M, N > >::getImpl | ( | ) | const [inherited] |
tSize mds::math::CStaticMatrix< T, M, N >::getNumOfCols | ( | ) | const |
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tSize mds::math::CStaticMatrix< T, M, N >::getNumOfRows | ( | ) | const |
Returns the matrix dimensions.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
T* mds::math::CStaticMatrix< T, M, N >::getPtr | ( | ) |
Returns pointer to the first matrix element.
const T* mds::math::CStaticMatrix< T, M, N >::getPtr | ( | ) | const |
T* mds::math::CStaticMatrix< T, M, N >::getPtr | ( | tSize | Row, |
tSize | Col | ||
) |
Returns pointer to the given element.
const T* mds::math::CStaticMatrix< T, M, N >::getPtr | ( | tSize | Row, |
tSize | Col | ||
) | const |
tSize mds::math::CStaticMatrix< T, M, N >::getRowOffset | ( | ) | const |
Returns row offset.
In other words, offset between two neighbouring elements in a matrix column.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
T* mds::math::CStaticMatrix< T, M, N >::getRowPtr | ( | tSize | Row | ) |
Returns pointer to the first element of matrix row.
const T* mds::math::CStaticMatrix< T, M, N >::getRowPtr | ( | tSize | Row | ) | const |
bool mds::math::CStaticMatrix< T, M, N >::isSquare | ( | ) | const |
Returns true of the matrix is square.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::mult | ( | const CStaticMatrix< T, M, K > & | Matrix1, |
const CStaticMatrix< T, K, N > & | Matrix2 | ||
) |
Matrix multiplication.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::mult | ( | const CStaticMatrix< T, M, K > & | m1, |
const CStaticMatrix< T, K, N > & | m2 | ||
) |
CStaticMatrix< T, M, N > & CStaticMatrix::multAdd | ( | const CStaticMatrix< T, M, N > & | Matrix, |
const T & | Scalar | ||
) |
Provides operation this += Matrix * Scalar.
CStaticMatrix< T, M, N > & CStaticMatrix::ones | ( | ) |
Sets all elements to one.
T& mds::math::CStaticMatrix< T, M, N >::operator() | ( | tSize | Row, |
tSize | Col | ||
) |
Returns reference to the element [Row][Col].
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
const T& mds::math::CStaticMatrix< T, M, N >::operator() | ( | tSize | row, |
tSize | col | ||
) | const |
Method returns element (by value) at (row, col).
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
T& mds::math::CStaticMatrix< T, M, N >::operator() | ( | tSize | i | ) |
Returns the subscripted pixel.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
const T& mds::math::CStaticMatrix< T, M, N >::operator() | ( | tSize | i | ) | const |
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator*= | ( | const CScalar< U > & | c | ) |
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator*= | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Element wise product.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator*= | ( | const CScalar< U > & | c | ) |
Multiplies all elements by scalar.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator+= | ( | const CScalar< U > & | c | ) |
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator+= | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Element wise addition.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator+= | ( | const CScalar< U > & | c | ) |
Adds scalar to all elements.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator-= | ( | const CScalar< U > & | c | ) |
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator-= | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Element wise subtraction.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator-= | ( | const CScalar< U > & | c | ) |
Subtracts scalar to all elements.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator/= | ( | const CScalar< U > & | c | ) |
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator/= | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Element wise addition.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator/= | ( | const CScalar< U > & | c | ) |
Divides all elements by scalar.
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator= | ( | const CStaticMatrix< U, M, N > & | Matrix | ) |
CStaticMatrix<T,M,N>& mds::math::CStaticMatrix< T, M, N >::operator= | ( | const Eigen::MatrixBase< Derived > & | Matrix | ) |
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator= | ( | const CStaticMatrix< U, M, N > & | Matrix | ) |
Assignment operator.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator= | ( | const Eigen::MatrixBase< Derived > & | Matrix | ) |
Assignment operator.
CStaticMatrix< T, M, N > & mds::math::CStaticMatrix< T, M, N >::operator= | ( | const CStaticMatrix< T, M, N > & | Matrix | ) |
Assignment operator specialization.
Function mds::math::CStaticMatrix< T, M, N >::pforEach | ( | Function | Func | ) |
Calls a function object for every matrix coefficient.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::pforEach | ( | Function | Func | ) |
Calls a function object for every matrix element.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every matrix coefficient.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
Function mds::math::CStaticMatrix< T, M, N >::pforEach | ( | Function | Func | ) | const |
Calls a function object for every matrix element.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tSize mds::math::CStaticMatrix< T, M, N >::rows | ( | ) | const |
Returns the matrix dimensions.
Reimplemented from mds::math::CMatrixBase< CStaticMatrix< T, M, N > >.
tMatrix& mds::math::CMatrixBase< CStaticMatrix< T, M, N > >::set | ( | tSize | row, |
tSize | col, | ||
const tElement & | Value | ||
) | [inherited] |
Method sets value of element at (row, col).
CStaticMatrix& mds::math::CStaticMatrix< T, M, N >::set | ( | tSize | Row, |
tSize | Col, | ||
const T & | Value | ||
) |
Sets the element of matrix at the position [Row][Col].
tMatrix& mds::math::CMatrixBase< CStaticMatrix< T, M, N > >::set | ( | tSize | i, |
const tElement & | Value | ||
) | [inherited] |
Sets the subscripted matrix coefficient.
CStaticMatrix& mds::math::CStaticMatrix< T, M, N >::set | ( | tSize | i, |
const T & | Value | ||
) |
Sets the subscripted voxel.
CStaticMatrix< T, M, N > & CStaticMatrix::transpose | ( | const CStaticMatrix< T, N, M > & | Matrix | ) |
Makes this to be transpose of a given matrix.
CStaticMatrix< T, M, N > & CStaticMatrix::unit | ( | ) |
Makes the matrix unit.
CStaticMatrix< T, M, N > & CStaticMatrix::zeros | ( | ) |
Zeros the matrix.
tStorage mds::math::CStaticMatrix< T, M, N >::m_Matrix [protected] |
Underlying matrix data (see the Eigen math library).