Dune::FieldIterator< C, T > Class Template Reference
[Dense Matrix and Vector Template Library]

Iterator class for sequential access to FieldVector and FieldMatrix. More...

#include <dune/common/fvector.hh>

Inheritance diagram for Dune::FieldIterator< C, T >:
Inheritance graph

List of all members.

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.
DerivedTypeoperator++ ()
 Preincrement operator.
DerivedType operator++ (int)
 Postincrement operator.
DerivedTypeoperator+= (DifferenceType n)
DerivedType operator+ (DifferenceType n) const
DerivedTypeoperator-- ()
 Predecrement operator.
DerivedType operator-- (int)
 Postdecrement operator.
DerivedTypeoperator-= (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 >

Detailed Description

template<class C, class T>
class Dune::FieldIterator< C, T >

Iterator class for sequential access to FieldVector and FieldMatrix.


Member Typedef Documentation

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

template<class C , class T >
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.


Constructor & Destructor Documentation

template<class C , class T >
Dune::FieldIterator< C, T >::FieldIterator (  )  [inline]
template<class C , class T >
Dune::FieldIterator< C, T >::FieldIterator ( C &  cont,
DifferenceType  pos 
) [inline]
template<class C , class T >
Dune::FieldIterator< C, T >::FieldIterator ( const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > &  other  )  [inline]

Member Function Documentation

template<class C , class T >
void Dune::FieldIterator< C, T >::advance ( DifferenceType  n  )  [inline]
template<class C , class T >
void Dune::FieldIterator< C, T >::decrement (  )  [inline]
template<class C , class T >
T& Dune::FieldIterator< C, T >::dereference (  )  const [inline]
template<class C , class T >
std::ptrdiff_t Dune::FieldIterator< C, T >::distanceTo ( FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type >  other  )  const [inline]
template<class C , class T >
std::ptrdiff_t Dune::FieldIterator< C, T >::distanceTo ( FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type >  other  )  const [inline]
template<class C , class T >
T& Dune::FieldIterator< C, T >::elementAt ( DifferenceType  i  )  const [inline]
template<class C , class T >
bool Dune::FieldIterator< C, T >::equals ( const FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > &  other  )  const [inline]
template<class C , class T >
bool Dune::FieldIterator< C, T >::equals ( const FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > &  other  )  const [inline]
template<class C , class T >
void Dune::FieldIterator< C, T >::increment (  )  [inline]
template<class C , class T >
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]
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator++ ( int   )  [inline, inherited]
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]
DerivedType Dune::RandomAccessIteratorFacade< FieldIterator< C, T > , T , T & , int >::operator-- ( int   )  [inline, inherited]
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.

Parameters:
n The distance to the element.
Returns:
The element at that distance.

Friends And Related Function Documentation

template<class C , class T >
friend class FieldIterator< const typename remove_const< C >::type, const typename remove_const< T >::type > [friend]
template<class C , class T >
friend class FieldIterator< typename remove_const< C >::type, typename remove_const< T >::type > [friend]

The documentation for this class was generated from the following file:
Generated on Mon Apr 26 10:45:23 2010 for dune-common by  doxygen 1.6.3