9 #ifndef MPBLOCKS_KD_TREE_EUCLIDEAN_HYPERRECT_HPP_
10 #define MPBLOCKS_KD_TREE_EUCLIDEAN_HYPERRECT_HPP_
19 template <
class Traits >
30 template <
class Traits >
37 for (
unsigned int i=0; i < point.rows(); i++)
39 if (point[i] < minExt[i])
40 dist2i = minExt[i] - point[i];
41 else if(point[i] > maxExt[i])
42 dist2i = maxExt[i] - point[i];
55 template <
class Traits >
60 for(
unsigned int i=0; i < minExt.rows(); i++)
61 s *= maxExt[i] - minExt[i];
Traits::Format_t Format_t
Format_t dist2(const Point_t &point)
find the nearest point in the hyper-rectangle to the query point and return it's distance (squared) ...
HyperRect()
initialize min and max ext to be 0,0,...
Format_t measure()
return the measure of the hypercube
double Format_t
number format (i.e. double, float)