提交 896d97ec 编写于 作者: M Marius Muja

Fixed compilation issues

上级 02b422f2
...@@ -52,7 +52,7 @@ namespace flann ...@@ -52,7 +52,7 @@ namespace flann
struct KDTreeSingleIndexParams : public IndexParams { struct KDTreeSingleIndexParams : public IndexParams {
KDTreeSingleIndexParams(int leaf_max_size_ = 10, bool reorder_ = true, int dim_ = -1) : KDTreeSingleIndexParams(int leaf_max_size_ = 10, bool reorder_ = true, int dim_ = -1) :
IndexParams(KDTREE_SINGLE), leaf_max_size(leaf_max_size_), IndexParams(FLANN_INDEX_KDTREE_SINGLE), leaf_max_size(leaf_max_size_),
reorder(reorder_), dim(dim_) {}; reorder(reorder_), dim(dim_) {};
int leaf_max_size; int leaf_max_size;
...@@ -170,7 +170,7 @@ public: ...@@ -170,7 +170,7 @@ public:
flann_algorithm_t getType() const flann_algorithm_t getType() const
{ {
return KDTREE; return FLANN_INDEX_KDTREE_SINGLE;
} }
/** /**
...@@ -486,11 +486,11 @@ private: ...@@ -486,11 +486,11 @@ private:
for (size_t i=0;i<dim;++i) { for (size_t i=0;i<dim;++i) {
if (vec[i]<root_bbox[i].low) { if (vec[i]<root_bbox[i].low) {
dists[i] = distance.accum_dist(vec[i], root_bbox[i].low); dists[i] = distance.accum_dist(vec[i], root_bbox[i].low, i);
distsq += dists[i]; distsq += dists[i];
} }
if (vec[i]>root_bbox[i].high) { if (vec[i]>root_bbox[i].high) {
dists[i] = distance.accum_dist(vec[i], root_bbox[i].high); dists[i] = distance.accum_dist(vec[i], root_bbox[i].high, i);
distsq += dists[i]; distsq += dists[i];
} }
} }
...@@ -530,12 +530,12 @@ private: ...@@ -530,12 +530,12 @@ private:
if ((diff1+diff2)<0) { if ((diff1+diff2)<0) {
bestChild = node->child1; bestChild = node->child1;
otherChild = node->child2; otherChild = node->child2;
cut_dist = distance.accum_dist(val, node->divhigh); cut_dist = distance.accum_dist(val, node->divhigh, idx);
} }
else { else {
bestChild = node->child2; bestChild = node->child2;
otherChild = node->child1; otherChild = node->child1;
cut_dist = distance.accum_dist( val, node->divlow); cut_dist = distance.accum_dist( val, node->divlow, idx);
} }
/* Call recursively to search next level down. */ /* Call recursively to search next level down. */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册