|
dune-typetree 2.9.1
|
Loading...
Searching...
No Matches
traversal.hh
Go to the documentation of this file.
36 // SFINAE template check that Tree has a degree() function and a child() function accepting integer indices
62 std::enable_if_t<(Tree::isComposite or (Tree::isPower and (pathType!=TreePathType::dynamic))), int> = 0>
65 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, Dune::index_constant<indices>{}))...);
72 return std::tuple_cat(Detail::leafTreePathTuple<TypeTree::Child<Tree,indices>, pathType>(Dune::TypeTree::push_back(prefix, indices))...);
79 return Detail::leafTreePathTuple<Tree, pathType>(prefix, std::make_index_sequence<Tree::degree()>{});
119 using preferDynamicTraversal = std::bool_constant<Visitor::treePathType == TreePathType::dynamic>;
162 void forEachNode(T&& tree, TreePath treePath, PreFunc&& preFunc, LeafFunc&& leafFunc, PostFunc&& postFunc)
256 [[deprecated]] void forEachNode(Tree&& tree, PreFunc&& preFunc, LeafFunc&& leafFunc, PostFunc&& postFunc)
void forEachNode(Tree &&tree, PreFunc &&preFunc, LeafFunc &&leafFunc, PostFunc &&postFunc)
Traverse tree and visit each node.
Definition traversal.hh:256
constexpr auto leafTreePathTuple()
Create tuple of tree paths to leafs.
Definition traversal.hh:216
void forEachLeafNode(Tree &&tree, LeafFunc &&leafFunc)
Traverse tree and visit each leaf node.
Definition traversal.hh:304
void applyToTree(Tree &&tree, Visitor &&visitor)
Apply visitor to TypeTree.
Definition traversal.hh:237
typename impl::_Child< Node, indices... >::type Child
Template alias for the type of a child node given by a list of child indices.
Definition childextraction.hh:223
ImplementationDefined child(Node &&node, Indices... indices)
Extracts the child of a node given by a sequence of compile-time and run-time indices.
Definition childextraction.hh:126
constexpr HybridTreePath< T..., std::size_t > push_back(const HybridTreePath< T... > &tp, std::size_t i)
Appends a run time index to a HybridTreePath.
Definition treepath.hh:281
constexpr HybridTreePath< T... > hybridTreePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:180
constexpr HybridTreePath< T... > treePath(const T &... t)
Constructs a new HybridTreePath from the given indices.
Definition treepath.hh:191
HybridTreePath< Dune::index_constant< i >... > TreePath
Definition treepath.hh:521
void forEachNode(T &&tree, TreePath treePath, PreFunc &&preFunc, LeafFunc &&leafFunc, PostFunc &&postFunc)
Definition traversal.hh:162
decltype((std::declval< Tree >().degree(), std::declval< Tree >().child(0u))) DynamicTraversalConcept
Definition traversal.hh:41
decltype((std::integral_constant< std::size_t, Tree::degree()>{})) StaticTraversalConcept
Definition traversal.hh:47
void applyToTree(T &&tree, TreePath treePath, V &&visitor)
Definition traversal.hh:95
constexpr auto leafTreePathTuple(Prefix prefix)
Definition traversal.hh:52
static StaticIntegralRange< T, to > range(std::integral_constant< T, to >) noexcept
constexpr void forEach(Range &&range, F &&f)
typename detected_or< nonesuch, Op, Args... >::value_t is_detected
virtual void operator()()=0
A hybrid version of TreePath that supports both compile time and run time indices.
Definition treepath.hh:79
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