Template Class NearestNeighborsLinear
Defined in File NearestNeighborsLinear.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Type
public ompl::NearestNeighbors< _T >
(Template Class NearestNeighbors)
Derived Type
public ompl::NearestNeighborsSqrtApprox< _T >
(Template Class NearestNeighborsSqrtApprox)
Class Documentation
-
template<typename _T>
class NearestNeighborsLinear : public ompl::NearestNeighbors<_T> A nearest neighbors datastructure that uses linear search.
Search for nearest neighbor is O(n).
Search for k-nearest neighbors is O(n log(k)).
Search for neighbors within a range is O(n log(n)).
Adding an element to the datastructure is O(1).
Removing an element from the datastructure O(n).
Subclassed by ompl::NearestNeighborsSqrtApprox< _T >
Public Functions
-
inline NearestNeighborsLinear()
-
~NearestNeighborsLinear() override = default
-
inline virtual void clear() override
Clear the datastructure.
-
inline virtual bool reportsSortedResults() const override
Return true if the solutions reported by this data structure are sorted, when calling nearestK / nearestR.
-
inline virtual void nearestK(const _T &data, std::size_t k, std::vector<_T> &nbh) const override
Return the k nearest neighbors in sorted order.
-
inline virtual void nearestR(const _T &data, double radius, std::vector<_T> &nbh) const override
Return the nearest neighbors within distance
radius
in sorted order.
-
inline virtual std::size_t size() const override
Get the number of elements in the datastructure.