Template Class NearestNeighbors
Defined in File NearestNeighbors.h
Inheritance Relationships
Derived Types
public ompl::NearestNeighborsGNAT< NNElement >
(Template Class NearestNeighborsGNAT)public ompl::NearestNeighborsGNATNoThreadSafety< std::shared_ptr< ompl::geometric::aitstar::Vertex > >
(Template Class NearestNeighborsGNATNoThreadSafety)public ompl::NearestNeighborsGNATNoThreadSafety< std::shared_ptr< ompl::geometric::eitstar::State > >
(Template Class NearestNeighborsGNATNoThreadSafety)public ompl::NearestNeighborsGNAT< _T >
(Template Class NearestNeighborsGNAT)public ompl::NearestNeighborsGNATNoThreadSafety< _T >
(Template Class NearestNeighborsGNATNoThreadSafety)public ompl::NearestNeighborsLinear< _T >
(Template Class NearestNeighborsLinear)
Class Documentation
-
template<typename _T>
class NearestNeighbors Abstract representation of a container that can perform nearest neighbors queries.
Subclassed by ompl::NearestNeighborsGNAT< NNElement >, ompl::NearestNeighborsGNATNoThreadSafety< std::shared_ptr< ompl::geometric::aitstar::Vertex > >, ompl::NearestNeighborsGNATNoThreadSafety< std::shared_ptr< ompl::geometric::eitstar::State > >, ompl::NearestNeighborsGNAT< _T >, ompl::NearestNeighborsGNATNoThreadSafety< _T >, ompl::NearestNeighborsLinear< _T >
Public Types
Public Functions
-
NearestNeighbors() = default
-
virtual ~NearestNeighbors() = default
-
inline virtual void setDistanceFunction(const DistanceFunction &distFun)
Set the distance function to use.
-
inline const DistanceFunction &getDistanceFunction() const
Get the distance function used.
-
virtual bool reportsSortedResults() const = 0
Return true if the solutions reported by this data structure are sorted, when calling nearestK / nearestR.
-
virtual void clear() = 0
Clear the datastructure.
-
virtual void nearestK(const _T &data, std::size_t k, std::vector<_T> &nbh) const = 0
Get the k-nearest neighbors of a point.
All the nearest neighbor structures currently return the neighbors in sorted order, but this is not required.
-
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.
All the nearest neighbor structures currently return the neighbors in sorted order, but this is not required.
-
virtual std::size_t size() const = 0
Get the number of elements in the datastructure.
Protected Attributes
-
DistanceFunction distFun_
The used distance function.
-
NearestNeighbors() = default