NearestNeighborsLinear.h
161 ElemSort(const _T &e, const typename NearestNeighbors<_T>::DistanceFunction &df) : e_(e), df_(df)
void nearestR(const _T &data, double radius, std::vector< _T > &nbh) const override
Return the nearest neighbors within distance radius in sorted order.
Definition: NearestNeighborsLinear.h:135
void nearestK(const _T &data, std::size_t k, std::vector< _T > &nbh) const override
Return the k nearest neighbors in sorted order.
Definition: NearestNeighborsLinear.h:119
_T nearest(const _T &data) const override
Get the nearest neighbor of a point.
Definition: NearestNeighborsLinear.h:98
void add(const std::vector< _T > &data) override
Add a vector of points.
Definition: NearestNeighborsLinear.h:80
void add(const _T &data) override
Add an element to the datastructure.
Definition: NearestNeighborsLinear.h:75
A nearest neighbors datastructure that uses linear search.
Definition: NearestNeighborsLinear.h:56
std::size_t size() const override
Get the number of elements in the datastructure.
Definition: NearestNeighborsLinear.h:144
Abstract representation of a container that can perform nearest neighbors queries.
Definition: NearestNeighbors.h:48
void list(std::vector< _T > &data) const override
Get all the elements in the datastructure.
Definition: NearestNeighborsLinear.h:149
std::vector< _T > data_
The data elements stored in this structure.
Definition: NearestNeighborsLinear.h:156
std::function< double(const _T &, const _T &)> DistanceFunction
The definition of a distance function.
Definition: NearestNeighbors.h:52
bool reportsSortedResults() const override
Return true if the solutions reported by this data structure are sorted, when calling nearestK / near...
Definition: NearestNeighborsLinear.h:70