cheshirekow  v0.1.0
HyperRect.h
Go to the documentation of this file.
1 
9 #ifndef MPBLOCKS_KD_TREE_EUCLIDEAN_HYPERRECT_H_
10 #define MPBLOCKS_KD_TREE_EUCLIDEAN_HYPERRECT_H_
11 
12 
13 namespace mpblocks {
14 namespace kd_tree {
15 namespace euclidean {
16 
18 
22 template <class Traits>
23 struct HyperRect
24 {
25  typedef typename Traits::Format_t Format_t;
26  typedef Eigen::Matrix<Format_t,Traits::NDim,1> Vector_t;
27  typedef Vector_t Point_t;
28 
31 
33  HyperRect();
34 
37  Format_t dist2(const Point_t& point);
38 
40  Format_t measure();
41 };
42 
43 
44 } // namespace euclidean
45 } // namespace kd_tree
46 } // namespace mpblocks
47 
48 #endif
Point_t maxExt
maximum extent of hyper-rectangle
Definition: HyperRect.h:30
Eigen::Matrix< Format_t, Traits::NDim, 1 > Vector_t
Definition: HyperRect.h:26
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) ...
Definition: HyperRect.hpp:32
HyperRect()
initialize min and max ext to be 0,0,...
Definition: HyperRect.hpp:20
Format_t measure()
return the measure of the hypercube
Definition: HyperRect.hpp:57
double Format_t
number format (i.e. double, float)
Definition: Traits.h:38
Point_t minExt
minimum extent of hyper-rectangle
Definition: HyperRect.h:29
an NDim dimensional hyperrectangle, represented as a min and max extent
Definition: HyperRect.h:23