"Unsafe" KdTree.
More...
#include <kdtree.hpp>
|
template<typename Builder = KdTreeBuilder> |
| UnsafeKdTree (const PointCloud &points, const Builder &builder=KdTreeBuilder()) |
| Constructor. More...
|
|
size_t | nearest_neighbor_search (const Eigen::Vector4d &query, size_t *k_indices, double *k_sq_dists, const KnnSetting &setting=KnnSetting()) const |
| Find the nearest neighbor. More...
|
|
size_t | knn_search (const Eigen::Vector4d &query, int k, size_t *k_indices, double *k_sq_dists, const KnnSetting &setting=KnnSetting()) const |
| Find k-nearest neighbors. This method uses dynamic memory allocation. More...
|
|
template<int N> |
size_t | knn_search (const Eigen::Vector4d &query, size_t *k_indices, double *k_sq_dists, const KnnSetting &setting=KnnSetting()) const |
| Find k-nearest neighbors. This method uses fixed and static memory allocation. Might be faster for small k. More...
|
|
template<typename PointCloud, typename Projection_ = AxisAlignedProjection>
struct small_gicp::UnsafeKdTree< PointCloud, Projection_ >
"Unsafe" KdTree.
- Note
- This class does not hold the ownership of the input points. You must keep the input points along with this class.
◆ Node
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
◆ Projection
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
◆ UnsafeKdTree()
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
template<typename Builder = KdTreeBuilder>
Constructor.
- Parameters
-
points | Point cloud |
builder | Kd-tree builder |
◆ knn_search() [1/2]
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
Find k-nearest neighbors. This method uses dynamic memory allocation.
- Parameters
-
query | Query point |
k | Number of neighbors |
k_indices | Indices of neighbors |
k_sq_dists | Squared distances to neighbors (sorted in ascending order) |
setting | KNN search setting |
- Returns
- Number of found neighbors
◆ knn_search() [2/2]
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
template<int N>
Find k-nearest neighbors. This method uses fixed and static memory allocation. Might be faster for small k.
- Parameters
-
query | Query point |
k_indices | Indices of neighbors |
k_sq_dists | Squared distances to neighbors (sorted in ascending order) |
setting | KNN search setting |
- Returns
- Number of found neighbors
◆ nearest_neighbor_search()
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
Find the nearest neighbor.
- Parameters
-
query | Query point |
k_indices | Index of the nearest neighbor (uninitialized if not found) |
k_sq_dists | Squared distance to the nearest neighbor (uninitialized if not found) |
setting | KNN search setting |
- Returns
- Number of found neighbors (0 or 1)
◆ indices
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
Point indices refered by nodes.
◆ nodes
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
◆ points
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
◆ root
template<typename PointCloud , typename Projection_ = AxisAlignedProjection>
Root node index (should be zero)
The documentation for this struct was generated from the following file:
- /home/runner/work/small_gicp/small_gicp/include/small_gicp/ann/kdtree.hpp