27 #ifndef MPBLOCKS_KD_TREE_EUCLIDEAN_KNEAREST_H_
28 #define MPBLOCKS_KD_TREE_EUCLIDEAN_KNEAREST_H_
37 template <
class Traits,
38 template<
class>
class Allocator = std::allocator >
52 typedef Eigen::Matrix<Format_t,Traits::NDim,1>
Point_t;
53 typedef std::set<Key_t,KeyCompare_t,Allocator_t>
PQueue_t;
100 #endif // NEARESTNEIGHBOR_H_
HyperRect< Traits > HyperRect_t
provides euclidean distance computation
Key_t::Compare KeyCompare_t
Allocator< Key_t > Allocator_t
Traits::Format_t Format_t
Interface for nearest node type searches.
std::set< Key_t, KeyCompare_t, Allocator_t > PQueue_t
Distance< Traits > Distance_t
KNearest(unsigned int k=1)
virtual bool shouldRecurse(const Point_t &q, const HyperRect_t &r)
evaluate the Euclidean distance from q to it's closest point in r and if that distance is less than t...
const PQueue_t & result()
the node class must be defined in traits since it uses the CTRP, it must derive from kd_tree::Node<Tr...
virtual void evaluate(const Point_t &q, const Point_t &p, Node_t *n)
calculates Euclidean distance from q to p, and if its less than the current best replaces the current...
double Format_t
number format (i.e. double, float)
Eigen::Matrix< Format_t, Traits::NDim, 1 > Point_t
an NDim dimensional hyperrectangle, represented as a min and max extent