Class Acts::KDTree::KDTreeNode

class KDTreeNode : public Acts::KDTree<Dims, Type, Scalar, Vector, LeafSize>::KDTreeAbstractNode

A non-leaf node in the k-d tree.

These nodes are not the direct parents of any coordinate-value pairs, but rather they are the parents of two other nodes. This means that this type of node represents a split of the candidate space across a particular dimension.

Public Functions

inline KDTreeNode(iterator_t _b, iterator_t _e)

Constract an internal node from a range of coordinate-value pairs.

The element range passed to this constructor is a subrange of the set of coordinate-value pairs owned by the outer-most parent node. The constructor rearranges the elements of this range.

Parameters
  • _b – The iterator for the start of the range of elements.

  • _e – The iterator for the end of the range of elements.

inline virtual void rangeSearchMapDiscard(const range_t &r, std::function<void(const coordinate_t&, const Type&)> f) const override

Perform a range search in this (sub-)k-d tree.

Performing a range search on an inner node is essentially the same as performing that same range search on both its children and appending them. However, we can also do some optimisations.

Parameters
  • r – The orthogonal range to search for.

  • f – The mapping function to execute.

inline virtual std::string toString(std::size_t i) const override

Debugging string method for this (sub-)k-d tree.

This prints information to stdout about the structure of the (sub-)tree defined by this node. Not designed for use in real code.

Parameters

i – The amount of indentation to use.