dune-common 2.10
Loading...
Searching...
No Matches
Dune::Hybrid Namespace Reference

Classes

class  HybridFunctor
 Adapter of a hybrid functor that maintains results hybrid. More...
 

Functions

template<class T >
constexpr auto size (const T &t)
 Size query.
 
template<class Container , class Index >
constexpr decltype(auto) elementAt (Container &&c, Index &&i)
 Get element at given position from container.
 
template<class Begin , class End >
constexpr auto integralRange (const Begin &begin, const End &end)
 Create an integral range.
 
template<class End >
constexpr auto integralRange (const End &end)
 Create an integral range starting from 0.
 
template<class Range , class F >
constexpr void forEach (Range &&range, F &&f)
 Range based for loop.
 
template<class Range , class T , class F >
constexpr T accumulate (Range &&range, T value, F &&f)
 Accumulate values.
 
template<class Condition , class IfFunc , class ElseFunc >
decltype(auto) ifElse (const Condition &condition, IfFunc &&ifFunc, ElseFunc &&elseFunc)
 A conditional expression.
 
template<class Condition , class IfFunc >
void ifElse (const Condition &condition, IfFunc &&ifFunc)
 A conditional expression.
 
template<class Functor >
constexpr HybridFunctor< Functor > hybridFunctor (const Functor &)
 Returns an HybridFunctor adaptor.
 
template<class T1 , class T2 >
constexpr auto equals (T1 &&t1, T2 &&t2)
 Equality comparison.
 
template<class Cases , class Value , class Branches , class ElseBranch >
constexpr decltype(auto) switchCases (const Cases &cases, const Value &value, Branches &&branches, ElseBranch &&elseBranch)
 Switch statement.
 
template<class Cases , class Value , class Branches >
constexpr void switchCases (const Cases &cases, const Value &value, Branches &&branches)
 Switch statement.
 
template<class T , class Value , class Branches >
constexpr void switchCases (IntegralRange< T > range, const Value &value, Branches &&branches)
 Switch statement.
 

Variables

constexpr auto max = hybridFunctor(Impl::Max{})
 Function object that returns the greater of the given values.
 
constexpr auto min = hybridFunctor(Impl::Min{})
 Function object that returns the smaller of the given values.
 
constexpr auto plus = hybridFunctor(std::plus<>{})
 Function object for performing addition.
 
constexpr auto minus = hybridFunctor(std::minus<>{})
 Function object for performing subtraction.
 
constexpr auto equal_to = hybridFunctor(std::equal_to<>{})
 Function object for performing equality comparison.
 

Function Documentation

◆ hybridFunctor()

template<class Functor >
HybridFunctor< Functor > Dune::Hybrid::hybridFunctor ( const Functor & )
constexpr

Returns an HybridFunctor adaptor.

See also
HybridFunctor