Dune Core Modules (2.6.0)
Utilities for reduction like operations on ranges. More...
Namespaces | |
namespace | Dune |
Dune namespace. | |
Classes | |
class | Dune::IntegralRange< T > |
dynamic integer range for use in range-based for loops More... | |
class | Dune::StaticIntegralRange< T, to, from > |
static integer range for use in range-based for loops More... | |
Functions | |
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0> | |
T::value_type | Dune::max_value (const T &v) |
compute the maximum value over a range More... | |
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0> | |
T::value_type | Dune::min_value (const T &v) |
compute the minimum value over a range More... | |
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0> | |
bool | Dune::any_true (const T &v) |
similar to std::bitset<N>::any() return true, if any entries is true More... | |
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0> | |
bool | Dune::all_true (const T &v) |
similar to std::bitset<N>::all() return true, if any entries is true More... | |
constexpr | Dune::IntegralRange< T >::IntegralRange (value_type from, value_type to) noexcept |
construct integer range [from, to) | |
constexpr | Dune::IntegralRange< T >::IntegralRange (value_type to) noexcept |
construct integer range [0, to) | |
constexpr | Dune::IntegralRange< T >::IntegralRange (std::pair< value_type, value_type > range) noexcept |
construct integer range std::pair | |
constexpr iterator | Dune::IntegralRange< T >::begin () const noexcept |
obtain a random-access iterator to the first element | |
constexpr iterator | Dune::IntegralRange< T >::end () const noexcept |
obtain a random-access iterator past the last element | |
constexpr value_type | Dune::IntegralRange< T >::operator[] (const value_type &i) const noexcept |
access specified element | |
constexpr bool | Dune::IntegralRange< T >::empty () const noexcept |
check whether the range is empty | |
constexpr size_type | Dune::IntegralRange< T >::size () const noexcept |
obtain number of elements in the range | |
constexpr | Dune::StaticIntegralRange< T, to, from >::StaticIntegralRange () noexcept=default |
default constructor | |
constexpr | Dune::StaticIntegralRange< T, to, from >::operator IntegralRange< T > () const noexcept |
cast into dynamic IntegralRange | |
constexpr | Dune::StaticIntegralRange< T, to, from >::operator integer_sequence () const noexcept |
cast into corresponding std::integer_sequence | |
static constexpr iterator | Dune::StaticIntegralRange< T, to, from >::begin () noexcept |
obtain a random-access iterator to the first element | |
static constexpr iterator | Dune::StaticIntegralRange< T, to, from >::end () noexcept |
obtain a random-access iterator past the last element | |
template<class U , U i> | |
constexpr auto | Dune::StaticIntegralRange< T, to, from >::operator[] (const std::integral_constant< U, i > &) const noexcept -> std::integral_constant< value_type, from+static_cast< value_type >(i)> |
access specified element (static version) | |
constexpr value_type | Dune::StaticIntegralRange< T, to, from >::operator[] (const size_type &i) const noexcept |
access specified element (dynamic version) | |
static constexpr std::integral_constant< bool, from==to > | Dune::StaticIntegralRange< T, to, from >::empty () noexcept |
check whether the range is empty | |
static constexpr std::integral_constant< size_type, static_cast< size_type >(to) - static_cast< size_type >(from) > | Dune::StaticIntegralRange< T, to, from >::size () noexcept |
obtain number of elements in the range | |
template<class T , class U , std::enable_if_t< std::is_same< std::decay_t< T >, std::decay_t< U > >::value, int > = 0, std::enable_if_t< std::is_integral< std::decay_t< T > >::value, int > = 0> | |
static IntegralRange< std::decay_t< T > > | Dune::range (T &&from, U &&to) noexcept |
free standing function for setting up a range based for loop over an integer range for (auto i: range(0,10)) // 0,1,2,3,4,5,6,7,8,9 or for (auto i: range(-10,10)) // -10,-9,..,8,9 or for (auto i: range(10)) // 0,1,2,3,4,5,6,7,8,9 | |
Detailed Description
Utilities for reduction like operations on ranges.
All these reduction operations work for appropriate ranges and scalar values
Function Documentation
◆ all_true()
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
bool Dune::all_true | ( | const T & | v | ) |
similar to std::bitset<N>::all() return true, if any entries is true
overloads for scalar values, ranges, and std::bitset<N> exist
◆ any_true()
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
bool Dune::any_true | ( | const T & | v | ) |
similar to std::bitset<N>::any() return true, if any entries is true
overloads for scalar values, ranges, and std::bitset<N> exist
◆ max_value()
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
T::value_type Dune::max_value | ( | const T & | v | ) |
compute the maximum value over a range
overloads for scalar values, and ranges exist
◆ min_value()
template<typename T , typename std::enable_if< is_range< T >::value, int >::type = 0>
T::value_type Dune::min_value | ( | const T & | v | ) |
compute the minimum value over a range
overloads for scalar values, and ranges exist
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 13, 23:29, 2024)