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

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

STL like iterator for sub matrices. More...

#include <subMatrixIterator.hh>

Inheritance diagram for concepts::_SubMatrix_iterator< F, _Ref, _Ptr >:
Inheritance graph
[legend]
Collaboration diagram for concepts::_SubMatrix_iterator< F, _Ref, _Ptr >:
Collaboration graph
[legend]

List of all members.

Classes

struct  MatrixType
 Non-constant matrix for non-constant iterator. More...
struct  MatrixType< F_, const F::type &, const F::type * >
 Constant matrix for constant iterator. More...

Public Types

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

Public Member Functions

 _SubMatrix_iterator (matrix_type &m, uint r=0)
 Constructor.
 _SubMatrix_iterator ()
 Constructor. Iterator stands at the end of any matrix.
template<class _RefR , class _PtrR >
 _SubMatrix_iterator (const _SubMatrix_iterator< F, _RefR, _PtrR > &__x)
 Copy constructor. Also from iterator to constant iterator.
uint col () const
 Column.
MatrixType< F, _Ref, _Ptr >
::iterator
i () const
const MatrixType< F, _Ref,
_Ptr >::iterator
iend () const
Set< IndexRange >::index_iterator * iI () const
bool last () const
 Returns true, if iterator is behind the last entry.
const Set< IndexRange >
::index_iterator * 
lastI () const
matrix_typem () const
const uint nofCols () const
 Number of columns.
const uint nofRows () const
 Number of rows.
return_type 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 _SubMatrix_iterator< F, _RefR, _PtrR > &__x)
 Assignment.
uint row () const
 Row.

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 Member Functions

_Selfnext_ ()
 If the iterator is not standing inside submatrix, raise until it's standing inside.

Private Attributes

std::auto_ptr< typename
MatrixType< F, _Ref, _Ptr >
::iterator
i_
 Iterator over matrix entries.
std::auto_ptr< const typename
MatrixType< F, _Ref, _Ptr >
::iterator
iend_
 Iterator behind last matrix entry.
std::auto_ptr< Set< IndexRange >
::index_iterator > 
iI_
 Iterator over row index range.
std::auto_ptr< const Set
< IndexRange >::index_iterator > 
lastI_
 Iterator behind the last row index.
matrix_typem_
 Super matrix.

Detailed Description

template<class F, class _Ref, class _Ptr>
class concepts::_SubMatrix_iterator< F, _Ref, _Ptr >

STL like iterator for sub matrices.

Parameters:
Fmatrix type
_Refreference type of values
_Ptrpointer type to values
Author:
Kersten Schmidt, 2005

Definition at line 26 of file subMatrixIterator.hh.


Member Typedef Documentation

template<class F, class _Ref, class _Ptr>
typedef _Matrix_iterator_base<value_type, _Ref, _Ptr> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::_Base

Definition at line 40 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _SubMatrix_iterator concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::_Self

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 39 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _SubMatrix_iterator<F, const value_type&,const value_type*> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::const_iterator

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 47 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef ptrdiff_t concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::difference_type

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 38 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _SubMatrix_iterator<F, value_type&, value_type*> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iterator

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 45 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef std::forward_iterator_tag concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iterator_category

Definition at line 31 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef MatrixType<F, _Ref, _Ptr>::type concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::matrix_type

Definition at line 41 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _Ptr concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::pointer

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 35 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _Ref concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::reference

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 36 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef _Base::return_type concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::return_type

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 42 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef size_t concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::size_type

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 37 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
typedef F::type concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::value_type

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

Definition at line 34 of file subMatrixIterator.hh.


Constructor & Destructor Documentation

template<class F, class _Ref, class _Ptr>
concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::_SubMatrix_iterator ( matrix_type m,
uint  r = 0 
)

Constructor.

Parameters:
mmatrix
rrow
template<class F, class _Ref, class _Ptr>
concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::_SubMatrix_iterator ( )

