Reference documentation for deal.II version 9.0.0
Public Types | Public Member Functions | Public Attributes | List of all members
KDTree< dim >::PointCloudAdaptor Struct Reference

#include <deal.II/numerics/kdtree.h>

Public Types

typedef double coord_t
 

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 size_t idx_p2, const size_t size) const
 
coord_t kdtree_get_pt (const size_t idx, const int d) const
 
template<class BBOX >
bool kdtree_get_bbox (BBOX &) const
 

Public Attributes

const std::vector< Point< dim > > & points
 

Detailed Description

template<int dim>
struct KDTree< dim >::PointCloudAdaptor

Adaptor class used internally by nanoflann. This class stores a reference to the vector of points, and generates some helper functions for nanoflann.

Definition at line 101 of file kdtree.h.

Member Typedef Documentation

◆ coord_t

template<int dim>
typedef double KDTree< dim >::PointCloudAdaptor::coord_t

A typedef used by nanoflann.

Definition at line 106 of file kdtree.h.

Constructor & Destructor Documentation

◆ PointCloudAdaptor()

template<int dim>
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.

Member Function Documentation

◆ kdtree_get_point_count()

template<int dim>
size_t KDTree< dim >::PointCloudAdaptor::kdtree_get_point_count ( ) const

Return number of points in the data set (required by nanoflann).

◆ kdtree_distance()

template<int dim>
coord_t KDTree< dim >::PointCloudAdaptor::kdtree_distance ( const coord_t p1,
const size_t  idx_p2,
const size_t  size 
) const

Return the L2 distance between points

◆ kdtree_get_pt()

template<int dim>
coord_t KDTree< dim >::PointCloudAdaptor::kdtree_get_pt ( const size_t  idx,
const int  d 
) const

Return the d-th component of the idx-th point in the class.

◆ kdtree_get_bbox()

template<int dim>
template<class BBOX >
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).

Member Data Documentation

◆ points

template<int dim>
const std::vector<Point<dim> >& KDTree< dim >::PointCloudAdaptor::points

Reference to the vector of points from which we want to compute the distance.

Definition at line 113 of file kdtree.h.


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