A nearest neighbors datastructure that uses linear search. More...
#include <NearestNeighborsLinear.h>
Classes | |
struct | MySort |
Public Member Functions | |
virtual void | add (std::vector< _T > &data) |
Add a vector of points. | |
virtual void | add (_T &data) |
Add an element to the datastructure. | |
virtual void | clear (void) |
Clear the datastructure. | |
virtual void | list (std::vector< _T > &data) const |
Get all the elements in the datastructure. | |
virtual _T | nearest (const _T &data) const |
Get the nearest neighbor of a point. | |
virtual void | nearestK (const _T &data, std::size_t k, std::vector< _T > &nbh) const |
Get the k-nearest neighbors of a point. | |
NearestNeighborsLinear (void) | |
virtual void | nearestR (const _T &data, double radius, std::vector< _T > &nbh) const |
Get the nearest neighbors of a point, within a specified radius. | |
virtual bool | remove (_T &data) |
Remove an element from the datastructure. | |
virtual std::size_t | size (void) const |
Get the number of elements in the datastructure. | |
virtual | ~NearestNeighborsLinear (void) |
Protected Attributes | |
std::vector< _T > | data_ |
The data elements stored in this structure. |
A nearest neighbors datastructure that uses linear search.
Definition at line 57 of file NearestNeighborsLinear.h.
ompl::NearestNeighborsLinear< _T >::NearestNeighborsLinear | ( | void | ) | [inline] |
Definition at line 60 of file NearestNeighborsLinear.h.
virtual ompl::NearestNeighborsLinear< _T >::~NearestNeighborsLinear | ( | void | ) | [inline, virtual] |
Definition at line 64 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::add | ( | std::vector< _T > & | data | ) | [inline, virtual] |
Add a vector of points.
Reimplemented from ompl::NearestNeighbors< _T >.
Reimplemented in ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 78 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::add | ( | _T & | data | ) | [inline, virtual] |
Add an element to the datastructure.
Implements ompl::NearestNeighbors< _T >.
Reimplemented in ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 73 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::clear | ( | void | ) | [inline, virtual] |
Clear the datastructure.
Implements ompl::NearestNeighbors< _T >.
Reimplemented in ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 68 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::list | ( | std::vector< _T > & | data | ) | const [inline, virtual] |
Get all the elements in the datastructure.
Implements ompl::NearestNeighbors< _T >.
Definition at line 145 of file NearestNeighborsLinear.h.
virtual _T ompl::NearestNeighborsLinear< _T >::nearest | ( | const _T & | data | ) | const [inline, virtual] |
Get the nearest neighbor of a point.
Implements ompl::NearestNeighbors< _T >.
Reimplemented in ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 96 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::nearestK | ( | const _T & | data, | |
std::size_t | k, | |||
std::vector< _T > & | nbh | |||
) | const [inline, virtual] |
Get the k-nearest neighbors of a point.
Implements ompl::NearestNeighbors< _T >.
Definition at line 116 of file NearestNeighborsLinear.h.
virtual void ompl::NearestNeighborsLinear< _T >::nearestR | ( | const _T & | data, | |
double | radius, | |||
std::vector< _T > & | nbh | |||
) | const [inline, virtual] |
Get the nearest neighbors of a point, within a specified radius.
Implements ompl::NearestNeighbors< _T >.
Definition at line 131 of file NearestNeighborsLinear.h.
virtual bool ompl::NearestNeighborsLinear< _T >::remove | ( | _T & | data | ) | [inline, virtual] |
Remove an element from the datastructure.
Implements ompl::NearestNeighbors< _T >.
Reimplemented in ompl::NearestNeighborsSqrtApprox< _T >.
Definition at line 84 of file NearestNeighborsLinear.h.
virtual std::size_t ompl::NearestNeighborsLinear< _T >::size | ( | void | ) | const [inline, virtual] |
Get the number of elements in the datastructure.
Implements ompl::NearestNeighbors< _T >.
Definition at line 140 of file NearestNeighborsLinear.h.
std::vector<_T> ompl::NearestNeighborsLinear< _T >::data_ [protected] |
The data elements stored in this structure.
Definition at line 153 of file NearestNeighborsLinear.h.