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

Sparse matrix iterator. More...

#include <mdsSparseMatrixAltIterator.h>

Inheritance diagram for mds::math::CSparseMatrixAltIterator< M, T >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  { TEMPLATE_PARAMETER_IS_NOT_SPARSE_MATRIX = M::CLASS_SPARSEMATRIX }
 Check that M is a matrix. More...
typedef mds::SSelect
< mds::CTypeTraits< M >
::isConst, typename
tMatrix::tColConstIterator,
typename tMatrix::tColIterator >
::RESULT 
tColumnIterator
 Column iterator.
typedef
CSparseMatrixAltIterator< M, T > 
tDerived
 Iterator type.
typedef T tElement
 Element type.
typedef CIteratorTraits
< CSparseMatrixAltIterator< M,
T > >::tItem 
tItem
 Value (or item) type.
typedef M tMatrix
 Matrix type.

Public Member Functions

void advance ()
 Moves iterator to the next element.
bool atEnd () const
 Returns true if the iterator points after the end.
tSize col () const
 CSparseMatrixAltIterator (tMatrix &Matrix)
 Constructor.
tDerivedgetImpl ()
 Returns reference to the iterator implementation.
const tDerivedgetImpl () const
tSize getSize () const
 Returns size of the volume in voxels.
 operator bool () const
 Returns true if the iterator is valid, i.e. not pointing after the end.
tItemoperator* () const
 Returns reference to the current item.
CIteratorBaseoperator++ ()
CIteratorBase operator++ (int)
tItemoperator-> () const
 Returns pointer to the current item.
tSize row () const
 Returns the current iterator position.
const tElementvalue () const
 Returns the current item.
tElementvaluePtr () const
 Returns pointer to the current item.
tElementvalueRef () const
 Returns reference to the current item.
 ~CSparseMatrixAltIterator ()
 Destructor.

Protected Attributes

tSize m_Col
tColumnIterator m_ColIt
 Iterator true position in sparse column.
tMatrixm_Matrix
 Reference to the matrix;.
tSize m_Row
 Iterator position.

Detailed Description

template<class M, typename T>
class mds::math::CSparseMatrixAltIterator< M, T >

Sparse matrix iterator.


Member Typedef Documentation

template<class M , typename T >
typedef mds::SSelect<mds::CTypeTraits<M>::isConst, typename tMatrix::tColConstIterator, typename tMatrix::tColIterator>::RESULT mds::math::CSparseMatrixAltIterator< M, T >::tColumnIterator

Column iterator.

Iterator type.

template<class M , typename T >
typedef T mds::math::CSparseMatrixAltIterator< M, T >::tElement

Element type.

Value (or item) type.

template<class M , typename T >
typedef M mds::math::CSparseMatrixAltIterator< M, T >::tMatrix

Matrix type.


Member Enumeration Documentation

template<class M , typename T >
anonymous enum

Check that M is a matrix.

You will see name of this enum somewhere in compiler error message if the type M is not matrix.

Enumerator:
TEMPLATE_PARAMETER_IS_NOT_SPARSE_MATRIX 

Constructor & Destructor Documentation

template<class M , typename T >
mds::math::CSparseMatrixAltIterator< M, T >::CSparseMatrixAltIterator ( tMatrix Matrix)

Constructor.

template<class M , typename T >
mds::math::CSparseMatrixAltIterator< M, T >::~CSparseMatrixAltIterator ( )

Destructor.


Member Function Documentation

template<class M , typename T >
void mds::math::CSparseMatrixAltIterator< M, T >::advance ( )

Moves iterator to the next element.

template<class M , typename T >
bool mds::math::CSparseMatrixAltIterator< M, T >::atEnd ( ) const

Returns true if the iterator points after the end.

template<class M , typename T >
tSize mds::math::CSparseMatrixAltIterator< M, T >::col ( ) const

Returns reference to the iterator implementation.

const tDerived& mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::getImpl ( ) const [inherited]
template<class M , typename T >
tSize mds::math::CSparseMatrixAltIterator< M, T >::getSize ( ) const

Returns size of the volume in voxels.

Reimplemented from mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >.

mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::operator bool ( ) const [inherited]

Returns true if the iterator is valid, i.e. not pointing after the end.

tItem& mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::operator* ( ) const [inherited]

Returns reference to the current item.

CIteratorBase& mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::operator++ ( ) [inherited]
CIteratorBase mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::operator++ ( int  ) [inherited]
tItem* mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >::operator-> ( ) const [inherited]

Returns pointer to the current item.

template<class M , typename T >
tSize mds::math::CSparseMatrixAltIterator< M, T >::row ( ) const

Returns the current iterator position.

template<class M , typename T >
const tElement& mds::math::CSparseMatrixAltIterator< M, T >::value ( ) const

Returns the current item.

Reimplemented from mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >.

template<class M , typename T >
tElement* mds::math::CSparseMatrixAltIterator< M, T >::valuePtr ( ) const

Returns pointer to the current item.

Reimplemented from mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >.

template<class M , typename T >
tElement& mds::math::CSparseMatrixAltIterator< M, T >::valueRef ( ) const

Returns reference to the current item.

Reimplemented from mds::base::CIteratorBase< CSparseMatrixAltIterator< M, T > >.


Member Data Documentation

template<class M , typename T >
tSize mds::math::CSparseMatrixAltIterator< M, T >::m_Col [protected]
template<class M , typename T >
tColumnIterator mds::math::CSparseMatrixAltIterator< M, T >::m_ColIt [protected]

Iterator true position in sparse column.

template<class M , typename T >
tMatrix& mds::math::CSparseMatrixAltIterator< M, T >::m_Matrix [protected]

Reference to the matrix;.

template<class M , typename T >
tSize mds::math::CSparseMatrixAltIterator< M, T >::m_Row [protected]

Iterator position.


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