cheshirekow  v0.1.0
HyperRect.hpp
Go to the documentation of this file.
1 
9 #ifndef MPBLOCKS_KD_TREE_R2_S1_HYPERRECT_HPP_
10 #define MPBLOCKS_KD_TREE_R2_S1_HYPERRECT_HPP_
11 
12 #include <limits>
13 
14 namespace mpblocks {
15 namespace kd_tree {
16 namespace r2_s1 {
17 
18 
19 template < class Traits >
21 {
23  {
24  minExt.fill(0);
25  maxExt.fill(0);
26  }
27 }
28 
29 
30 
31 template < class Traits >
32 typename Traits::Format_t
34 {
35  Format_t s = 1.0;
36  for(unsigned int i=0; i < minExt.rows(); i++)
37  s *= maxExt[i] - minExt[i];
38 
39  return s;
40 }
41 
42 
43 
44 } // namespace r2_s1
45 } // namespace kd_tree
46 } // namespace mpblocks
47 
48 #endif
HyperRect()
initializes bounds to 0,0,...
Definition: HyperRect.hpp:20
Format_t measure()
return the measure of the hypercube
Definition: HyperRect.hpp:33
static const unsigned int NDim
number of dimensions
Definition: Traits.h:39
double Format_t
number format (i.e. double, float)
Definition: Traits.h:38