NearestNeighbors.h
115 };
virtual _T nearest(const _T &data) const =0
Get the nearest neighbor of a point.
virtual bool reportsSortedResults() const =0
Return true if the solutions reported by this data structure are sorted, when calling nearestK / near...
virtual bool remove(const _T &data)=0
Remove an element from the datastructure.
const DistanceFunction & getDistanceFunction() const
Get the distance function used.
Definition: NearestNeighbors.h:128
std::function< double(const _T &, const _T &)> DistanceFunction
The definition of a distance function.
Definition: NearestNeighbors.h:115
virtual void nearestK(const _T &data, std::size_t k, std::vector< _T > &nbh) const =0
Get the k-nearest neighbors of a point.
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 void list(std::vector< _T > &data) const =0
Get all the elements in the datastructure.
virtual std::size_t size() const =0
Get the number of elements in the datastructure.
Main namespace. Contains everything in this library.
Definition: MultiLevelPlanarManipulatorDemo.cpp:65
virtual void setDistanceFunction(const DistanceFunction &distFun)
Set the distance function to use.
Definition: NearestNeighbors.h:122