Talk:K-d tree: Difference between revisions

No edit summary
 
Line 149:
 
std::nth_element(&nodes_[begin], &nodes_[n], &nodes_[end], node_cmp(index));
 
: The correct fix is to replace &nodes_[end] by &nodes[0] + end, which is fine provided that nodes_ is not empty (the end pointer is not dereferenced). I'll fix the code soon. [[User:Simonjsaunders|Simonjsaunders]] ([[User talk:Simonjsaunders|talk]]) 12:44, 24 April 2020 (UTC)
1,777

edits