DUNE-ACFEM (unstable)

Apply transformation functors to given integer sequences. More...

Modules

 SequenceTransformFunctors
 Predefined functors as arguments for TransformFunctor for the TransformSequence template.
 
 SequenceAcceptFunctors
 Predefined functors as arguments for AcceptFunctor for the TransformSequence template.
 

Namespaces

namespace  Dune::ACFem
 A namespace encapsulating everything defined in our dune-acfem project.
 

Classes

struct  Dune::ACFem::TransformAtIndexFunctor< F, Index >
 Applies another functor only to the elements at the specified positions given by the Index parameter pack. More...
 
struct  Dune::ACFem::AcceptEqualFunctor< acceptEqual >
 Functor for TransformSequence: accept if result is either equal or different from original value. More...
 

Typedefs

template<class Input , class Inject , class Pos , bool AssumeSorted = true>
using Dune::ACFem::InsertAt = typename InsertAtHelper< Sequence< typename Input::value_type >, Input, Inject, Pos, AssumeSorted >::Type
 Insert Inject into the sequence Input at the position specified by Pos. More...
 
template<class SeqIn , class SeqOut = Sequence<typename SeqIn::value_type>, class TransformFunctor = IdentityFunctor, class AcceptFunctor = AcceptAllFunctor>
using Dune::ACFem::TransformSequence = typename TransformSequenceHelper< SeqIn, SeqOut, TransformFunctor, AcceptFunctor >::Type
 General sequence transformation alias. More...
 
template<class Seq1 , class Seq2 >
using Dune::ACFem::CatSequence = TransformSequence< Seq1, Seq2 >
 Concatenate the given sequences to <Seq2, Seq1>
 
template<class... S>
using Dune::ACFem::SequenceCat = typename SequenceCatHelper2< S... >::Type
 Concatenate the given sequences, in order, to <S0, S1, ... >.
 
template<std::size_t N, class Seq >
using Dune::ACFem::SequenceProd = typename SequenceProdHelper< N, Seq, Sequence< typename Seq::value_type > >::Type
 Compute the "product" multi index of N identical copies.
 
template<std::size_t count, class Seq >
using Dune::ACFem::SequenceSplice = typename SequenceSpliceHelper< count, Seq >::Type
 Splice the sequence by repeating each value the given amount of times.
 
template<class F , class Seq , class Tout = typename F::template Apply<typename Seq::value_type, 0, 0>::value_type>
using Dune::ACFem::TransformedSequence = TransformSequence< Seq, Sequence< Tout >, F >
 Transform given sequence. More...
 
template<class F , class Seq >
using Dune::ACFem::CatTransformedSequence = TransformSequence< Seq, Seq, F >
 Transform only the element at the given position of the given sequence. More...
 
template<class F , class Seq >
using Dune::ACFem::TransformUnique = TransformSequence< Seq, Sequence< typename Seq::value_type >, F, AcceptEqualFunctor< false > >
 Apply the functor F::template value_type<I>::value to each element in Seq; add to the output/sequence if the result differs from I.
 
template<class F , class Seq >
using Dune::ACFem::CatTransformUnique = TransformSequence< Seq, Seq, F, AcceptEqualFunctor< false > >
 Concat the result of TransformUnique with the original sequence.
 
template<class F , class Seq , std::size_t... Index>
using Dune::ACFem::TransformOnly = TransformSequence< Seq, Sequence< typename Seq::value_type >, TransformAtIndexFunctor< F, Index... >, AcceptAllFunctor >
 Transform only those elements specified by the parameter pack Index. More...
 

Functions

template<std::ptrdiff_t Offset, class T , T... Ts>
constexpr auto Dune::ACFem::offsetSequence (Sequence< T, Ts... >=Sequence< T, Ts... >{}, IntConstant< Offset >=IntConstant< Offset >{})
 Simple offset operation without the overhead of TransformSequence.
 

Detailed Description

Apply transformation functors to given integer sequences.

Typedef Documentation

◆ CatTransformedSequence

template<class F , class Seq >
using Dune::ACFem::CatTransformedSequence = typedef TransformSequence<Seq, Seq, F>

Transform only the element at the given position of the given sequence.

Cat transformed sequence with original sequence.

◆ InsertAt

template<class Input , class Inject , class Pos , bool AssumeSorted = true>
using Dune::ACFem::InsertAt = typedef typename InsertAtHelper<Sequence<typename Input::value_type>, Input, Inject, Pos, AssumeSorted>::Type

Insert Inject into the sequence Input at the position specified by Pos.

The tuple look-alike insertAt<Pos>(input, inject).

◆ TransformedSequence

template<class F , class Seq , class Tout = typename F::template Apply<typename Seq::value_type, 0, 0>::value_type>
using Dune::ACFem::TransformedSequence = typedef TransformSequence<Seq, Sequence<Tout>, F>

Transform given sequence.

Shortcut for TransformSeuence template with less complicated arguments.

◆ TransformOnly

template<class F , class Seq , std::size_t... Index>
using Dune::ACFem::TransformOnly = typedef TransformSequence<Seq, Sequence<typename Seq::value_type>, TransformAtIndexFunctor<F, Index...>, AcceptAllFunctor>

Transform only those elements specified by the parameter pack Index.

The given transform functors Apply template is not instantiated for the other indices.

◆ TransformSequence

template<class SeqIn , class SeqOut = Sequence<typename SeqIn::value_type>, class TransformFunctor = IdentityFunctor, class AcceptFunctor = AcceptAllFunctor>
using Dune::ACFem::TransformSequence = typedef typename TransformSequenceHelper<SeqIn, SeqOut, TransformFunctor, AcceptFunctor>::Type

General sequence transformation alias.

Parameters
SeqInInput integer sequence.
SeqOutInitial output sequence. Result of transformation will we prepended to SeqOut.
TransformFunctorA type proving an "Apply" template like follows, where N is the index into the input sequence and Tin its value type, V the current untransformed value:
struct TransformFunctor
{
template<class Tin, Tin V, std::size_t N>
using Apply = Constant<Tout, RESULT>;
};
integral_constant< T, V > Constant
Short-cut for any integral constant.
Definition: types.hh:40
Parameters
AcceptFunctorA type providing an "Apply" template like follows, where Tin, Tout are the value-types of the input and output sequence, V the current untransformed value and FV the transformed value after applying the TransformFunctor. The output sequence will only contain elements which lead to std::true_type.
struct AcceptFunctor
{
template<class Tin, Tin V, class Tout, Tout FV>
using Apply = BoolConstant<RESULT>;
}
Constant< bool, V > BoolConstant
Short-cut for integral constant of type bool.
Definition: types.hh:48
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 27, 23:30, 2024)