Class documentation of Concepts

Loading...
Searching...
No Matches
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr > Class Template Reference

#include <matrixIterator.hh>

Inheritance diagram for concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >:
concepts::OutputOperator concepts::_HashedSMatrix_iterator< _Tp, _Ref, _Ptr > concepts::_Matrix_iterator< _Tp, _Ref, _Ptr >

Classes

struct  ReturnType
 
struct  ReturnType< const _Tp_ & >
 

Public Types

typedef _Matrix_iterator_base< _Tp, _Tp &, _Tp * > iterator
 
typedef _Matrix_iterator_base< _Tp, const _Tp &, const _Tp * > const_iterator
 
typedef _Tp value_type
 
typedef _Ptr pointer
 
typedef _Ref reference
 
typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef ReturnType< _Ref >::type return_type
 
typedef _Matrix_iterator_base _Self
 

Public Member Functions

 _Matrix_iterator_base (const unsigned int nofRows, const unsigned int nofCols, const unsigned int r, const unsigned int c)
 
 _Matrix_iterator_base ()
 Constructor. Iterator stands at the end of any matrix.
 
template<class _RefR , class _PtrR >
 _Matrix_iterator_base (const _Matrix_iterator_base< _Tp, _RefR, _PtrR > &__x)
 
const unsigned int nofRows () const
 Number of rows.
 
const unsigned int nofCols () const
 Number of columns.
 
unsigned int row () const
 Row.
 
unsigned int col () const
 Column.
 
bool last () const
 Returns true, if iterator is behind the last entry.
 
_Selfoperator= (const iterator &__x)
 Assignment.
 

Protected Member Functions

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

Protected Attributes

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

Detailed Description

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

Base class for STL like iterator for matrices

Author
Kersten Schmidt, 2005

Definition at line 28 of file matrixIterator.hh.

Member Typedef Documentation

◆ _Self

◆ const_iterator

Definition at line 31 of file matrixIterator.hh.

◆ difference_type

Definition at line 44 of file matrixIterator.hh.

◆ iterator

◆ pointer

Definition at line 41 of file matrixIterator.hh.

◆ reference

Definition at line 42 of file matrixIterator.hh.

◆ return_type

Definition at line 45 of file matrixIterator.hh.

◆ size_type

Definition at line 43 of file matrixIterator.hh.

◆ value_type

Definition at line 40 of file matrixIterator.hh.

Constructor & Destructor Documentation

◆ _Matrix_iterator_base() [1/2]

template<class _Tp , class _Ref , class _Ptr >
concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::_Matrix_iterator_base ( const unsigned int  nofRows,
const unsigned int  nofCols,
const unsigned int  r,
const unsigned int  c 
)

Constructor

Parameters
nofRowsnumber of rows of the matrix
nofColsnumber of columns of the matrix
rrow
ccolumn

◆ _Matrix_iterator_base() [2/2]

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

Copy constructor.

Can copy an iterator to an constant one as well.

Definition at line 64 of file matrixIterator.hh.

Member Function Documentation

◆ col()

template<class _Tp , class _Ref , class _Ptr >
unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::col ( ) const
inline

Column.

Definition at line 75 of file matrixIterator.hh.

◆ info()

template<class _Tp , class _Ref , class _Ptr >
std::ostream & concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::info ( std::ostream &  os) const
protectedvirtual

◆ last()

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

Returns true, if iterator is behind the last entry.

Definition at line 77 of file matrixIterator.hh.

◆ nofCols()

template<class _Tp , class _Ref , class _Ptr >
const unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols ( ) const
inline

Number of columns.

Definition at line 71 of file matrixIterator.hh.

◆ nofRows()

template<class _Tp , class _Ref , class _Ptr >
const unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows ( ) const
inline

Number of rows.

Definition at line 69 of file matrixIterator.hh.

◆ operator=()

Assignment.

Definition at line 80 of file matrixIterator.hh.

◆ row()

template<class _Tp , class _Ref , class _Ptr >
unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::row ( ) const
inline

Row.

Definition at line 73 of file matrixIterator.hh.

Member Data Documentation

◆ col_

Definition at line 93 of file matrixIterator.hh.

◆ last_

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

Iterator is behind the last entrance.

Definition at line 95 of file matrixIterator.hh.

◆ nofCols_

template<class _Tp , class _Ref , class _Ptr >
const unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofCols_
protected

Definition at line 91 of file matrixIterator.hh.

◆ nofRows_

template<class _Tp , class _Ref , class _Ptr >
const unsigned int concepts::_Matrix_iterator_base< _Tp, _Ref, _Ptr >::nofRows_
protected

Number of rows and columns.

Definition at line 91 of file matrixIterator.hh.

◆ row_

Current row and column.

Definition at line 93 of file matrixIterator.hh.


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