KDTree icon indicating copy to clipboard operation
KDTree copied to clipboard

will nth_element make some bug?

Open dongfangzhou1108 opened this issue 4 years ago • 1 comments

when build the tree, if the nth number(middle nuumber) have other same member, the seperation of the left/right sub tree will have some error, right? because this will not fit the condition, which in one dim, left subtree is <= father node, and right subtree is > father node, when the condition occur, i think it will effect query operation. thank you

dongfangzhou1108 avatar Aug 04 '21 07:08 dongfangzhou1108

off the top of my head, I can't be sure, I'll think about this and try to come up with a test-case to make sure everything works as expected.

crvs avatar Aug 09 '21 06:08 crvs