Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)

Classes | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr > Class Template Reference

STL like iterator for hashed sparse matrices. More...

#include <hashedSMatrixIterator.hh>

Inheritance diagram for concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >:
Inheritance graph
[legend]
Collaboration diagram for concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >:
Collaboration graph
[legend]

List of all members.

Classes

struct  MatrixType
 Non-constant matrix for non-constant iterator. More...
struct  MatrixType< _Tp_, const _Tp_ &, const _Tp_ * >
 Constant matrix for constant iterator. More...

Public Types

typedef _Matrix_iterator_base
< _Tp, _Ref, _Ptr > 
_Base
typedef _HashedSMatrix_iterator _Self
typedef
_HashedSMatrix_iterator< _Tp,
const _Tp &, const _Tp * > 
const_iterator
typedef ptrdiff_t difference_type
typedef
_HashedSMatrix_iterator< _Tp,
_Tp &, _Tp * > 
iterator
typedef std::forward_iterator_tag iterator_category
typedef MatrixType< _Tp, _Ref,
_Ptr >::type 
matrix_type
typedef _Ptr pointer
typedef _Ref reference
typedef _Base::return_type return_type
typedef size_t size_type
typedef _Tp value_type

Public Member Functions

 _HashedSMatrix_iterator (matrix_type &m, const uint r=0)
 Constructor.
 _HashedSMatrix_iterator ()
 Constructor. Iterator stands at the end of any matrix.
template<class _RefR , class _PtrR >
 _HashedSMatrix_iterator (const _HashedSMatrix_iterator< _Tp, _RefR, _PtrR > &__x)
 Copy constructor. Also from iterator to constant iterator.
uint col () const
 Column.
int hashBits () const
bool last () const
 Returns true, if iterator is behind the last entry.
const uint nofCols () const
 Number of columns.
int nofPages () const
const uint nofRows () const
 Number of rows.
reference operator* () const
 Dereferencation.
_Self operator++ (int)
_Selfoperator++ ()
 Increment operator.
pointer operator-> () const
 Returns a pointer to the value.
template<class _RefR , class _PtrR >
_Selfoperator= (const _HashedSMatrix_iterator< _Tp, _RefR, _PtrR > &__x)
 Assignment.
int p () const
HashedSparseMatrix< _Tp >::Value ** page () const
int pNextRow () const
int pPerRow () const
uint row () const
 Row.
HashedSparseMatrix< _Tp >::Value * v () const
 Data defining the position of the iterator.

Protected Member Functions

virtual std::ostream & info (std::ostream &os) const
 Returns information in an output stream.

Protected Attributes

uint col_
bool last_
 Iterator is behind the last entrance.
const uint nofCols_
const uint nofRows_
 Number of rows and columns.
uint row_
 Current row and column.

Private Attributes

int hashBits_
 Hash bits, number of pages per row (2 ^ hash bits), number of pages.
int nofPages_
int p_
 Current page number, first page number of next row.
HashedSparseMatrix< _Tp >::Value ** page_
 Pointer to the first entrance in the page.
int pNextRow_
int pPerRow_
HashedSparseMatrix< _Tp >::Value * v_
 Pointer to the current entrance. If its zero, the end is reached.

Detailed Description

template<class _Tp, class _Ref, class _Ptr>
class concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >

STL like iterator for hashed sparse matrices.

Author:
Kersten Schmidt, 2005
Examples:

matfileTutorial.cc.

Definition at line 26 of file hashedSMatrixIterator.hh.


Member Typedef Documentation

template<class _Tp, class _Ref, class _Ptr>
typedef _Matrix_iterator_base<_Tp, _Ref, _Ptr> concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::_Base

Definition at line 42 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _HashedSMatrix_iterator concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::_Self

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 41 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _HashedSMatrix_iterator<_Tp, const _Tp&,const _Tp*> concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::const_iterator

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 30 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef ptrdiff_t concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::difference_type

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 40 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _HashedSMatrix_iterator<_Tp, _Tp&, _Tp*> concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::iterator

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 29 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef std::forward_iterator_tag concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::iterator_category

Definition at line 33 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef MatrixType<_Tp, _Ref, _Ptr>::type concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::matrix_type

