Abstract representation of a container that can perform nearest neighbors queries. More...
#include <NearestNeighbors.h>
Public Types | |
typedef boost::function2 < double, const _T &, const _T & > | DistanceFunction |
The definition of a distance function. | |
Public Member Functions | |
virtual void | add (std::vector< _T > &data) |
Add a vector of points. | |
virtual void | add (_T &data)=0 |
Add an element to the datastructure. | |
virtual void | clear (void)=0 |
Clear the datastructure. | |
const DistanceFunction & | getDistanceFunction (void) const |
Get the distance function used. | |
virtual void | list (std::vector< _T > &data) const =0 |
Get all the elements in the datastructure. | |
virtual _T | nearest (const _T &data) const =0 |
Get the nearest neighbor of a point. | |
virtual void | nearestK (const _T &data, std::size_t k, std::vector< _T > &nbh) const =0 |
Get the k-nearest neighbors of a point. | |
NearestNeighbors (void) | |
virtual void | nearestR (const _T &data, double radius, std::vector< _T > &nbh) const =0 |
Get the nearest neighbors of a point, within a specified radius. | |
virtual bool | remove (_T &data)=0 |
Remove an element from the datastructure. | |
void | setDistanceFunction (const DistanceFunction &distFun) |
Set the distance function to use. | |
virtual std::size_t | size (void) const =0 |
Get the number of elements in the datastructure. | |
virtual | ~NearestNeighbors (void) |
Protected Attributes | |
DistanceFunction | distFun_ |
The used distance function. |
Abstract representation of a container that can perform nearest neighbors queries.
Definition at line 49 of file NearestNeighbors.h.
typedef boost::function2<double, const _T&, const _T&> ompl::NearestNeighbors< _T >::DistanceFunction |
The definition of a distance function.
Definition at line 54 of file NearestNeighbors.h.
ompl::NearestNeighbors< _T >::NearestNeighbors | ( | void | ) | [inline] |
Definition at line 56 of file NearestNeighbors.h.
virtual ompl::NearestNeighbors< _T >::~NearestNeighbors | ( | void | ) | [inline, virtual] |
Definition at line 60 of file NearestNeighbors.h.
virtual void ompl::NearestNeighbors< _T >::add | ( | std::vector< _T > & | data | ) | [inline, virtual] |
Add a vector of points.
Reimplemented in ompl::NearestNeighborsLinear< _T >, and ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 83 of file NearestNeighbors.h.
virtual void ompl::NearestNeighbors< _T >::add | ( | _T & | data | ) | [pure virtual] |
Add an element to the datastructure.
Implemented in ompl::NearestNeighborsLinear< _T >, and ompl::NearestNeighborsSqrtApprox< _T >.
virtual void ompl::NearestNeighbors< _T >::clear | ( | void | ) | [pure virtual] |
Clear the datastructure.
Implemented in ompl::NearestNeighborsLinear< _T >, and ompl::NearestNeighborsSqrtApprox< _T >.
const DistanceFunction& ompl::NearestNeighbors< _T >::getDistanceFunction | ( | void | ) | const [inline] |
Get the distance function used.
Definition at line 71 of file NearestNeighbors.h.
virtual void ompl::NearestNeighbors< _T >::list | ( | std::vector< _T > & | data | ) | const [pure virtual] |
Get all the elements in the datastructure.
Implemented in ompl::NearestNeighborsLinear< _T >.
virtual _T ompl::NearestNeighbors< _T >::nearest | ( | const _T & | data | ) | const [pure virtual] |
Get the nearest neighbor of a point.
Implemented in ompl::NearestNeighborsLinear< _T >, and ompl::NearestNeighborsSqrtApprox< _T >.
virtual void ompl::NearestNeighbors< _T >::nearestK | ( | const _T & | data, | |
std::size_t | k, | |||
std::vector< _T > & | nbh | |||
) | const [pure virtual] |
Get the k-nearest neighbors of a point.
Implemented in ompl::NearestNeighborsLinear< _T >.
virtual void ompl::NearestNeighbors< _T >::nearestR | ( | const _T & | data, | |
double | radius, | |||
std::vector< _T > & | nbh | |||
) | const [pure virtual] |
Get the nearest neighbors of a point, within a specified radius.
Implemented in ompl::NearestNeighborsLinear< _T >.
virtual bool ompl::NearestNeighbors< _T >::remove | ( | _T & | data | ) | [pure virtual] |
Remove an element from the datastructure.
Implemented in ompl::NearestNeighborsLinear< _T >, and ompl::NearestNeighborsSqrtApprox< _T >.
void ompl::NearestNeighbors< _T >::setDistanceFunction | ( | const DistanceFunction & | distFun | ) | [inline] |
Set the distance function to use.
Definition at line 65 of file NearestNeighbors.h.
virtual std::size_t ompl::NearestNeighbors< _T >::size | ( | void | ) | const [pure virtual] |
Get the number of elements in the datastructure.
Implemented in ompl::NearestNeighborsLinear< _T >.
DistanceFunction ompl::NearestNeighbors< _T >::distFun_ [protected] |
The used distance function.
Definition at line 110 of file NearestNeighbors.h.