dune-istl 2.12-git
Loading...
Searching...
No Matches
Dune::Experimental::OrderedIndexRangeTraits< R > Struct Template Reference

Traits for sets of indices. More...

#include <dune/istl/experimental/indexrange.hh>

Inheritance diagram for Dune::Experimental::OrderedIndexRangeTraits< R >:
Inheritance graph

Public Types

using index_range_type = R
 The type of the index set.
 
using index_type = std::ranges::range_value_t< index_range_type >
 The type of indices in the index set.
 
using size_type = std::ranges::range_size_t< index_range_type >
 The type used to count elements in the index set.
 

Static Public Member Functions

static constexpr IntegralRange< index_type > range (const R &index_set)
 Logical index range covered by index_set.
 
static constexpr size_type offset (const R &index_set, const index_type &value)
 Offset of value in the index set.
 

Detailed Description

template<Concepts::OrderedIndexRange R>
struct Dune::Experimental::OrderedIndexRangeTraits< R >

Traits for sets of indices.

Provides uniform access to the properties of index sets, such as the range of indices covered and the offset of a given index. Specializations for specific index set types can be provided to optimize these operations.

Member Typedef Documentation

◆ index_range_type

template<Concepts::OrderedIndexRange R>
using Dune::Experimental::OrderedIndexRangeTraits< R >::index_range_type = R

The type of the index set.

◆ index_type

template<Concepts::OrderedIndexRange R>
using Dune::Experimental::OrderedIndexRangeTraits< R >::index_type = std::ranges::range_value_t<index_range_type>

The type of indices in the index set.

◆ size_type

template<Concepts::OrderedIndexRange R>
using Dune::Experimental::OrderedIndexRangeTraits< R >::size_type = std::ranges::range_size_t<index_range_type>

The type used to count elements in the index set.

Member Function Documentation

◆ offset()

template<Concepts::OrderedIndexRange R>
static constexpr size_type Dune::Experimental::OrderedIndexRangeTraits< R >::offset ( const R &  index_set,
const index_type &  value 
)
inlinestaticconstexpr

Offset of value in the index set.

Distance to the to the first element in the index_set which does not compare less than value.

◆ range()

template<Concepts::OrderedIndexRange R>
static constexpr IntegralRange< index_type > Dune::Experimental::OrderedIndexRangeTraits< R >::range ( const R &  index_set)
inlinestaticconstexpr

Logical index range covered by index_set.

Return the smallest half-open integral range containing all indices in index_set.


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