|
dune-typetree 2.12-git
|
Loading...
Searching...
No Matches
accumulate_static.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
108 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath, bool doVisit>
119 template<typename Node, typename Functor, typename Reduction, typename Functor::result_type current_value, typename TreePath>
125 static const result_type result = Reduction::template reduce<current_value,Functor::template visit<Node,TreePath>::result>::result;
130 template<typename Tree, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, typename Tag>
134 template<typename LeafNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
135 struct accumulate_value<LeafNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,LeafNodeTag>
142 accumulate_node_helper<LeafNode,Functor,Reduction,current_value,TreePath,Functor::template doVisit<LeafNode,TreePath>::value>::result;
147 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t i, std::size_t n>
157 static const result_type child_result = accumulate_value<child,Functor,Reduction,ParentChildReduction,current_value,child_tree_path,NodeTag<child>>::result;
159 static const result_type result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,child_result,TreePath,i+1,n>::result;
164 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath, std::size_t n>
165 struct accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,n,n>
176 template<typename Node, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
182 static const result_type child_result = accumulate_over_children<Node,Functor,Reduction,ParentChildReduction,current_value,TreePath,0,StaticDegree<Node>::value>::result;
185 accumulate_node_helper<Node,Functor,ParentChildReduction,child_result,TreePath,Functor::template doVisit<Node,TreePath>::value>::result;
191 template<typename PowerNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
192 struct accumulate_value<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,PowerNodeTag>
193 : public accumulate_value_generic_composite_node<PowerNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
197 template<typename CompositeNode, typename Functor, typename Reduction, typename ParentChildReduction, typename Functor::result_type current_value, typename TreePath>
198 struct accumulate_value<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath,CompositeNodeTag>
199 : public accumulate_value_generic_composite_node<CompositeNode,Functor,Reduction,ParentChildReduction,current_value,TreePath>
261 template<typename Tree, typename Functor, typename Reduction, typename Functor::result_type startValue, typename ParentChildReduction = Reduction>
269 static const result_type result = accumulate_value<Tree,Functor,Reduction,ParentChildReduction,startValue,HybridTreePath<>,NodeTag<Tree>>::result;
287 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath, bool doVisit>
296 template<typename Node, typename Functor, typename Reduction, typename current_type, typename TreePath>
311 template<typename Tree, typename Policy, typename current_type, typename TreePath, typename Tag>
335 template<typename current_type, typename tree_path, typename start_type, typename reduction_strategy>
368 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t i, std::size_t n>
402 template<typename Node, typename Policy, typename current_type, typename TreePath, std::size_t n>
604 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
typename std::decay_t< Node >::NodeTag NodeTag
Returns the node tag of the given Node.
Definition nodeinterface.hh:70
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:60
STL namespace.
void push_back(const MemberType &item)
decltype(auto) constexpr unpackIntegerSequence(F &&f, std::integer_sequence< I, i... > sequence)
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
decltype(auto) child(Node &&node, TreePath< Indices... > treePath)
typename Impl::ChildTraits< Node, indices... >::type Child
Dune::HybridMultiIndex< T... > TreePath
constexpr auto treePath(const T &... t)
constexpr std::integer_sequence< T, II..., T(IN)> push_back(std::integer_sequence< T, II... >, std::integral_constant< T, IN >={})
constexpr index_constant< 0 > _0
Statically combine two values of type result_type using ||.
Definition accumulate_static.hh:28
Definition accumulate_static.hh:31
static const result_type result
Definition accumulate_static.hh:32
Statically combine two values of type result_type using &&.
Definition accumulate_static.hh:39
Definition accumulate_static.hh:42
static const result_type result
Definition accumulate_static.hh:43
Statically combine two values of type result_type using +.
Definition accumulate_static.hh:50
Definition accumulate_static.hh:53
static const result_type result
Definition accumulate_static.hh:54
Statically combine two values of type result_type using -.
Definition accumulate_static.hh:61
Definition accumulate_static.hh:64
static const result_type result
Definition accumulate_static.hh:65
Statically combine two values of type result_type using *.
Definition accumulate_static.hh:72
Definition accumulate_static.hh:75
static const result_type result
Definition accumulate_static.hh:76
Statically combine two values of type result_type by returning their minimum.
Definition accumulate_static.hh:83
Definition accumulate_static.hh:86
static const result_type result
Definition accumulate_static.hh:87
Statically combine two values of type result_type by returning their maximum.
Definition accumulate_static.hh:94
Definition accumulate_static.hh:97
static const result_type result
Definition accumulate_static.hh:98
Statically accumulate a value over the nodes of a TypeTree.
Definition accumulate_static.hh:263
Functor::result_type result_type
The result type of the computation.
Definition accumulate_static.hh:266
static const result_type result
The accumulated result of the computation.
Definition accumulate_static.hh:269
Definition accumulate_static.hh:470
ParentChildReduction parent_child_reduction
Definition accumulate_static.hh:528
StartType start_type
Definition accumulate_static.hh:536
ReductionAlgorithm reduction_strategy
Definition accumulate_static.hh:542
Reduction sibling_reduction
Definition accumulate_static.hh:520
Statically accumulate a type over the nodes of a TypeTree.
Definition accumulate_static.hh:557
accumulate_type< Tree, Policy, typenamePolicy::start_type, HybridTreePath<>, NodeTag< Tree > >::type type
The accumulated result of the computation.
Definition accumulate_static.hh:566
T reduce(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8