37 #ifndef OMPL_DATASTRUCTURES_NEAREST_NEIGHBORS_SQRT_APPROX_
38 #define OMPL_DATASTRUCTURES_NEAREST_NEIGHBORS_SQRT_APPROX_
40 #include "ompl/datastructures/NearestNeighborsLinear.h"
75 virtual void add(
const _T &data)
81 virtual void add(
const std::vector<_T> &data)
87 virtual bool remove(
const _T &data)
103 for (std::size_t j = 0 ; j <
checks_ ; ++j)
105 std::size_t i = (j * checks_ +
offset_) % n;
108 if (pos == n || dmin > distance)
119 throw Exception(
"No elements found in nearest neighbors data structure");
virtual void clear(void)
Clear the datastructure.
A nearest neighbors datastructure that uses linear search.
DistanceFunction distFun_
The used distance function.
virtual bool remove(const _T &data)
Remove an element from the datastructure.
The exception type for ompl.
virtual std::size_t size(void) const
Get the number of elements in the datastructure.
virtual void add(const _T &data)
Add an element to the datastructure.