Loading...
Searching...
No Matches
rangeutilities.hh File Reference

Utilities for reduction like operations on ranges. More...

`#include <algorithm>`
`#include <utility>`
`#include <type_traits>`
`#include <bitset>`
`#include <dune/common/typetraits.hh>`
`#include <dune/common/iteratorfacades.hh>`

Go to the source code of this file.

## 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...
struct | Dune::ValueTransformationTag
| Tag to enable value based transformations in TransformedRangeView. More...
struct | Dune::IteratorTransformationTag
| Tag to enable iterator based transformations in TransformedRangeView. More...
class | Dune::TransformedRangeView< R, F, T >
| A range transforming the values of another range on-the-fly. More...

## Namespaces

namespace | Dune
| Dune namespace

## Functions

template<typename T, typename std::enable_if< IsIterable< T >::value, int >::type = 0>
T::value_type | Dune::max_value (const T &v)
| compute the maximum value over a range
template<typename T, typename std::enable_if<!IsIterable< T >::value, int >::type = 0>
const T & | Dune::max_value (const T &v)
template<typename T, typename std::enable_if< IsIterable< T >::value, int >::type = 0>
T::value_type | Dune::min_value (const T &v)
| compute the minimum value over a range
template<typename T, typename std::enable_if<!IsIterable< T >::value, int >::type = 0>
const T & | Dune::min_value (const T &v)
template<typename T, typename std::enable_if< IsIterable< 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
template<std::size_t N>
bool | Dune::any_true (const std::bitset< N > &b)
template<typename T, typename std::enable_if< IsIterable< 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
template<std::size_t N>
bool | Dune::all_true (const std::bitset< N > &b)
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 constexpr 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
template<class T, std::enable_if_t< std::is_integral< std::decay_t< T > >::value, int > = 0>
static constexpr IntegralRange< std::decay_t< T > > | Dune::range (T &&to) noexcept
template<class T, std::enable_if_t< std::is_enum< std::decay_t< T > >::value, int > = 0>
static constexpr IntegralRange< std::underlying_type_t< std::decay_t< T > > > | Dune::range (T &&to) noexcept
template<class T, T from, T to>
static constexpr StaticIntegralRange< T, to, from > | Dune::range (std::integral_constant< T, from >, std::integral_constant< T, to >) noexcept
template<class T, T to>
static constexpr StaticIntegralRange< T, to > | Dune::range (std::integral_constant< T, to >) noexcept
template<class R, class F>
auto | Dune::transformedRangeView (R &&range, F &&f)
| Create a TransformedRangeView.
template<class R, class F>
auto | Dune::iteratorTransformedRangeView (R &&range, F &&f)
| Create a TransformedRangeView using an iterator transformation.
template<class Range>
auto | Dune::sparseRange (Range &&range)
| Allow structured-binding for-loops for sparse iterators.

## Detailed Description

Utilities for reduction like operations on ranges.

Author
  Christian Engwer