Reference documentation for deal.II version 9.1.1
|
#include <deal.II/numerics/kdtree.h>
Public Types | |
using | coord_t = double |
Public Member Functions | |
PointCloudAdaptor (const std::vector< Point< dim >> &_points) | |
size_t | kdtree_get_point_count () const |
coord_t | kdtree_distance (const coord_t *p1, const std::size_t idx_p2, const std::size_t size) const |
coord_t | kdtree_get_pt (const std::size_t idx, const int d) const |
template<class BBOX > | |
bool | kdtree_get_bbox (BBOX &) const |
Public Attributes | |
const std::vector< Point< dim > > & | points |
Adaptor class used internally by nanoflann. This class stores a reference to the vector of points, and generates some helper functions for nanoflann.
using KDTree< dim >::PointCloudAdaptor::coord_t = double |
KDTree< dim >::PointCloudAdaptor::PointCloudAdaptor | ( | const std::vector< Point< dim >> & | _points | ) |
The constructor needs the vector of points from which we want to build the tree.
size_t KDTree< dim >::PointCloudAdaptor::kdtree_get_point_count | ( | ) | const |
Return number of points in the data set (required by nanoflann).
coord_t KDTree< dim >::PointCloudAdaptor::kdtree_distance | ( | const coord_t * | p1, |
const std::size_t | idx_p2, | ||
const std::size_t | size | ||
) | const |
Return the L2 distance between points
coord_t KDTree< dim >::PointCloudAdaptor::kdtree_get_pt | ( | const std::size_t | idx, |
const int | d | ||
) | const |
Return the d-th component of the idx-th point in the class.
bool KDTree< dim >::PointCloudAdaptor::kdtree_get_bbox | ( | BBOX & | ) | const |
Optional bounding-box computation: return false to default to a standard bbox computation loop. Return true if the BBOX was already computed by the class and returned in "bb" so it can be avoided to redo it again. Look at bb.size() to find out the expected dimensionality (e.g. 2 or 3 for point clouds).