39 if ( points.size() == 0 ) {
64 Size const median_idx( static_cast< Size > ( points.size() / 2 ) + 1 );
72 current->point( points[median_idx] );
73 current->split_axis( axis );
79 if ( points.size() > 1 ) {
81 points.begin(), points.begin() + median_idx - 1
84 current->left_child()->parent( current );
86 if ( points.size() > 2 ) {
88 points.begin() + median_idx, points.end()
91 current->right_child()->parent( current );
constants used for kd-tree implementation
Implementation of a node in a kd-tree. See numeric/kdtree/kdtree.hh for more information.
utility functions for kd-tree. See kdtree.hh for more information.
ReferenceCount base class – dispatch class.
utility::pointer::shared_ptr< KDNode > KDNodeOP
utility::pointer::ReferenceCount forward declarations
KDNodeOP construct_kd_tree(utility::vector1< KDPointOP > &points, numeric::Size depth, KDTree &tree)
Function for constructing a KDTree. Returns a KDNodeOP that represents the root of the tree...