Constructor. Iterator stands at the end of any matrix.

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

Copy constructor. Also from iterator to constant iterator.

Definition at line 59 of file subMatrixIterator.hh.

Here is the call graph for this function:


Member Function Documentation

uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::col ( ) const [inline, inherited]

Column.

Definition at line 73 of file matrixIterator.hh.

template<class F, class _Ref, class _Ptr>
MatrixType<F, _Ref, _Ptr>::iterator* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::i ( ) const [inline]

Definition at line 107 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
const MatrixType<F, _Ref, _Ptr>::iterator* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iend ( ) const [inline]

Definition at line 110 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
Set<IndexRange>::index_iterator* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iI ( ) const [inline]

Definition at line 113 of file subMatrixIterator.hh.

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

Returns information in an output stream.

Reimplemented from concepts::_Matrix_iterator_base< F::type, _Ref, _Ptr >.

bool concepts::_Matrix_iterator_base< F::type , _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 F, class _Ref, class _Ptr>
const Set<IndexRange>::index_iterator* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::lastI ( ) const [inline]

Definition at line 114 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
matrix_type* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::m ( ) const [inline]

Definition at line 117 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
_Self& concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::next_ ( ) [private]

If the iterator is not standing inside submatrix, raise until it's standing inside.

const uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::nofCols ( ) const [inline, inherited]

Number of columns.

Definition at line 69 of file matrixIterator.hh.

const uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::nofRows ( ) const [inline, inherited]

Number of rows.

Definition at line 67 of file matrixIterator.hh.

template<class F, class _Ref, class _Ptr>
return_type concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::operator* ( ) const [inline]

Dereferencation.

Definition at line 73 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
_Self& concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::operator++ ( )

Increment operator.

template<class F, class _Ref, class _Ptr>
_Self concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::operator++ ( int  ) [inline]

Definition at line 101 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
pointer concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::operator-> ( ) const [inline]

Returns a pointer to the value.

Definition at line 78 of file subMatrixIterator.hh.

Here is the call graph for this function:

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

Assignment.

Definition at line 85 of file subMatrixIterator.hh.

Here is the call graph for this function:

uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::row ( ) const [inline, inherited]

Row.

Definition at line 71 of file matrixIterator.hh.


Member Data Documentation

uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::col_ [protected, inherited]

Definition at line 91 of file matrixIterator.hh.

template<class F, class _Ref, class _Ptr>
std::auto_ptr<typename MatrixType<F, _Ref, _Ptr>::iterator> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::i_ [private]

Iterator over matrix entries.

Definition at line 122 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
std::auto_ptr<const typename MatrixType<F, _Ref, _Ptr>::iterator> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iend_ [private]

Iterator behind last matrix entry.

Definition at line 124 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
std::auto_ptr<Set<IndexRange>::index_iterator> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::iI_ [private]

Iterator over row index range.

Definition at line 126 of file subMatrixIterator.hh.

bool concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::last_ [protected, inherited]

Iterator is behind the last entrance.

Definition at line 93 of file matrixIterator.hh.

template<class F, class _Ref, class _Ptr>
std::auto_ptr<const Set<IndexRange>::index_iterator> concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::lastI_ [private]

Iterator behind the last row index.

Definition at line 128 of file subMatrixIterator.hh.

template<class F, class _Ref, class _Ptr>
matrix_type* concepts::_SubMatrix_iterator< F, _Ref, _Ptr >::m_ [private]

Super matrix.

Definition at line 130 of file subMatrixIterator.hh.

const uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::nofCols_ [protected, inherited]

Definition at line 89 of file matrixIterator.hh.

const uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::nofRows_ [protected, inherited]

Number of rows and columns.

Definition at line 89 of file matrixIterator.hh.

uint concepts::_Matrix_iterator_base< F::type , _Ref, _Ptr >::row_ [protected, inherited]

Current row and column.

Definition at line 91 of file matrixIterator.hh.


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

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