Dune Core Modules (2.5.0)

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>

Public Types

typedef RAI RandomAccessIterator
 The type of the random access iterator.
 
typedef IM IndexMap
 The type of the index map. More...
 
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. More...
 
 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

◆ 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[]().

Constructor & Destructor Documentation

◆ IteratorPropertyMap()

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.

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)