PeriDEM 0.2.0
PeriDEM -- Peridynamics-based high-fidelity model for granular media
|
A class for nearest neighbor search using nanoflann library. More...
#include <nsearch.h>
Public Member Functions | |
NFlannSearchKd (const PointCloud &x, size_t debug=0, size_t max_leafs=10) | |
Constructor. | |
double | setInputCloud () override |
Set input cloud. | |
double | updatePointCloud (const std::vector< util::Point > &x, bool parallel=true) override |
Function to implement point cloud update. | |
size_t | radiusSearch (const util::Point &searchPoint, const double &search_r, std::vector< size_t > &neighs, std::vector< double > &sqr_dist) override |
Perform radius search to find points in a point cloud within specified distance from a given point. = 0 = 0 = 0 | |
size_t | radiusSearch (const util::Point &searchPoint, const double &search_r, std::vector< int > &neighs, std::vector< float > &sqr_dist) override |
Perform radius search to find points in a point cloud within specified distance from a given point. = 0 | |
size_t | radiusSearchExcludeTag (const util::Point &searchPoint, const double &search_r, std::vector< size_t > &neighs, std::vector< double > &sqr_dist, const size_t &searchPointTag, const std::vector< size_t > &dataTags) override |
= 0 | |
size_t | radiusSearchExcludeTag (const util::Point &searchPoint, const double &search_r, std::vector< int > &neighs, std::vector< float > &sqr_dist, const size_t &searchPointTag, const std::vector< size_t > &dataTags) override |
= 0 | |
size_t | radiusSearchIncludeTag (const util::Point &searchPoint, const double &search_r, std::vector< size_t > &neighs, std::vector< double > &sqr_dist, const size_t &searchPointTag, const std::vector< size_t > &dataTags) override |
= 0 | |
size_t | radiusSearchIncludeTag (const util::Point &searchPoint, const double &search_r, std::vector< int > &neighs, std::vector< float > &sqr_dist, const size_t &searchPointTag, const std::vector< size_t > &dataTags) override |
= 0 | |
void | closestPoint (const util::Point &searchPoint, size_t &neigh, double &sqrDistNeigh) override |
= 0 | |
Public Member Functions inherited from nsearch::BaseNSearch | |
BaseNSearch (std::string name, size_t debug=0) | |
Constructor. | |
Data Fields | |
PointCloudAdaptor | d_cloud |
coordinates of the points | |
nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor< double, PointCloudAdaptor >, PointCloudAdaptor, dim > | d_tree |
Tree. | |
nanoflann::SearchParameters | d_params |
Tree search parameters. | |
Data Fields inherited from nsearch::BaseNSearch | |
size_t | d_debug |
control the verbosity | |
std::string | d_treeType |
name of tree: nflann_kdtree | |
A class for nearest neighbor search using nanoflann library.
|
inlineexplicit |
Constructor.
x | Point cloud |
debug | Debug level to print information |
max_leaf | Maximum number of leafs |
Definition at line 188 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_params.
|
inlineoverridevirtual |
= 0
= 0
Implements nsearch::BaseNSearch.
Definition at line 400 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_tree.
|
inlineoverridevirtual |
Perform radius search to find points in a point cloud within specified distance from a given point. = 0
searchPoint | Point near which we want neighbors |
search_r | Search radius |
neighs | Indices of points in neighborhood |
sqr_dist | Squared distance of neighboring points from search point |
Implements nsearch::BaseNSearch.
Definition at line 244 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::radiusSearch().
|
inlineoverridevirtual |
Perform radius search to find points in a point cloud within specified distance from a given point. = 0 = 0 = 0
searchPoint | Point near which we want neighbors |
search_r | Search radius |
neighs | Indices of points in neighborhood |
sqr_dist | Squared distance of neighboring points from search point |
Implements nsearch::BaseNSearch.
Definition at line 227 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_params, and nsearch::NFlannSearchKd< dim >::d_tree.
Referenced by nsearch::NFlannSearchKd< dim >::radiusSearch().
|
inlineoverridevirtual |
= 0
= 0
Implements nsearch::BaseNSearch.
Definition at line 303 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::radiusSearchExcludeTag().
|
inlineoverridevirtual |
= 0
= 0
Implements nsearch::BaseNSearch.
Definition at line 278 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_params, and nsearch::NFlannSearchKd< dim >::d_tree.
Referenced by nsearch::NFlannSearchKd< dim >::radiusSearchExcludeTag().
|
inlineoverridevirtual |
= 0
= 0
Implements nsearch::BaseNSearch.
Definition at line 366 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::radiusSearchIncludeTag().
|
inlineoverridevirtual |
= 0
= 0
Implements nsearch::BaseNSearch.
Definition at line 340 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_params, and nsearch::NFlannSearchKd< dim >::d_tree.
Referenced by nsearch::NFlannSearchKd< dim >::radiusSearchIncludeTag().
|
inlineoverridevirtual |
Set input cloud.
Implements nsearch::BaseNSearch.
Definition at line 200 of file nsearch.h.
References nsearch::NFlannSearchKd< dim >::d_tree, and util::methods::timeDiff().
|
inlineoverridevirtual |
Function to implement point cloud update.
TODO Implement this function
x | Vector of positions of points |
parallel | Specify if this is done in parallel |
Implements nsearch::BaseNSearch.
Definition at line 216 of file nsearch.h.
PointCloudAdaptor nsearch::NFlannSearchKd< dim >::d_cloud |
nanoflann::SearchParameters nsearch::NFlannSearchKd< dim >::d_params |
Tree search parameters.
Definition at line 422 of file nsearch.h.
Referenced by nsearch::NFlannSearchKd< dim >::NFlannSearchKd(), nsearch::NFlannSearchKd< dim >::radiusSearch(), nsearch::NFlannSearchKd< dim >::radiusSearchExcludeTag(), and nsearch::NFlannSearchKd< dim >::radiusSearchIncludeTag().
nanoflann::KDTreeSingleIndexAdaptor< nanoflann::L2_Simple_Adaptor<double, PointCloudAdaptor>, PointCloudAdaptor, dim > nsearch::NFlannSearchKd< dim >::d_tree |
Tree.
Definition at line 419 of file nsearch.h.
Referenced by nsearch::NFlannSearchKd< dim >::closestPoint(), nsearch::NFlannSearchKd< dim >::radiusSearch(), nsearch::NFlannSearchKd< dim >::radiusSearchExcludeTag(), nsearch::NFlannSearchKd< dim >::radiusSearchIncludeTag(), and nsearch::NFlannSearchKd< dim >::setInputCloud().