Public Types | Public Member Functions | Private Attributes

cmtk::Matrix2D< T > Class Template Reference
[cmtkBase Library]

Two-dimensional matrix template. More...

#include <cmtkMatrix.h>

Inheritance diagram for cmtk::Matrix2D< T >:
Inheritance graph
[legend]
Collaboration diagram for cmtk::Matrix2D< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< T * > Superclass
 Superclass.
typedef Matrix2D< T > Self
 This class.
typedef SmartPointer< SelfSmartPtr
 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.

Detailed Description

template<class T>
class cmtk::Matrix2D< T >

Two-dimensional matrix template.

Definition at line 105 of file cmtkMatrix.h.


Member Typedef Documentation

template<class T>
typedef std::vector<T*> cmtk::Matrix2D< T >::RowVectorType

Row vector type.

Definition at line 120 of file cmtkMatrix.h.

template<class T>
typedef Matrix2D<T> cmtk::Matrix2D< T >::Self

This class.

Reimplemented in cmtk::Matrix3D< T >.

Definition at line 114 of file cmtkMatrix.h.

template<class T>
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.

template<class T>
typedef std::vector<T*> cmtk::Matrix2D< T >::Superclass

Superclass.

Reimplemented in cmtk::Matrix3D< T >.

Definition at line 111 of file cmtkMatrix.h.


Constructor & Destructor Documentation

template<class T>
cmtk::Matrix2D< T >::Matrix2D (  ) [inline]

Default constructor.

Definition at line 123 of file cmtkMatrix.h.

template<class T>
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.

template<class T>
cmtk::Matrix2D< T >::Matrix2D ( const Matrix2D< T > &  other ) [inline]

Copy constructor.

Definition at line 150 of file cmtkMatrix.h.

template<class T>
cmtk::Matrix2D< T >::~Matrix2D (  ) [inline]

Destructor: free allocated array.

Definition at line 165 of file cmtkMatrix.h.


Member Function Documentation

template<class T>
size_t cmtk::Matrix2D< T >::GetNumberOfColumns (  ) const [inline]
template<class T>
size_t cmtk::Matrix2D< T >::GetNumberOfRows (  ) const [inline]
template<class T>
Matrix2D<T>& cmtk::Matrix2D< T >::operator= ( const Matrix2D< T > &  other ) [inline]

Copy another matrix.

Definition at line 227 of file cmtkMatrix.h.

template<class T>
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.

template<class T>
void cmtk::Matrix2D< T >::SetAll ( const T  value ) [inline]

Set all values.

Definition at line 218 of file cmtkMatrix.h.

template<class T>
void cmtk::Matrix2D< T >::SetAllToZero (  ) [inline]

Reset all values to zero.

Reimplemented in cmtk::Matrix3D< T >.

Definition at line 212 of file cmtkMatrix.h.


Member Data Documentation

template<class T>
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().

template<class T>
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().

template<class T>
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().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines