Two-dimensional matrix template. More...
#include <cmtkMatrix.h>
Public Types | |
typedef std::vector< T * > | Superclass |
Superclass. | |
typedef Matrix2D< T > | Self |
This class. | |
typedef SmartPointer< Self > | SmartPtr |
Smart pointer to this class. | |
typedef std::vector< T * > | RowVectorType |
Row vector type. | |
Public Member Functions | |
Matrix2D () | |
Default constructor. | |
Matrix2D (const size_t dims1, const size_t dims0, const T *data=NULL) | |
Constructor: allocate and create cross-references. | |
Matrix2D (const Matrix2D< T > &other) | |
Copy constructor. | |
~Matrix2D () | |
Destructor: free allocated array. | |
size_t | GetNumberOfRows () const |
Get number of rows. | |
size_t | GetNumberOfColumns () const |
Get number of columns. | |
void | Resize (const size_t numberOfRows, const size_t numberOfColumns) |
Resize the matrix. | |
void | SetAllToZero () |
Reset all values to zero. | |
void | SetAll (const T value) |
Set all values. | |
Matrix2D< T > & | operator= (const Matrix2D< T > &other) |
Copy another matrix. | |
Private Attributes | |
size_t | m_NumberOfElements |
Size of the allocated array. | |
size_t | m_NumberOfColumns |
Number of rows. | |
size_t | m_NumberOfRows |
Number of rows. |
Two-dimensional matrix template.
Definition at line 105 of file cmtkMatrix.h.
typedef std::vector<T*> cmtk::Matrix2D< T >::RowVectorType |
Row vector type.
Definition at line 120 of file cmtkMatrix.h.
typedef Matrix2D<T> cmtk::Matrix2D< T >::Self |
typedef SmartPointer<Self> cmtk::Matrix2D< T >::SmartPtr |
Smart pointer to this class.
Reimplemented in cmtk::Matrix3D< T >.
Definition at line 117 of file cmtkMatrix.h.
typedef std::vector<T*> cmtk::Matrix2D< T >::Superclass |
cmtk::Matrix2D< T >::Matrix2D | ( | ) | [inline] |
Default constructor.
Definition at line 123 of file cmtkMatrix.h.
cmtk::Matrix2D< T >::Matrix2D | ( | const size_t | dims1, |
const size_t | dims0, | ||
const T * | data = NULL |
||
) | [inline] |
Constructor: allocate and create cross-references.
Definition at line 134 of file cmtkMatrix.h.
cmtk::Matrix2D< T >::Matrix2D | ( | const Matrix2D< T > & | other ) | [inline] |
Copy constructor.
Definition at line 150 of file cmtkMatrix.h.
cmtk::Matrix2D< T >::~Matrix2D | ( | ) | [inline] |
Destructor: free allocated array.
Definition at line 165 of file cmtkMatrix.h.
size_t cmtk::Matrix2D< T >::GetNumberOfColumns | ( | ) | const [inline] |
Get number of columns.
Get this from underlying Array.
Definition at line 183 of file cmtkMatrix.h.
Referenced by cmtk::MathUtil::ComputeEigensystem(), cmtk::MathUtil::ComputeEigenvalues(), cmtk::Matrix3D< T >::operator=(), cmtk::Matrix2D< T * >::operator=(), and cmtk::QRDecomposition< TFloat >::QRDecomposition().
size_t cmtk::Matrix2D< T >::GetNumberOfRows | ( | ) | const [inline] |
Get number of rows.
Definition at line 175 of file cmtkMatrix.h.
Referenced by cmtk::MathUtil::ComputeEigensystem(), cmtk::MathUtil::ComputeEigenvalues(), cmtk::Matrix3D< T >::operator=(), cmtk::Matrix2D< T * >::operator=(), and cmtk::QRDecomposition< TFloat >::QRDecomposition().
Matrix2D<T>& cmtk::Matrix2D< T >::operator= | ( | const Matrix2D< T > & | other ) | [inline] |
Copy another matrix.
Definition at line 227 of file cmtkMatrix.h.
void cmtk::Matrix2D< T >::Resize | ( | const size_t | numberOfRows, |
const size_t | numberOfColumns | ||
) | [inline] |
Resize the matrix.
Definition at line 189 of file cmtkMatrix.h.
void cmtk::Matrix2D< T >::SetAll | ( | const T | value ) | [inline] |
Set all values.
Definition at line 218 of file cmtkMatrix.h.
void cmtk::Matrix2D< T >::SetAllToZero | ( | ) | [inline] |
Reset all values to zero.
Reimplemented in cmtk::Matrix3D< T >.
Definition at line 212 of file cmtkMatrix.h.
size_t cmtk::Matrix2D< T >::m_NumberOfColumns [private] |
Number of rows.
Definition at line 239 of file cmtkMatrix.h.
Referenced by cmtk::Matrix2D< T * >::Matrix2D().
size_t cmtk::Matrix2D< T >::m_NumberOfElements [private] |
Size of the allocated array.
Reimplemented in cmtk::Matrix3D< T >.
Definition at line 236 of file cmtkMatrix.h.
Referenced by cmtk::Matrix2D< T * >::Matrix2D().
size_t cmtk::Matrix2D< T >::m_NumberOfRows [private] |
Number of rows.
Definition at line 242 of file cmtkMatrix.h.
Referenced by cmtk::Matrix2D< T * >::Matrix2D().