Point Cloud Library (PCL)  1.14.1-dev
List of all members | Classes | Public Member Functions
pcl::search::BruteForce< PointT > Class Template Reference

Implementation of a simple brute force search algorithm. More...

#include <pcl/search/brute_force.h>

+ Inheritance diagram for pcl::search::BruteForce< PointT >:
+ Collaboration diagram for pcl::search::BruteForce< PointT >:

Public Member Functions

 BruteForce (bool sorted_results=false)
 
 ~BruteForce () override=default
 Destructor for KdTree. More...
 
int nearestKSearch (const PointT &point, int k, Indices &k_indices, std::vector< float > &k_distances) const override
 Search for the k-nearest neighbors for the given query point. More...
 
int radiusSearch (const PointT &point, double radius, Indices &k_indices, std::vector< float > &k_sqr_distances, unsigned int max_nn=0) const override
 Search for all the nearest neighbors of the query point in a given radius. More...
 

Additional Inherited Members

Detailed Description

template<typename PointT>
class pcl::search::BruteForce< PointT >

Implementation of a simple brute force search algorithm.

Author
Suat Gedikli

Definition at line 51 of file brute_force.h.

Constructor & Destructor Documentation

◆ BruteForce()

template<typename PointT >
pcl::search::BruteForce< PointT >::BruteForce ( bool  sorted_results = false)
inline

Definition at line 87 of file brute_force.h.

◆ ~BruteForce()

template<typename PointT >
pcl::search::BruteForce< PointT >::~BruteForce ( )
overridedefault

Destructor for KdTree.

Member Function Documentation

◆ nearestKSearch()

template<typename PointT >
int pcl::search::BruteForce< PointT >::nearestKSearch ( const PointT point,
int  k,
Indices k_indices,
std::vector< float > &  k_distances 
) const
overridevirtual

Search for the k-nearest neighbors for the given query point.

Parameters
[in]pointthe given query point
[in]kthe number of neighbors to search for
[out]k_indicesthe resultant indices of the neighboring points (must be resized to k a priori!)
[out]k_distancesthe resultant squared distances to the neighboring points (must be resized to k a priori!)
Returns
number of neighbors found

Implements pcl::search::Search< PointT >.

Definition at line 54 of file brute_force.hpp.

References pcl::isFinite().

◆ radiusSearch()

template<typename PointT >
int pcl::search::BruteForce< PointT >::radiusSearch ( const PointT point,
double  radius,
Indices k_indices,
std::vector< float > &  k_sqr_distances,
unsigned int  max_nn = 0 
) const
overridevirtual

Search for all the nearest neighbors of the query point in a given radius.

Parameters
[in]pointthe given query point
[in]radiusthe radius of the sphere bounding all of p_q's neighbors
[out]k_indicesthe resultant indices of the neighboring points
[out]k_sqr_distancesthe resultant squared distances to the neighboring points
[in]max_nnif given, bounds the maximum returned neighbors to this value. If max_nn is set to 0 or to a number higher than the number of points in the input cloud, all neighbors in radius will be returned.
Returns
number of neighbors found in radius

Implements pcl::search::Search< PointT >.

Definition at line 334 of file brute_force.hpp.

References pcl::isFinite().


The documentation for this class was generated from the following files: