|
dune-istl 2.12-git
|
Read-only view of a single index set inside a SparseIndexRanges.
More...
#include <dune/istl/experimental/sparseindexranges.hh>

Public Types | |
| using | index_type = typename SparseIndexRanges< I, A >::index_type |
| Type of the indices. | |
| using | size_type = typename SparseIndexRanges< I, A >::size_type |
Public Member Functions | |
| IndexRangeView ()=default | |
| IndexRangeView (const IndexRangeView &)=default | |
| IndexRangeView & | operator= (const IndexRangeView &)=default |
| IndexRangeView (IndexRangeView &&)=default | |
| IndexRangeView & | operator= (IndexRangeView &&)=default |
| constexpr IndexIterator | begin () const |
| Returns an iterator to the first index in this index set. | |
| constexpr IndexIterator | end () const |
| Returns an iterator past the last index in this index set. | |
| constexpr size_type | size () const |
| Returns the number of indices in this index set. | |
| constexpr bool | empty () const |
| Returns true if this index set is empty (i.e., contains no indices). | |
| constexpr index_type | front () const |
| Returns the first index in this index set. Precondition: the set is not empty. | |
| constexpr index_type | back () const |
| Returns the last index in this index set. Precondition: the set is not empty. | |
| constexpr index_type | operator[] (size_type i) const |
Returns the index at local position i in this index set. Precondition: i < size(). | |
| constexpr IntegralRange< index_type > | range () const |
| Returns an integer range [0, n) usable as a local index range over this set. | |
| constexpr bool | contains (index_type j) const |
Returns true if index j is contained in this index set. Complexity: O(size()) for small sets, O(log(size())) for large sets. | |
| constexpr IndexIterator | lower_bound (index_type i) const |
Returns an iterator to the first index >= i in this index set, or end() if none exists. | |
| constexpr IndexIterator | upper_bound (index_type i) const |
| constexpr IndexIterator | find (index_type i) const |
| template<std::invocable< index_type > F> | |
| constexpr void | for_each (F &&f) const |
Calls f(j) for every index j in this index set, in ascending order. | |
Friends | |
| class | SparseIndexRanges< I, A > |
Detailed Description
class Dune::Experimental::SparseIndexRanges< I, A >::IndexRangeView
Read-only view of a single index set inside a SparseIndexRanges.
Provides a std::ranges::view over the sorted indices of one index set. Obtained via SparseIndexRanges::operator[] or by dereferencing a SparseIndexRanges::Iterator.
IndexRangeView is a lightweight proxy (pointer + index offset) that is cheap to copy. It becomes invalid if the underlying SparseIndexRanges is destroyed or moved.
Member Typedef Documentation
◆ index_type
| using Dune::Experimental::SparseIndexRanges< I, A >::IndexRangeView::index_type = typename SparseIndexRanges<I,A>::index_type |
Type of the indices.
◆ size_type
| using Dune::Experimental::SparseIndexRanges< I, A >::IndexRangeView::size_type = typename SparseIndexRanges<I,A>::size_type |
Constructor & Destructor Documentation
◆ IndexRangeView() [1/3]
|
default |
◆ IndexRangeView() [2/3]
|
default |
◆ IndexRangeView() [3/3]
|
default |
Member Function Documentation
◆ back()
|
inlineconstexpr |
Returns the last index in this index set. Precondition: the set is not empty.
◆ begin()
|
constexpr |
Returns an iterator to the first index in this index set.
◆ contains()
|
constexpr |
Returns true if index j is contained in this index set. Complexity: O(size()) for small sets, O(log(size())) for large sets.
◆ empty()
|
inlineconstexpr |
Returns true if this index set is empty (i.e., contains no indices).
◆ end()
|
constexpr |
Returns an iterator past the last index in this index set.
◆ find()
|
constexpr |
◆ for_each()
|
inlineconstexpr |
Calls f(j) for every index j in this index set, in ascending order.
◆ front()
|
inlineconstexpr |
Returns the first index in this index set. Precondition: the set is not empty.
◆ lower_bound()
|
constexpr |
Returns an iterator to the first index >= i in this index set, or end() if none exists.
◆ operator=() [1/2]
|
default |
◆ operator=() [2/2]
|
default |
◆ operator[]()
|
inlineconstexpr |
Returns the index at local position i in this index set. Precondition: i < size().
◆ range()
|
constexpr |
Returns an integer range [0, n) usable as a local index range over this set.
◆ size()
|
constexpr |
Returns the number of indices in this index set.
◆ upper_bound()
|
constexpr |
Friends And Related Symbol Documentation
◆ SparseIndexRanges< I, A >
|
friend |
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