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

Base class for all two-dimensional sparse matrixes. More...

#include <mdsSparseMatrixBase.h>

Inheritance diagram for mds::math::CSparseMatrixBase< M >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef CSparseMatrixTraits< M >
::tElement 
tElement
 Element type.
typedef M tMatrix
 Matrix type.

Public Member Functions

tElementat (tSize row, tSize col)
 Method returns reference to the element at (row, col).
const tElement at (tSize row, tSize col) const
 Method returns element (by value) at (row, col).
tSize cols () const
template<class Function >
Function forEach (Function Func) const
 Calls a function object for every matrix element.
template<class Function >
Function forEachRef (Function Func)
 Calls a function object for every non-dominant matrix element.
tElement getDominant () const
 Returns the matrix dominant value.
tMatrixgetImpl ()
 Returns reference to the matrix implementation.
const tMatrixgetImpl () const
tSize getNumOfCols () const
tSize getNumOfRows () const
 Returns the matrix size (dimensions).
tElementoperator() (tSize row, tSize col)
 Method returns reference to the element at (row, col).
const tElement operator() (tSize row, tSize col) const
 Method returns element (by value) at (row, col).
template<class Function >
Function pforEach (Function Func) const
 Calls a function object for every matrix element.
template<class Function >
Function pforEachRef (Function Func)
 Calls a function object for every non-dominant matrix element.
tSize rows () const
 Returns the matrix size (dimensions).
tMatrixset (tSize row, tSize col, const tElement &Value)
 Method sets value of element at (row, col).

Protected Member Functions

 CSparseMatrixBase ()
 Default constructor.
 CSparseMatrixBase (const CSparseMatrixBase &)
 Copy constructor.
CSparseMatrixBaseoperator= (const CSparseMatrixBase &)
 Assignment operator.

Detailed Description

template<class M>
class mds::math::CSparseMatrixBase< M >

Base class for all two-dimensional sparse matrixes.


Member Typedef Documentation

template<class M>
typedef M mds::math::CSparseMatrixBase< M >::tMatrix

Matrix type.


Constructor & Destructor Documentation

template<class M>
mds::math::CSparseMatrixBase< M >::CSparseMatrixBase ( ) [protected]

Default constructor.

template<class M>
mds::math::CSparseMatrixBase< M >::CSparseMatrixBase ( const CSparseMatrixBase< M > &  ) [protected]

Copy constructor.


Member Function Documentation

template<class M>
tElement& mds::math::CSparseMatrixBase< M >::at ( tSize  row,
tSize  col 
)

Method returns reference to the element at (row, col).

template<class M>
const tElement mds::math::CSparseMatrixBase< M >::at ( tSize  row,
tSize  col 
) const

Method returns element (by value) at (row, col).

Reimplemented in mds::math::CSparseMatrixAlt< T >, and mds::math::CSparseMatrix< T >.

template<class M>
tSize mds::math::CSparseMatrixBase< M >::cols ( ) const
template<class M>
template<class Function >
Function mds::math::CSparseMatrixBase< M >::forEach ( Function  Func) const
template<class M>
template<class Function >
Function mds::math::CSparseMatrixBase< M >::forEachRef ( Function  Func)

Calls a function object for every non-dominant matrix element.

Reimplemented in mds::math::CSparseMatrixAlt< T >, mds::math::CSparseMatrix< T >, mds::math::CSparseMatrixAlt< T >, and mds::math::CSparseMatrix< T >.

template<class M>
tElement mds::math::CSparseMatrixBase< M >::getDominant ( ) const

Returns the matrix dominant value.

Reimplemented in mds::math::CSparseMatrixAlt< T >.

template<class M>
tMatrix& mds::math::CSparseMatrixBase< M >::getImpl ( )

Returns reference to the matrix implementation.

template<class M>
const tMatrix& mds::math::CSparseMatrixBase< M >::getImpl ( ) const
template<class M>
tSize mds::math::CSparseMatrixBase< M >::getNumOfCols ( ) const
template<class M>
tSize mds::math::CSparseMatrixBase< M >::getNumOfRows ( ) const

Returns the matrix size (dimensions).

Reimplemented in mds::math::CSparseMatrixAlt< T >, and mds::math::CSparseMatrix< T >.

template<class M>
tElement& mds::math::CSparseMatrixBase< M >::operator() ( tSize  row,
tSize  col 
)

Method returns reference to the element at (row, col).

template<class M>
const tElement mds::math::CSparseMatrixBase< M >::operator() ( tSize  row,
tSize  col 
) const

Method returns element (by value) at (row, col).

Reimplemented in mds::math::CSparseMatrix< T >, and mds::math::CSparseMatrixAlt< T >.

template<class M>
CSparseMatrixBase& mds::math::CSparseMatrixBase< M >::operator= ( const CSparseMatrixBase< M > &  ) [protected]

Assignment operator.

template<class M>
template<class Function >
Function mds::math::CSparseMatrixBase< M >::pforEach ( Function  Func) const

Calls a function object for every matrix element.

  • Parallel version.

Reimplemented in mds::math::CSparseMatrixAlt< T >, mds::math::CSparseMatrix< T >, mds::math::CSparseMatrix< T >, and mds::math::CSparseMatrixAlt< T >.

template<class M>
template<class Function >
Function mds::math::CSparseMatrixBase< M >::pforEachRef ( Function  Func)

Calls a function object for every non-dominant matrix element.

  • Parallel version.

Reimplemented in mds::math::CSparseMatrixAlt< T >, mds::math::CSparseMatrix< T >, mds::math::CSparseMatrixAlt< T >, and mds::math::CSparseMatrix< T >.

template<class M>
tSize mds::math::CSparseMatrixBase< M >::rows ( ) const

Returns the matrix size (dimensions).

Reimplemented in mds::math::CSparseMatrixAlt< T >, and mds::math::CSparseMatrix< T >.

template<class M>
tMatrix& mds::math::CSparseMatrixBase< M >::set ( tSize  row,
tSize  col,
const tElement Value 
)

Method sets value of element at (row, col).


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