|
dune-typetree 2.12-git
|
Loading...
Searching...
No Matches
traversal.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright © DUNE Project contributors, see file LICENSE.md in module root
32 // SFINAE template check that Tree has a degree() function and a child() function accepting integer indices
58 std::enable_if_t<(Tree::isComposite or (Tree::isPower and (pathType!=TreePathType::dynamic))), int> = 0>
61 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, Dune::index_constant<indices>{}))...);
68 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, indices))...);
75 return Detail::leafTreePathTuple<Tree, pathType>(prefix, std::make_index_sequence<Tree::degree()>{});
108 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
constexpr auto leafTreePathTuple()
Create tuple of tree paths to leafs.
Definition traversal.hh:163
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:184
constexpr auto hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:60
decltype((std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) DynamicTraversalConcept
Definition traversal.hh:37
decltype((std::integral_constant< std::size_t, Tree::degree()>{})) StaticTraversalConcept
Definition traversal.hh:43
void applyToTree(T &&tree, TreePath treePath, V &&visitor)
Definition traversal.hh:91
constexpr auto leafTreePathTuple(Prefix prefix)
Definition traversal.hh:48
static constexpr IntegralRange< std::decay_t< T > > range(T &&from, U &&to) noexcept
constexpr void forEach(Range &&range, F &&f)
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)
T make_tuple(T... args)
T reduce(T... args)
T tuple_cat(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8