template<typename Coordinate, typename Distance = details::SquaredDistance<Coordinate, 3>, typename NodeCmp = details::NodeCmp<3>>
class maliput::math::KDTree3D< Coordinate, Distance, NodeCmp >
3-Dimensional KDTree.
In addition it provides a RangeSearch method for range queries in the 3D-space.
KDTree<Vector3> tree{points};
tree.RangeSearch(region_1);
tree.RangeSearch(region_2);
...
tree.nearest_point(point_1);
- Template Parameters
-
Coordinate | Data type being used, must have:
- operator[] for accessing the value in each dimension.
|
Dimension | Dimension of the KD-tree. |
Distance | A functor used for getting the distance between two coordinates. By default, details::SquaredDistance is used. |
NodeCmp | A functor used for comparing two nodes at certain index/dimension. By default, details::NodeCmp is used. |
|
template<typename Iterator > |
| KDTree3D (Iterator begin, Iterator end) |
|
template<typename Collection > |
| KDTree3D (Collection &&points) |
| Constructs a KDTreeBase taking a vector of points. More...
|
|
std::deque< const Coordinate * > | RangeSearch (const AxisAlignedBox ®ion) const |
| Range search in the 3D-space. More...
|
|
| KDTreeBase (Iterator begin, Iterator end) |
| Constructs a KDTreeBase taking a pair of iterators. More...
|
|
| KDTreeBase (Collection &&points) |
| Constructs a KDTreeBase taking a vector of points. More...
|
|
const Coordinate & | nearest_point (const Coordinate &point) const |
| Finds the nearest point in the tree to the given point. More...
|
|
const Coordinate & | nearest_point (const Coordinate &point, double tolerance) const |
| Finds the nearest point in the tree to the given point. More...
|
|