Definition at line 43 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _Ptr concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::pointer

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 37 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _Ref concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::reference

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 38 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _Base::return_type concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::return_type

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 44 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef size_t concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::size_type

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 39 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
typedef _Tp concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::value_type

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

Definition at line 36 of file hashedSMatrixIterator.hh.


Constructor & Destructor Documentation

template<class _Tp, class _Ref, class _Ptr>
concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::_HashedSMatrix_iterator ( matrix_type m,
const uint  r = 0 
)

Constructor.

Parameters:
mmatrix
rrow
template<class _Tp, class _Ref, class _Ptr>
concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::_HashedSMatrix_iterator ( )

Constructor. Iterator stands at the end of any matrix.

template<class _Tp, class _Ref, class _Ptr>
template<class _RefR , class _PtrR >
concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::_HashedSMatrix_iterator ( const _HashedSMatrix_iterator< _Tp, _RefR, _PtrR > &  __x) [inline]

Copy constructor. Also from iterator to constant iterator.

Definition at line 57 of file hashedSMatrixIterator.hh.


Member Function Documentation

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::col ( ) const [inline, inherited]

Column.

Definition at line 73 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::hashBits ( ) const [inline]

Definition at line 92 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
virtual std::ostream& concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::info ( std::ostream &  os) const [protected, virtual]

Returns information in an output stream.

Reimplemented from concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >.

template<class _Tp, class _Ref, class _Ptr>
bool concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::last ( ) const [inline, inherited]

Returns true, if iterator is behind the last entry.

Definition at line 75 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols ( ) const [inline, inherited]

Number of columns.

Definition at line 69 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::nofPages ( ) const [inline]

Definition at line 94 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows ( ) const [inline, inherited]

Number of rows.

Definition at line 67 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
reference concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::operator* ( ) const [inline]

Dereferencation.

Definition at line 65 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
_Self& concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::operator++ ( )

Increment operator.

template<class _Tp, class _Ref, class _Ptr>
_Self concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::operator++ ( int  )
template<class _Tp, class _Ref, class _Ptr>
pointer concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::operator-> ( ) const [inline]

Returns a pointer to the value.

Definition at line 70 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
template<class _RefR , class _PtrR >
_Self& concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::operator= ( const _HashedSMatrix_iterator< _Tp, _RefR, _PtrR > &  __x) [inline]

Assignment.

Definition at line 77 of file hashedSMatrixIterator.hh.

Here is the call graph for this function:

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::p ( ) const [inline]

Definition at line 95 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
HashedSparseMatrix<_Tp>::Value** concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::page ( ) const [inline]

Definition at line 97 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::pNextRow ( ) const [inline]

Definition at line 96 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::pPerRow ( ) const [inline]

Definition at line 93 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::row ( ) const [inline, inherited]

Row.

Definition at line 71 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
HashedSparseMatrix<_Tp>::Value* concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::v ( ) const [inline]

Data defining the position of the iterator.

Definition at line 91 of file hashedSMatrixIterator.hh.


Member Data Documentation

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::col_ [protected, inherited]

Definition at line 91 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::hashBits_ [private]

Hash bits, number of pages per row (2 ^ hash bits), number of pages.

Definition at line 104 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
bool concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::last_ [protected, inherited]

Iterator is behind the last entrance.

Definition at line 93 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols_ [protected, inherited]

Definition at line 89 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::nofPages_ [private]

Definition at line 104 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
const uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows_ [protected, inherited]

Number of rows and columns.

Definition at line 89 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::p_ [private]

Current page number, first page number of next row.

Definition at line 106 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
HashedSparseMatrix<_Tp>::Value** concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::page_ [private]

Pointer to the first entrance in the page.

Definition at line 108 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::pNextRow_ [private]

Definition at line 106 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
int concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::pPerRow_ [private]

Definition at line 104 of file hashedSMatrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
uint concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::row_ [protected, inherited]

Current row and column.

Definition at line 91 of file matrixIterator.hh.

template<class _Tp, class _Ref, class _Ptr>
HashedSparseMatrix<_Tp>::Value* concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr >::v_ [private]

Pointer to the current entrance. If its zero, the end is reached.

Definition at line 102 of file hashedSMatrixIterator.hh.


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

Home | Doxygen Documentation | Tutorials | Developer Tools (restricted)