small_gicp
Public Types | Public Member Functions | Public Attributes | List of all members
small_gicp::KdTree< PointCloud, Projection > Struct Template Reference

"Safe" KdTree that holds the ownership of the input points. More...

#include <kdtree.hpp>

Collaboration diagram for small_gicp::KdTree< PointCloud, Projection >:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< KdTree< PointCloud, Projection > >
 
using ConstPtr = std::shared_ptr< const KdTree< PointCloud, Projection > >
 

Public Member Functions

template<typename Builder = KdTreeBuilder>
 KdTree (std::shared_ptr< const PointCloud > points, const Builder &builder=Builder())
 
size_t nearest_neighbor_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 dynamic memory allocation. More...
 
size_t knn_search (const Eigen::Vector4d &query, size_t 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...
 

Public Attributes

const std::shared_ptr< const PointCloudpoints
 Points. More...
 
const UnsafeKdTree< PointCloud, Projection > kdtree
 KdTree. More...
 

Detailed Description

template<typename PointCloud, typename Projection = AxisAlignedProjection>
struct small_gicp::KdTree< PointCloud, Projection >

"Safe" KdTree that holds the ownership of the input points.

Member Typedef Documentation

◆ ConstPtr

template<typename PointCloud , typename Projection = AxisAlignedProjection>
using small_gicp::KdTree< PointCloud, Projection >::ConstPtr = std::shared_ptr<const KdTree<PointCloud, Projection> >

◆ Ptr

template<typename PointCloud , typename Projection = AxisAlignedProjection>
using small_gicp::KdTree< PointCloud, Projection >::Ptr = std::shared_ptr<KdTree<PointCloud, Projection> >

Constructor & Destructor Documentation

◆ KdTree()

template<typename PointCloud , typename Projection = AxisAlignedProjection>
template<typename Builder = KdTreeBuilder>
small_gicp::KdTree< PointCloud, Projection >::KdTree ( std::shared_ptr< const PointCloud points,
const Builder &  builder = Builder() 
)
inlineexplicit

Member Function Documentation

◆ knn_search()

template<typename PointCloud , typename Projection = AxisAlignedProjection>
size_t small_gicp::KdTree< PointCloud, Projection >::knn_search ( const Eigen::Vector4d &  query,
size_t  k,
size_t *  k_indices,
double *  k_sq_dists,
const KnnSetting setting = KnnSetting() 
) const
inline

Find k-nearest neighbors. This method uses dynamic memory allocation.

Parameters
queryQuery point
kNumber of neighbors
k_indicesIndices of neighbors
k_sq_distsSquared distances to neighbors (sorted in ascending order)
settingKNN search setting
Returns
Number of found neighbors

◆ nearest_neighbor_search()

template<typename PointCloud , typename Projection = AxisAlignedProjection>
size_t small_gicp::KdTree< PointCloud, Projection >::nearest_neighbor_search ( const Eigen::Vector4d &  query,
size_t *  k_indices,
double *  k_sq_dists,
const KnnSetting setting = KnnSetting() 
) const
inline

Find k-nearest neighbors. This method uses dynamic memory allocation.

Parameters
queryQuery point
kNumber of neighbors
k_indicesIndices of neighbors
k_sq_distsSquared distances to neighbors (sorted in ascending order)
settingKNN search setting
Returns
Number of found neighbors

Member Data Documentation

◆ kdtree

template<typename PointCloud , typename Projection = AxisAlignedProjection>
const UnsafeKdTree<PointCloud, Projection> small_gicp::KdTree< PointCloud, Projection >::kdtree

◆ points

template<typename PointCloud , typename Projection = AxisAlignedProjection>
const std::shared_ptr<const PointCloud> small_gicp::KdTree< PointCloud, Projection >::points

Points.


The documentation for this struct was generated from the following file: