dune-common 2.9.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Dune::IteratorPropertyMap< RAI, IM, T, R > Class Template Reference

Adapter to turn a random access iterator into a property map. More...

#include <dune/common/propertymap.hh>

Inheritance diagram for Dune::IteratorPropertyMap< RAI, IM, T, R >:
Inheritance graph

Public Types

typedef RAI RandomAccessIterator
 The type of the random access iterator.
 
typedef IM IndexMap
 The type of the index map.
 
typedef IndexMap::KeyType KeyType
 The key type of the property map.
 
typedef T ValueType
 The value type of the property map.
 
typedef R Reference
 The reference type of the property map.
 
typedef LvaluePropertyMapTag Category
 The category of this property map.
 

Public Member Functions

 IteratorPropertyMap (RandomAccessIterator iter, const IndexMap &im=IndexMap())
 Constructor.
 
 IteratorPropertyMap ()
 Constructor.
 
Reference operator[] (KeyType key) const
 Access the a value by reference.
 

Detailed Description

template<class RAI, class IM, class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
class Dune::IteratorPropertyMap< RAI, IM, T, R >

Adapter to turn a random access iterator into a property map.

Member Typedef Documentation

◆ Category

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef LvaluePropertyMapTag Dune::IteratorPropertyMap< RAI, IM, T, R >::Category

The category of this property map.

◆ IndexMap

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef IM Dune::IteratorPropertyMap< RAI, IM, T, R >::IndexMap

The type of the index map.

This will convert the KeyType to std::ptrdiff_t via operator[]().

◆ KeyType

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef IndexMap::KeyType Dune::IteratorPropertyMap< RAI, IM, T, R >::KeyType

The key type of the property map.

◆ RandomAccessIterator

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef RAI Dune::IteratorPropertyMap< RAI, IM, T, R >::RandomAccessIterator

The type of the random access iterator.

◆ Reference

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef R Dune::IteratorPropertyMap< RAI, IM, T, R >::Reference

The reference type of the property map.

◆ ValueType

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
typedef T Dune::IteratorPropertyMap< RAI, IM, T, R >::ValueType

The value type of the property map.

Constructor & Destructor Documentation

◆ IteratorPropertyMap() [1/2]

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Dune::IteratorPropertyMap< RAI, IM, T, R >::IteratorPropertyMap ( RandomAccessIterator  iter,
const IndexMap im = IndexMap() 
)
inline

Constructor.

Parameters
iterThe random access iterator that provides the mapping.
imThe index map that maps the KeyType to the difference_type of the iterator.

◆ IteratorPropertyMap() [2/2]

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Dune::IteratorPropertyMap< RAI, IM, T, R >::IteratorPropertyMap ( )
inline

Constructor.

Member Function Documentation

◆ operator[]()

template<class RAI , class IM , class T = typename std::iterator_traits<RAI>::value_type, class R = typename std::iterator_traits<RAI>::reference>
Reference Dune::IteratorPropertyMap< RAI, IM, T, R >::operator[] ( KeyType  key) const
inline

Access the a value by reference.


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