Analysis Software
Documentation for sPHENIX simulation software
|
An abstract class containing common features of k-d tree node types. More...
Public Types | |
enum | NodeType |
Enumeration type for the possible node types (internal and leaf). More... | |
Public Member Functions | |
KDTreeNode (iterator_t _b, iterator_t _e, NodeType _t, std::size_t _d) | |
Construct the common data for all node types. | |
template<typename Callable > | |
void | rangeSearchMapDiscard (const range_t &r, Callable &&f) const |
Perform a range search in the k-d tree, mapping the key-value pairs to a side-effecting function. | |
std::size_t | size () const |
Determine the number of elements managed by this node. | |
const range_t & | range () const |
The axis-aligned bounding box containing all elements in this node. | |
Protected Attributes | |
NodeType | m_type |
const iterator_t | m_begin_it |
The start and end of the range of coordinate-value pairs under this node. | |
const iterator_t | m_end_it |
const range_t | m_range |
The axis-aligned bounding box of the coordinates under this node. | |
std::unique_ptr< KDTreeNode > | m_lhs |
Pointers to the left and right children. | |
std::unique_ptr< KDTreeNode > | m_rhs |
An abstract class containing common features of k-d tree node types.
A k-d tree consists of two different node types: leaf nodes and inner nodes. These nodes have some common functionality, which is captured by this common parent node type.
Definition at line 318 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 318 of file KDTree.hpp
enum Acts::KDTree::KDTreeNode::NodeType |
Enumeration type for the possible node types (internal and leaf).
Definition at line 321 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 321 of file KDTree.hpp
|
inline |
Construct the common data for all node types.
The node types share a few concepts, like an n-dimensional range, and a begin and end of the range of elements managed. This constructor calculates these things so that the individual child constructors don't have to.
Definition at line 329 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 329 of file KDTree.hpp
References KFPMath::a, KFPMath::b, distance(), i, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_begin_it, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_end_it, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_lhs, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_range, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_rhs, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_type, next, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::size(), and Acts::Experimental::detail::BlueprintHelper::sort().
|
inline |
The axis-aligned bounding box containing all elements in this node.
Definition at line 477 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 477 of file KDTree.hpp
References Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_range.
|
inline |
Perform a range search in the k-d tree, mapping the key-value pairs to a side-effecting function.
This is the most powerful range search method we have, assuming that we can use arbitrary side effects, which we can. All other range search methods are implemented in terms of this particular function.
r | The range to search for. |
f | The mapping function to apply to matching elements. |
Definition at line 415 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 415 of file KDTree.hpp
References assert, Acts::RangeXD< Dims, Type, Vector >::contains(), f, i, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_begin_it, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_end_it, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_lhs, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_range, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_rhs, Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_type, and physmon_track_finding_ttbar::r.
|
inline |
Determine the number of elements managed by this node.
Conveniently, this number is always equal to the distance between the begin iterator and the end iterator, so we can simply delegate to the relevant standard library method.
Definition at line 470 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 470 of file KDTree.hpp
References distance(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_begin_it, and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::m_end_it.
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode().
|
protected |
The start and end of the range of coordinate-value pairs under this node.
Definition at line 484 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 484 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::size().
|
protected |
Definition at line 484 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 484 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::size().
|
protected |
Pointers to the left and right children.
Definition at line 491 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 491 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard().
|
protected |
The axis-aligned bounding box of the coordinates under this node.
Definition at line 488 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 488 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::range(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard().
|
protected |
Definition at line 492 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 492 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard().
|
protected |
Definition at line 480 of file KDTree.hpp.
View newest version in sPHENIX GitHub at line 480 of file KDTree.hpp
Referenced by Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::KDTreeNode(), and Acts::KDTree< Dims, Type, Scalar, Vector, LeafSize >::KDTreeNode::rangeSearchMapDiscard().