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

#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 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 96 of file kdtree.h.

Member Typedef Documentation

template<int dim>
using KDTree< dim >::PointCloudAdaptor::coord_t = double

An alias used by nanoflann.

Definition at line 101 of file kdtree.h.

Constructor & Destructor Documentation

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

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

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

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

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.

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

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 108 of file kdtree.h.


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