DUNE-ACFEM (unstable)

Functions

template<std::size_t... I, class F >
constexpr bool Dune::ACFem::forEachWhile (F &&f, IndexSequence< I... >=IndexSequence< I... >{})
 Repeat until F returns false. More...
 
template<std::size_t... I, class F >
constexpr bool Dune::ACFem::forEachWhile (IndexSequence< I... >, F &&f)
 Repeat until F returns false. More...
 
template<std::size_t... I, class F , class T >
constexpr auto Dune::ACFem::addEach (T &&init, F &&f, IndexSequence< I... >=IndexSequence< I... >{})
 Invoke the given functor sizeof...(I) times and sum up the result, where init gives the initial value of the sum.
 
template<std::size_t... I, class F , class T >
constexpr auto Dune::ACFem::addEach (IndexSequence< I... >, T &&init, F &&f)
 Invoke the given functor sizeof...(I) times and sum up the result, where init gives the initial value of the sum.
 
template<std::size_t N, class F , class T >
constexpr auto Dune::ACFem::addLoop (F &&f, T &&init, IndexConstant< N >=IndexConstant< N >{})
 Version with just a plain number as argument.
 
template<std::size_t... I, class F , class T >
constexpr auto Dune::ACFem::multiplyEach (T &&init, F &&f, IndexSequence< I... >=IndexSequence< I... >{})
 Invoke the given functor sizeof...(I) times and multiply the result, where init gives the initial value of the sum.
 
template<std::size_t... I, class F , class T >
constexpr auto Dune::ACFem::multiplyEach (IndexSequence< I... >, T &&init, F &&f)
 Invoke the given functor sizeof...(I) times and multiply the result, where init gives the initial value of the sum.
 
template<std::size_t N, class F , class T >
constexpr auto Dune::ACFem::multiplyLoop (T &&init, F &&f, IndexConstant< N >=IndexConstant< N >{})
 Version with just a plain number as argument.
 

Detailed Description

Function Documentation

◆ forEachWhile() [1/2]

template<std::size_t... I, class F >
constexpr bool Dune::ACFem::forEachWhile ( F &&  f,
IndexSequence< I... >  = IndexSequence<I...>{} 
)
constexpr

Repeat until F returns false.

Obviously, this requires that F returns a boolean value.

Parameters
[in]sInteger sequence.
[in]fFunctor. f has to return a boolean, the loop stops if f returns false. f is called in turn with the values of the integer sequence s. f is passed the loop index as st::integral_constant.
Returns
false if the loop as been terminated before reaching the end of s, otherwise true.

◆ forEachWhile() [2/2]

template<std::size_t... I, class F >
constexpr bool Dune::ACFem::forEachWhile ( IndexSequence< I... >  ,
F &&  f 
)
constexpr

Repeat until F returns false.

Obviously, this requires that F returns a boolean value.

Parameters
[in]sInteger sequence.
[in]fFunctor. f has to return a boolean, the loop stops if f returns false. f is called in turn with the values of the integer sequence s. f is passed the loop index as st::integral_constant.
Returns
false if the loop as been terminated before reaching the end of s, otherwise true.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)