|
dune-istl 2.12-git
|
Non-owning indexed view over random-access data. More...
#include <dune/istl/experimental/indexedarrayview.hh>

Public Types | |
| using | index_range_type = R |
| The type used for the index set. | |
| using | member_type = std::iter_value_t< T > |
| The type of components in the array. | |
| using | index_type = typename OrderedIndexRangeTraits< index_range_type >::index_type |
| The type used for the index access. | |
| using | size_type = typename OrderedIndexRangeTraits< index_range_type >::size_type |
| The type used to count elements in the index set. | |
| using | reference = std::iter_reference_t< T > |
| The type used for references to the components. | |
| using | const_reference = std::common_reference_t< const std::iter_value_t< T > &&, std::iter_reference_t< T > > |
| The type used for const references to the components. | |
| using | iterator = Iterator |
| Iterator type with mutable access to the underlying data. | |
| using | const_iterator = ConstIterator |
| Iterator type with const access to the underlying data. | |
Public Member Functions | |
| reference | operator[] (index_type i) |
| Access element by an index from the index set. | |
| const_reference | operator[] (index_type i) const |
| Const access element by an index from the index set. | |
| constexpr iterator | begin () noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Iterator to the first element in the view. | |
| constexpr iterator | end () noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Iterator to one past the last element in the view. | |
| iterator | find (size_type i) |
Find element with index i in the index set. | |
| bool | contains (index_type i) const |
| constexpr const_iterator | begin () const noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Const iterator to the first element in the view. | |
| constexpr const_iterator | end () const noexcept(noexcept(iterator(data_, index_set_, size_type{}))) |
| Const iterator to one past the last element in the view. | |
| const_iterator | find (size_type i) const |
Find element with index i in the index set. | |
| constexpr size_type | size () const noexcept(noexcept(std::ranges::size(index_set_))) |
| The number of elements in the view, i.e. the size of the index set. | |
| constexpr index_range_type | indexSet () const |
| The logical index range covered by the view, as determined by the index set. | |
| IndexedArrayView (T data, index_range_type index_set) noexcept(std::is_nothrow_copy_constructible_v< T > &&std::is_nothrow_copy_constructible_v< index_range_type >) | |
| Construct a view from data iterator and index set. | |
Detailed Description
class Dune::Experimental::IndexedArrayView< T, R >
Non-owning indexed view over random-access data.
Maps indices from an index set R to contiguous values in the data T. The view stores both data iterator and index set by value. The data and the index sets are not owned by the view, and must outlive it.
Member Typedef Documentation
◆ const_iterator
| using Dune::Experimental::IndexedArrayView< T, R >::const_iterator = ConstIterator |
Iterator type with const access to the underlying data.
◆ const_reference
| using Dune::Experimental::IndexedArrayView< T, R >::const_reference = std::common_reference_t<const std::iter_value_t<T>&&, std::iter_reference_t<T> > |
The type used for const references to the components.
◆ index_range_type
| using Dune::Experimental::IndexedArrayView< T, R >::index_range_type = R |
The type used for the index set.
◆ index_type
| using Dune::Experimental::IndexedArrayView< T, R >::index_type = typename OrderedIndexRangeTraits<index_range_type>::index_type |
The type used for the index access.
◆ iterator
| using Dune::Experimental::IndexedArrayView< T, R >::iterator = Iterator |
Iterator type with mutable access to the underlying data.
◆ member_type
| using Dune::Experimental::IndexedArrayView< T, R >::member_type = std::iter_value_t<T> |
The type of components in the array.
◆ reference
| using Dune::Experimental::IndexedArrayView< T, R >::reference = std::iter_reference_t<T> |
The type used for references to the components.
◆ size_type
| using Dune::Experimental::IndexedArrayView< T, R >::size_type = typename OrderedIndexRangeTraits<index_range_type>::size_type |
The type used to count elements in the index set.
Constructor & Destructor Documentation
◆ IndexedArrayView()
|
inlinenoexcept |
Construct a view from data iterator and index set.
- Parameters
-
data Iterator to first element of the underlying contiguous data. index_set Set or view of valid external indices.
Member Function Documentation
◆ begin() [1/2]
|
inlineconstexprnoexcept |
Const iterator to the first element in the view.
◆ begin() [2/2]
|
inlineconstexprnoexcept |
Iterator to the first element in the view.
◆ contains()
|
inline |
◆ end() [1/2]
|
inlineconstexprnoexcept |
Const iterator to one past the last element in the view.
◆ end() [2/2]
|
inlineconstexprnoexcept |
Iterator to one past the last element in the view.
◆ find() [1/2]
|
inline |
Find element with index i in the index set.
- Returns
- Iterator to the element with index
i, or end() ifiis not present.
◆ find() [2/2]
|
inline |
Find element with index i in the index set.
- Returns
- Const iterator to the element with index
i, or end() ifiis not present.
◆ indexSet()
|
inlineconstexpr |
The logical index range covered by the view, as determined by the index set.
◆ operator[]() [1/2]
|
inline |
Access element by an index from the index set.
- Parameters
-
i Index from the index set.
- Exceptions
-
ISTLError if bounds checking is enabled and iis not present.
◆ operator[]() [2/2]
|
inline |
Const access element by an index from the index set.
- Parameters
-
i Index from the index set.
- Exceptions
-
ISTLError if bounds checking is enabled and iis not present.
◆ size()
|
inlineconstexprnoexcept |
The number of elements in the view, i.e. the size of the index set.
The documentation for this class was generated from the following file:
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8