|
dune-common 2.12-git
|
Iterator class for sparse vector-like containers. More...
#include <dune/common/diagonalmatrix.hh>

Public Types | |
| using | iterator_category = std::bidirectional_iterator_tag |
| using | value_type = typename std::remove_const< T >::type |
| using | difference_type = int |
| using | pointer = T * |
| using | reference = R |
| typedef ContainerWrapperIterator< CW, T, R > | DerivedType |
| The type of derived iterator. | |
| typedef T | Value |
| The type of value accessed through the iterator. | |
| typedef T * | Pointer |
| The pointer to the Value. | |
| typedef int | DifferenceType |
| The type of the difference between two positions. | |
| typedef R | Reference |
| The type of the reference to the values accessed. | |
Public Member Functions | |
| ContainerWrapperIterator () | |
| ContainerWrapperIterator (CW containerWrapper, int position) | |
| template<class OtherContainerWrapperIteratorType > | |
| ContainerWrapperIterator (OtherContainerWrapperIteratorType &other) | |
| ContainerWrapperIterator (const MyType &other) | |
| ContainerWrapperIterator (const MyConstType &other) | |
| template<class OtherContainerWrapperIteratorType > | |
| ContainerWrapperIterator & | operator= (OtherContainerWrapperIteratorType &other) |
| T * | operator-> () const |
| bool | equals (const MyType &other) const |
| bool | equals (const MyConstType &other) const |
| R | dereference () const |
| void | increment () |
| void | decrement () |
| R | elementAt (int i) const |
| void | advance (int n) |
| template<class OtherContainerWrapperIteratorType > | |
| std::ptrdiff_t | distanceTo (OtherContainerWrapperIteratorType &other) const |
| std::ptrdiff_t | index () const |
| constexpr Reference | operator* () const |
| Dereferencing operator. | |
| constexpr DerivedType & | operator++ () |
| Preincrement operator. | |
| constexpr DerivedType | operator++ (int) |
| Postincrement operator. | |
| constexpr DerivedType & | operator-- () |
| Preincrement operator. | |
| constexpr DerivedType | operator-- (int) |
| Postincrement operator. | |
Detailed Description
class Dune::ContainerWrapperIterator< CW, T, R >
Iterator class for sparse vector-like containers.
This class provides an iterator for sparse vector like containers. It contains a ContainerWrapper that must provide the translation from the position in the underlying container to the index in the sparse container.
The ContainerWrapper must be default and copy-constructable. Furthermore it must provide the methods:
bool identical(other) - check if this is identical to other (same container, not only equal) T* pointer(position) - get pointer to data at position in underlying container size_t realIndex(position) - get index in sparse container for position in underlying container
Notice that the iterator stores a ContainerWrapper. This allows one to use proxy classes as underlying container and as returned reference type.
- Template Parameters
-
CW The container wrapper class T The contained type R The reference type returned by dereference
Member Typedef Documentation
◆ DerivedType
|
inherited |
The type of derived iterator.
The iterator has to define following functions have to be present:
For an elaborate explanation see the STL Documentation
◆ difference_type
|
inherited |
◆ DifferenceType
|
inherited |
The type of the difference between two positions.
◆ iterator_category
|
inherited |
◆ pointer
|
inherited |
◆ Pointer
|
inherited |
The pointer to the Value.
◆ reference
|
inherited |
◆ Reference
|
inherited |
The type of the reference to the values accessed.
◆ Value
|
inherited |
The type of value accessed through the iterator.
◆ value_type
|
inherited |
Constructor & Destructor Documentation
◆ ContainerWrapperIterator()
|
inline |
Member Function Documentation
◆ equals()
|
inline |
◆ operator*()
|
inlineconstexprinherited |
Dereferencing operator.
◆ operator++() [1/2]
|
inlineconstexprinherited |
Preincrement operator.
◆ operator++() [2/2]
|
inlineconstexprinherited |
Postincrement operator.
◆ operator--() [1/2]
|
inlineconstexprinherited |
Preincrement operator.
◆ operator--() [2/2]
|
inlineconstexprinherited |
Postincrement operator.
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8