Iterator class for sequential access to FieldVector and FieldMatrix. More...
#include <dune/common/fvector.hh>
Public Types | |
typedef std::ptrdiff_t | DifferenceType |
The type of the difference between two positions. | |
typedef FieldIterator< 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 | |
FieldIterator () | |
FieldIterator (C &cont, DifferenceType pos) | |
FieldIterator (const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > &other) | |
bool | equals (const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > &other) const |
bool | equals (const FieldIterator< 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) |
std::ptrdiff_t | distanceTo (FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > other) const |
std::ptrdiff_t | distanceTo (FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > other) const |
DifferenceType | 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 | FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > |
class | FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > |
Iterator class for sequential access to FieldVector and FieldMatrix.
typedef FieldIterator< C, T > Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::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; // 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::FieldIterator< C, T >::DifferenceType |
The type of the difference between two positions.
Reimplemented from Dune::RandomAccessIteratorFacade< FieldIterator< C, T >, T, T &, int >.
typedef T * Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::Pointer [inherited] |
The pointer to the Value.
typedef T & Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::Reference [inherited] |
The type of the reference to the values accessed.
typedef T Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::Value [inherited] |
The type of value accessed through the iterator.
Dune::FieldIterator< C, T >::FieldIterator | ( | ) | [inline] |
Dune::FieldIterator< C, T >::FieldIterator | ( | C & | cont, | |
DifferenceType | pos | |||
) | [inline] |
Dune::FieldIterator< C, T >::FieldIterator | ( | const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > & | other | ) | [inline] |
void Dune::FieldIterator< C, T >::advance | ( | DifferenceType | n | ) | [inline] |
void Dune::FieldIterator< C, T >::decrement | ( | ) | [inline] |
T& Dune::FieldIterator< C, T >::dereference | ( | ) | const [inline] |
std::ptrdiff_t Dune::FieldIterator< C, T >::distanceTo | ( | FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > | other | ) | const [inline] |
std::ptrdiff_t Dune::FieldIterator< C, T >::distanceTo | ( | FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > | other | ) | const [inline] |
T& Dune::FieldIterator< C, T >::elementAt | ( | DifferenceType | i | ) | const [inline] |
bool Dune::FieldIterator< C, T >::equals | ( | const FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > & | other | ) | const [inline] |
bool Dune::FieldIterator< C, T >::equals | ( | const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > & | other | ) | const [inline] |
void Dune::FieldIterator< C, T >::increment | ( | ) | [inline] |
DifferenceType Dune::FieldIterator< C, T >::index | ( | ) | const [inline] |
return index
Reference Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator* | ( | ) | const [inline, inherited] |
Dereferencing operator.
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator+ | ( | DifferenceType | n | ) | const [inline, inherited] |
References Dune::FieldIterator< C, T >::advance().
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator++ | ( | int | ) | [inline, inherited] |
Postincrement operator.
References Dune::RandomAccessIteratorFacade< T, V, R, D >::operator++().
DerivedType& Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator++ | ( | ) | [inline, inherited] |
Preincrement operator.
DerivedType& Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator+= | ( | DifferenceType | n | ) | [inline, inherited] |
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator- | ( | DifferenceType | n | ) | const [inline, inherited] |
References Dune::FieldIterator< C, T >::advance().
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator-- | ( | int | ) | [inline, inherited] |
Postdecrement operator.
References Dune::RandomAccessIteratorFacade< T, V, R, D >::operator--().
DerivedType& Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator-- | ( | ) | [inline, inherited] |
Predecrement operator.
DerivedType& Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator-= | ( | DifferenceType | n | ) | [inline, inherited] |
Pointer Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator-> | ( | ) | const [inline, inherited] |
Reference Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator[] | ( | DifferenceType | n | ) | const [inline, inherited] |
Get the element n positions from the current one.
n | The distance to the element. |
friend class FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > [friend] |
friend class FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > [friend] |