1 #ifndef KDTreeLinkerToolsTemplated_h 2 #define KDTreeLinkerToolsTemplated_h 16 KDTreeBox(
float d1min,
float d1max,
float d2min,
float d2max)
17 : dim1min(d1min), dim1max(d1max), dim2min(d2min), dim2max(d2max) {}
19 KDTreeBox() : dim1min(0), dim1max(0), dim2min(0), dim2max(0) {}
25 template <
typename DATA>
29 enum { kDim1 = 0, kDim2 = 1 };
37 template <
typename DATA>
49 bool empty()
const {
return poolPos == -1; }
50 int size()
const {
return poolPos + 1; }
67 poolSize = sizeData * 2 - 1;
68 median.resize(poolSize);
69 right.resize(poolSize);
70 dimOther.resize(poolSize);
71 data.resize(poolSize);
constexpr bool isLeaf(int right) const
std::vector< float > dimOther
std::vector< float > median
KDTreeBox(float d1min, float d1max, float d2min, float d2max)
bool isLeafIndex(int index) const
KDTreeNodeInfo(const DATA &d, float dim_1, float dim_2)