Dune Core Modules (2.9.0)

Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm > Struct Template Reference

#include <dune/typetree/accumulate_static.hh>

Public Types

typedef Functor functor
 
typedef Reduction sibling_reduction
 
typedef ParentChildReduction parent_child_reduction
 
typedef StartType start_type
 
typedef ReductionAlgorithm reduction_strategy
 

Detailed Description

template<typename Functor, typename Reduction, typename StartType, typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
struct Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >

Policy for controlling the static type accumulation algorithm AccumulateType. See the documentation of nested types for further information.

Template Parameters
startTypeThe start type fed into the initial accumulation step.

Member Typedef Documentation

◆ functor

template<typename Functor , typename Reduction , typename StartType , typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
typedef Functor Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >::functor

The compile-time functor used for visiting each node.

This functor must implement the following interface:

struct AccumulationFunctor
{
// Decide whether to include the given node in the calculation
// or to skip it.
template<typename Node, typename TreePath>
struct doVisit
{
static const bool value = true;
};
// Calculate the per-node result.
template<typename Node, typename TreePath>
struct visit
{
typedef ... type;
};
};

◆ parent_child_reduction

template<typename Functor , typename Reduction , typename StartType , typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
typedef ParentChildReduction Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >::parent_child_reduction

The reduction operator used to combine the accumulated result of all children of a node with the result of the parent node.

This operator has the same interface as sibling_reduction.

◆ reduction_strategy

template<typename Functor , typename Reduction , typename StartType , typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
typedef ReductionAlgorithm Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >::reduction_strategy

The strategy for performing the type reduction with regard to the tree structure. Valid values are flattened_reduction and bottom_up_reduction.

◆ sibling_reduction

template<typename Functor , typename Reduction , typename StartType , typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
typedef Reduction Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >::sibling_reduction

The reduction operator used to accumulate the per-node results of sibling nodes.

The reduction operator must implement the following interface:

struct ReductionOperator
{
// combine two per-node results
template<typename T1, typename T2>
struct reduce
{
typedef ... type;
};
};

◆ start_type

template<typename Functor , typename Reduction , typename StartType , typename ParentChildReduction = Reduction, typename ReductionAlgorithm = flattened_reduction>
typedef StartType Dune::TypeTree::TypeAccumulationPolicy< Functor, Reduction, StartType, ParentChildReduction, ReductionAlgorithm >::start_type

The initial result type. This type will be feed as first operand to the reduction operators when doing the first accumulation (and there is no calculated result to accumulate with yet).


The documentation for this struct was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.80.0 (Apr 24, 22:30, 2024)