Potential Infinite Loop in KDTree
Closed
Potential Infinite Loop in KDTree
If max_depth
is set to inf
, and two (or more) Records have the same lon
and lat
, they cannot be split and will infinitely be assigned to the child_left
node. max_depth = inf
is the standard form for a KDTree
as each leaf should have only a single Record.
The previous approach of splitting the array in the middle would not lead to an infinite loop, however it this means that the child_left
and child_right
nodes can have Records with the same variable value. This could impact performance when querying, and make it more difficult to delete Records from the Tree.
added BUG label
created merge request !5 (merged) to address this issue
mentioned in merge request !5 (merged)
mentioned in commit 2fb05223
closed via merge request !5 (merged)