Simple tree structure with alternating half splitting nodes. More...
#include <KDTree.h>
Classes | |
| struct | Node |
| Stores kd-tree node data. More... | |
Public Types | |
| typedef TCoordType | coord_type |
| typedef CDT::V2d< coord_type > | point_type |
| typedef CDT::VertInd | point_index |
| typedef std::pair< point_type, point_index > | value_type |
| typedef std::vector< point_index > | point_data_vec |
| typedef point_data_vec::const_iterator | pd_cit |
| typedef CDT::VertInd | node_index |
| typedef CDT::array< node_index, 2 > | children_type |
Public Member Functions | |
| KDTree () | |
| Default constructor. | |
| KDTree (const point_type &min, const point_type &max) | |
| Constructor with bounding box known in advance. | |
| CDT::VertInd | size () const |
| void | insert (const point_index &iPoint, const std::vector< point_type > &points) |
| Insert a point into kd-tree. | |
| value_type | nearest (const point_type &point, const std::vector< point_type > &points) const |
| Query kd-tree for a nearest neighbor point. | |
Simple tree structure with alternating half splitting nodes.
Simple tree structure
| TCoordType | type used for storing point coordinate. |
| NumVerticesInLeaf | The number of points per leaf. |
| InitialStackDepth | initial size of stack depth for nearest query. Should be at least 1. |
| StackDepthIncrement | increment of stack depth for nearest query when stack depth is reached. |
| typedef CDT::array<node_index, 2> CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::children_type |
| typedef TCoordType CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::coord_type |
| typedef CDT::VertInd CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::node_index |
| typedef point_data_vec::const_iterator CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::pd_cit |
| typedef std::vector<point_index> CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::point_data_vec |
| typedef CDT::VertInd CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::point_index |
| typedef CDT::V2d<coord_type> CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::point_type |
| typedef std::pair<point_type, point_index> CDT::KDTree::KDTree< TCoordType, NumVerticesInLeaf, InitialStackDepth, StackDepthIncrement >::value_type |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |