Jump to content

K-d tree: Difference between revisions

m
C++ bug fix
m (→‎{{header|Sidef}}: Fix link: Perl 6 --> Raku)
m (C++ bug fix)
Line 341:
return nullptr;
size_t n = begin + (end - begin)/2;
std::nth_element(&nodes_[begin], &nodes_[n], &nodes_[end0] + end, node_cmp(index));
index = (index + 1) % dimensions;
nodes_[n].left_ = make_tree(begin, n, index);
1,777

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.