|
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor > |
void | iterateTree (KdTree< TNode, TMetric > &tree, IScheduler &scheduler, const TFunctor &functor, const Size nodeIdx=0, const Size depthLimit=Size(-1)) |
| Calls a functor for every node of a K-d tree tree in specified direction. More...
|
|
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor > |
void | iterateTree (const KdTree< TNode, TMetric > &tree, IScheduler &scheduler, const TFunctor &functor, const Size nodeIdx=0, const Size depthLimit=Size(-1)) |
|
K-d tree for efficient search of neighbouring particles.
- Author
- Pavel Sevecek (sevecek at sirrah.troja.mff.cuni.cz))
- Date
- 2016-2021
Definition in file KdTree.h.
template<IterateDirection Dir, typename TNode , typename TMetric , typename TFunctor >
void iterateTree |
( |
KdTree< TNode, TMetric > & |
tree, |
|
|
IScheduler & |
scheduler, |
|
|
const TFunctor & |
functor, |
|
|
const Size |
nodeIdx = 0 , |
|
|
const Size |
depthLimit = Size(-1) |
|
) |
| |
Calls a functor for every node of a K-d tree tree in specified direction.
The functor is called with the node as a parameter. For top-down direction, functor may return false to skip all children nodes from processing, otherwise the iteration proceedes through the tree into leaf nodes.
- Parameters
-
tree | KdTree to iterate. |
scheduler | Scheduler used for sequential or parallelized task execution |
functor | Functor executed for every node |
nodeIdx | Index of the first processed node; use 0 for root node |
depthLimit | Maximal depth processed in parallel. |
Definition at line 465 of file KdTree.inl.h.