From 2598de69a2f7c2282084513730ffd5f14ce48f59 Mon Sep 17 00:00:00 2001 From: Devorenge Date: Sun, 29 Nov 2020 06:57:02 +0100 Subject: [PATCH] small edit to optimize the kdtree_single_index middleSplit method --- src/cpp/flann/algorithms/kdtree_single_index.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/cpp/flann/algorithms/kdtree_single_index.h b/src/cpp/flann/algorithms/kdtree_single_index.h index 53cb1df7..b2c495b1 100644 --- a/src/cpp/flann/algorithms/kdtree_single_index.h +++ b/src/cpp/flann/algorithms/kdtree_single_index.h @@ -451,13 +451,11 @@ class KDTreeSingleIndex : public NNIndex // find the largest span from the approximate bounding box ElementType max_span = bbox[0].high-bbox[0].low; cutfeat = 0; - cutval = (bbox[0].high+bbox[0].low)/2; for (size_t i=1; imax_span) { max_span = span; cutfeat = i; - cutval = (bbox[i].high+bbox[i].low)/2; } }