|
dune-common
2.2.0
|
Generic iterator class for dense vector and matrix implementations. More...
#include <dune/common/densevector.hh>
Public Types | |
| typedef std::ptrdiff_t | DifferenceType |
| The type of the difference between two positions. | |
| typedef C::size_type | SizeType |
| The type to index the underlying container. | |
| typedef DenseIterator< C, T > | 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 T & | Reference |
| The type of the reference to the values accessed. | |
Public Member Functions | |
| DenseIterator () | |
| DenseIterator (C &cont, SizeType pos) | |
| DenseIterator (const DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > &other) | |
| bool | equals (const DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > &other) const |
| bool | equals (const DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > &other) const |
| T & | dereference () const |
| void | increment () |
| void | decrement () |
| T & | elementAt (DifferenceType i) const |
| void | advance (DifferenceType n) |
| DifferenceType | distanceTo (DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > other) const |
| DifferenceType | distanceTo (DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > other) const |
| SizeType | index () const |
| return index | |
| Reference | operator* () const |
| Dereferencing operator. | |
| Pointer | operator-> () const |
| Reference | operator[] (DifferenceType n) const |
| Get the element n positions from the current one. | |
| DerivedType & | operator++ () |
| Preincrement operator. | |
| DerivedType | operator++ (int) |
| Postincrement operator. | |
| DerivedType & | operator+= (DifferenceType n) |
| DerivedType | operator+ (DifferenceType n) const |
| DerivedType & | operator-- () |
| Predecrement operator. | |
| DerivedType | operator-- (int) |
| Postdecrement operator. | |
| DerivedType & | operator-= (DifferenceType n) |
| DerivedType | operator- (DifferenceType n) const |
Friends | |
| class | DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > |
| class | DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > |
Generic iterator class for dense vector and matrix implementations.
provides sequential access to DenseVector, FieldVector and FieldMatrix
typedef DenseIterator< C, T > Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::DerivedType [inherited] |
The type of derived iterator.
The iterator has to define following functions have to be present:
// Access the value referred to. Reference dereference() const; // Access the value at some other location Reference elementAt(n) const; // Compare for equality with j equals(i); // position the iterator at the next element. void increment() // position the iterator at the previous element. void decrement() // advance the iterator by a number of positions- void advance(DifferenceType n); // calculate the distance to another iterator. // One should incorporate an assertion wether // the same containers are referenced DifferenceType distanceTo(j) const;
For an elaborate explanation see the STL Documentation
| typedef std::ptrdiff_t Dune::DenseIterator< C, T >::DifferenceType |
The type of the difference between two positions.
Reimplemented from Dune::RandomAccessIteratorFacade< DenseIterator< C, T >, T, T &, std::ptrdiff_t >.
typedef T * Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::Pointer [inherited] |
The pointer to the Value.
typedef T & Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::Reference [inherited] |
The type of the reference to the values accessed.
| typedef C::size_type Dune::DenseIterator< C, T >::SizeType |
The type to index the underlying container.
typedef T Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::Value [inherited] |
The type of value accessed through the iterator.
| Dune::DenseIterator< C, T >::DenseIterator | ( | ) | [inline] |
| Dune::DenseIterator< C, T >::DenseIterator | ( | C & | cont, |
| SizeType | pos | ||
| ) | [inline] |
| Dune::DenseIterator< C, T >::DenseIterator | ( | const DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > & | other | ) | [inline] |
| void Dune::DenseIterator< C, T >::advance | ( | DifferenceType | n | ) | [inline] |
| void Dune::DenseIterator< C, T >::decrement | ( | ) | [inline] |
| T& Dune::DenseIterator< C, T >::dereference | ( | ) | const [inline] |
| DifferenceType Dune::DenseIterator< C, T >::distanceTo | ( | DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > | other | ) | const [inline] |
| DifferenceType Dune::DenseIterator< C, T >::distanceTo | ( | DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > | other | ) | const [inline] |
| T& Dune::DenseIterator< C, T >::elementAt | ( | DifferenceType | i | ) | const [inline] |
| bool Dune::DenseIterator< C, T >::equals | ( | const DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > & | other | ) | const [inline] |
| bool Dune::DenseIterator< C, T >::equals | ( | const DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > & | other | ) | const [inline] |
| void Dune::DenseIterator< C, T >::increment | ( | ) | [inline] |
| SizeType Dune::DenseIterator< C, T >::index | ( | ) | const [inline] |
return index
| Reference Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator* | ( | ) | const [inline, inherited] |
Dereferencing operator.
| DerivedType Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator+ | ( | DifferenceType | n | ) | const [inline, inherited] |
References Dune::DenseIterator< C, T >::advance().
| DerivedType& Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator++ | ( | ) | [inline, inherited] |
Preincrement operator.
| DerivedType Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator++ | ( | int | ) | [inline, inherited] |
Postincrement operator.
References Dune::RandomAccessIteratorFacade< T, V, R, D >::operator++().
| DerivedType& Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator+= | ( | DifferenceType | n | ) | [inline, inherited] |
| DerivedType Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator- | ( | DifferenceType | n | ) | const [inline, inherited] |
References Dune::DenseIterator< C, T >::advance().
| DerivedType& Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator-- | ( | ) | [inline, inherited] |
Predecrement operator.
| DerivedType Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator-- | ( | int | ) | [inline, inherited] |
Postdecrement operator.
References Dune::RandomAccessIteratorFacade< T, V, R, D >::operator--().
| DerivedType& Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator-= | ( | DifferenceType | n | ) | [inline, inherited] |
| Pointer Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator-> | ( | ) | const [inline, inherited] |
| Reference Dune::RandomAccessIteratorFacade< DenseIterator< C, T > , T , T & , std::ptrdiff_t >::operator[] | ( | DifferenceType | n | ) | const [inline, inherited] |
Get the element n positions from the current one.
| n | The distance to the element. |
friend class DenseIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > [friend] |
friend class DenseIterator< typename remove_const< C >::type, typename remove_const< T >::type > [friend] |
1.7.6.1