This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry.
This class allows a very efficient representation of sparse matrixes where each cell is an arbitrary C++ class, but its use must carefully observe the following rules:
Definition at line 51 of file CMatrixTemplateObjects.h.
#include <mrpt/math/CMatrixTemplateObjects.h>

Public Member Functions | |
| CMatrixTemplateObjects (const CMatrixTemplate< T > &m) | |
| Copy constructor. More... | |
| CMatrixTemplateObjects (size_t row=3, size_t col=3) | |
| Constructor. More... | |
| virtual void | setSize (size_t row, size_t col) |
| Changes the size of matrix. More... | |
| virtual | ~CMatrixTemplateObjects () |
| Destructor. More... | |
| void | freeAllObjects () |
| Delete all the objects in the matrix and set all entries to NULL pointers. More... | |
| CMatrixTemplateObjects & | operator= (const CMatrixTemplateObjects &m) |
| Assignment operator. More... | |
| void | setDestroyBehavior (bool freeObjects=true) |
| Sets the behavior on matrix destroy. More... | |
| void | allocAllObjects () |
| Alloc memory for all the non-NULL entries in the matrix. More... | |
Private Attributes | |
| bool | m_freeObjects |
|
inline |
Copy constructor.
Definition at line 59 of file CMatrixTemplateObjects.h.
|
inline |
Constructor.
Definition at line 65 of file CMatrixTemplateObjects.h.
References getColCount(), and getRowCount().
|
inlinevirtual |
Destructor.
Definition at line 82 of file CMatrixTemplateObjects.h.
References mrpt::math::CMatrixTemplateObjects< T >::freeAllObjects(), and mrpt::math::CMatrixTemplateObjects< T >::m_freeObjects.
|
inline |
Alloc memory for all the non-NULL entries in the matrix.
See the general description of the class on the top.
Definition at line 124 of file CMatrixTemplateObjects.h.
References getColCount(), and getRowCount().
|
inline |
Delete all the objects in the matrix and set all entries to NULL pointers.
Definition at line 90 of file CMatrixTemplateObjects.h.
References getColCount(), and getRowCount().
Referenced by mrpt::math::CMatrixTemplateObjects< T >::~CMatrixTemplateObjects().
|
inline |
Assignment operator.
Definition at line 103 of file CMatrixTemplateObjects.h.
References getColCount(), getRowCount(), and mrpt::math::CMatrixTemplate< T >::realloc().
|
inline |
Sets the behavior on matrix destroy.
See the general description of the class on the top.
Definition at line 116 of file CMatrixTemplateObjects.h.
References mrpt::math::CMatrixTemplateObjects< T >::m_freeObjects.
|
inlinevirtual |
Changes the size of matrix.
Definition at line 74 of file CMatrixTemplateObjects.h.
References mrpt::math::CMatrixTemplate< T >::realloc().
|
private |
Definition at line 54 of file CMatrixTemplateObjects.h.
Referenced by mrpt::math::CMatrixTemplateObjects< T >::setDestroyBehavior(), and mrpt::math::CMatrixTemplateObjects< T >::~CMatrixTemplateObjects().
| Page generated by Doxygen 1.8.3.1 for MRPT 0.9.6 SVN: at Mon May 27 08:59:54 UTC 2013 |