ATLAS Offline Software
|
#include <KDPoint.h>
Classes | |
class | Node |
Node class for KDTree. More... | |
Public Member Functions | |
KDTree (std::vector< KDPoint< T, D >> &v_data) | |
KDTree () | |
void | genTree () |
Command to generate tree. More... | |
void | lock () |
void | unlock () |
KDPoint< T, D > | at (size_t n) |
Private Member Functions | |
std::unique_ptr< Node > | buildTree (int, int, int) |
recursive function to create tree structure. More... | |
void | nearestNeighborRec (const KDPoint< T, D > &, const Node *, double &, int &, std::function< double(const KDPoint< T, D > &, const KDPoint< T, D > &)> &) |
recursive function for nearest neighbor searching. More... | |
Private Attributes | |
std::unique_ptr< Node > | m_rootNode |
The root node of the tree. More... | |
std::vector< KDPoint< T, D > > | m_datas |
Container of the points. More... | |
std::vector< size_t > | m_indices |
A list of indices of points in m_datas. More... | |
size_t | m_idLength |
bool | m_locked |
Can be used for fast point searching, which is needed in clustering.
|
inline |
|
inline |
|
inline |
|
private |
recursive function to create tree structure.
[in] | l | Index of the left edge of current region. |
[in] | r | Index of the right edge of current region. |
[in] | depth | Depth of current node. Axe to be separated is selected according to this param. |
void TrigVSI::KDTree< T, D >::genTree |
Command to generate tree.
Needed to be locked before execute this command.
|
inline |
|
private |
recursive function for nearest neighbor searching.
[in] | query | query point for searching. |
[in] | node | current node to check. |
[out] | r | minimum distance to query point. |
[out] | idx | index of candidate point. |
[in] | dist_func | function to calculate the distance between current point and the query point. |
Definition at line 253 of file KDPoint.h.
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |