deal2lkit: A ToolKit library for Deal.II
ParsedKDTreeDistance< dim >::PointCloudAdaptor Struct Reference

Adaptor class used internally by nanoflann. More...

#include <parsed_kdtree_distance.h>

Public Types

typedef double coord_t
 A typedef used by nanoflann. More...
 

Public Member Functions

 PointCloudAdaptor (const std::vector< Point< dim > > &_points)
 The constrcutor needs the data set source. More...
 
size_t kdtree_get_point_count () const
 Return number of points in the data set (required by nanoflann). More...
 
coord_t kdtree_distance (const coord_t *p1, const size_t idx_p2, size_t size) const
 Return the L2 distance between points. More...
 
coord_t kdtree_get_pt (const size_t idx, int d) const
 Return the dim'th component of the idx'th point in the class. More...
 
template<class BBOX >
bool kdtree_get_bbox (BBOX &) const
 Optional bounding-box computation: return false to default to a standard bbox computation loop. More...
 

Public Attributes

const std::vector< Point< dim > > & points
 Reference to the vector of points from which we want to compute the distance. More...
 

Detailed Description

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

Adaptor class used internally by nanoflann.

Class actually stores a reference to the vector of points, and generates some helper functions for nanoflann.

Definition at line 83 of file parsed_kdtree_distance.h.

Member Typedef Documentation

§ coord_t

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

A typedef used by nanoflann.

Definition at line 88 of file parsed_kdtree_distance.h.

Constructor & Destructor Documentation

§ PointCloudAdaptor()

template<int dim>
ParsedKDTreeDistance< dim >::PointCloudAdaptor::PointCloudAdaptor ( const std::vector< Point< dim > > &  _points)
inline

The constrcutor needs the data set source.

Definition at line 101 of file parsed_kdtree_distance.h.

Member Function Documentation

§ kdtree_distance()

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

Return the L2 distance between points.

Definition at line 116 of file parsed_kdtree_distance.h.

§ kdtree_get_bbox()

template<int dim>
template<class BBOX >
bool ParsedKDTreeDistance< dim >::PointCloudAdaptor::kdtree_get_bbox ( BBOX &  ) const
inline

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).

Definition at line 144 of file parsed_kdtree_distance.h.

§ kdtree_get_point_count()

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

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

Definition at line 107 of file parsed_kdtree_distance.h.

§ kdtree_get_pt()

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

Return the dim'th component of the idx'th point in the class.

Definition at line 129 of file parsed_kdtree_distance.h.

Member Data Documentation

§ points

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

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

A const ref to the data set origin

Definition at line 95 of file parsed_kdtree_distance.h.


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