![]() |
RobWorkProject
25.2.11-
|
a space partitioning structure for organizing points in k-dimensional space. Used for searches involving multi.dimensional search keys, including nearest neighbor and range search. More...
#include <KDTree.hpp>
Classes | |
struct | KDNode |
a struct for the node in the tree More... | |
struct | KDResult |
Public Member Functions | |
KDTree (rw::core::Ptr< rw::math::Metric< KEY >> metric) | |
Constructor. More... | |
virtual | ~KDTree () |
destructor | |
rw::core::Ptr< rw::math::Metric< KEY > > | getMetric () |
size_t | getDimensions () const |
gets the number of dimensions that this KDTree supports More... | |
void | addNode (const KEY &key, boost::any val) |
adds a key value pair to the KDTree. More... | |
KDNode * | search (const KEY &nnkey) |
finds the KDNode with key equal to nnkey More... | |
KDNode & | nnSearch (const KEY &nnkey) |
finds the KDNode with the key closest too nnkey More... | |
void | nnSearchElipse (const KEY &nnkey, const KEY &radi, std::list< const KDNode * > &nodes) |
finds all neighbors in the hyperelipse with radius radi and center in nnkey. More... | |
void | nnSearchElipseRect (const KEY &nnkey, const KEY &radi, std::list< const KDNode * > &nodes) |
finds all neighbors in the hyperelipse with radius radi and center in nnkey. More... | |
void | nnSearchRect (const KEY &low, const KEY &upp, std::list< const KDNode * > &nodes) |
finds all neighbors in the hyperrectangle defined by the lower bound and the upper bound | |
Static Public Member Functions | |
static KDTree< KEY, DIM > * | buildTree (std::vector< KDNode > &nodes, rw::core::Ptr< rw::math::Metric< KEY >> metric) |
Builds a KDTree from a list of key values and nodes. This method is more efficient than creating an empty KDTree and then inserting nodes. More... | |
static KDTree< KEY, DIM > * | buildTree (const std::vector< KDNode * > &nodes, rw::core::Ptr< rw::math::Metric< KEY >> metric) |
Builds a KDTree from a list of key values and nodes. This method is more efficient than creating an empty KDTree and then inserting nodes. More... | |
a space partitioning structure for organizing points in k-dimensional space. Used for searches involving multi.dimensional search keys, including nearest neighbor and range search.
KEY must implement: copyable operator[] operator() TODO: remove one of the operators (change code in KDTREE)
|
inline |
Constructor.
metric | documentation missing ! |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inline |
gets the number of dimensions that this KDTree supports
|
inline |
finds the KDNode with the key closest too nnkey
nnkey | [in] the key to which the nearest neighbor is found |
|
inline |
finds all neighbors in the hyperelipse with radius radi and center in nnkey.
nnkey | [in] the center of the hyperelipse |
radi | [in] the radius of the hyperelipse in euclidean 2-norm |
nodes | [out] a container for all nodes that is found within the hyperelipse |
|
inline |
finds all neighbors in the hyperelipse with radius radi and center in nnkey.
nnkey | [in] the center of the hyperelipse |
radi | [in] the radius of the hyperelipse in euclidean 2-norm |
nodes | [out] a container for all nodes that is found within the hyperelipse |
|
inline |