27 #ifndef MPBLOCKS_KD_TREE_NODE_H_
28 #define MPBLOCKS_KD_TREE_NODE_H_
57 template <
class Traits>
68 typedef Eigen::Matrix<Format_t,Traits::NDim,1>
Vector_t;
126 template <
typename BackInserter >
void insert(Node_t *)
recursively inserts point as a new node in the tree
void construct(Node_t *parent, unsigned int i)
construct a new node
Point_t m_point
the point that this node contains
Node_t * getParent()
return the parent node
unsigned int m_i
dimension that this node splits on, also index of hyperplane's constant component ...
void enumerate(HyperRect_t &container, BackInserter bs)
Node_t * m_greaterChild
child node who's i'th value is larger
RangeSearchIface< Traits > RangeIface_t
pairs nodes of the Kd tree along with a hyperrectangle that is the bounding volume for the subtree ro...
ListPair< Traits > Pair_t
const Point_t & getPoint()
returns a Point_t of the point stored at this node
Interface for nearest node type searches.
Traits::HyperRect HyperRect_t
Node()
does nothing, see construct
Traits::Format_t Format_t
void setPoint(const Point_t &p)
fill point data (convenience method)
NearestSearchIface< Traits > NNIface_t
Eigen::Matrix< Format_t, Traits::NDim, 1 > Vector_t
the node class must be defined in traits since it uses the CTRP, it must derive from kd_tree::Node<Tr...
Base class for nodes in the kd tree.
Node_t * m_parent
parent node
Node_t * m_smallerChild
child node who's i'th value is smaller
double Format_t
number format (i.e. double, float)
void findRange(RangeIface_t &search, HyperRect_t &rect)
find all nodes in the tree that lie inside the specified range ( can be arbitrary volume...
void findNearest(const Point_t &q, HyperRect_t &rect, NNIface_t &search)
perform a generic Nearest Neighbor query, different queries provide different implementations of the ...
an NDim dimensional hyperrectangle, represented as a min and max extent