Public Types | Public Member Functions | Protected Attributes | List of all members
cached_ik_kinematics_plugin::NearestNeighbors< _T > Class Template Referenceabstract

Abstract representation of a container that can perform nearest neighbors queries. More...

#include <NearestNeighbors.h>

Inheritance diagram for cached_ik_kinematics_plugin::NearestNeighbors< _T >:
Inheritance graph
[legend]

Public Types

typedef std::function< double(const _T &, const _T &)> DistanceFunction
 The definition of a distance function. More...
 

Public Member Functions

virtual void add (const _T &data)=0
 Add an element to the datastructure. More...
 
virtual void add (const std::vector< _T > &data)
 Add a vector of points. More...
 
virtual void clear ()=0
 Clear the datastructure. More...
 
const DistanceFunctiongetDistanceFunction () const
 Get the distance function used. More...
 
virtual void list (std::vector< _T > &data) const =0
 Get all the elements in the datastructure. More...
 
virtual _T nearest (const _T &data) const =0
 Get the nearest neighbor of a point. More...
 
virtual void nearestK (const _T &data, std::size_t k, std::vector< _T > &nbh) const =0
 Get the k-nearest neighbors of a point. More...
 
 NearestNeighbors ()=default
 
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. More...
 
virtual bool remove (const _T &data)=0
 Remove an element from the datastructure. More...
 
virtual bool reportsSortedResults () const =0
 Return true if the solutions reported by this data structure are sorted, when calling nearestK / nearestR. More...
 
virtual void setDistanceFunction (const DistanceFunction &distFun)
 Set the distance function to use. More...
 
virtual std::size_t size () const =0
 Get the number of elements in the datastructure. More...
 
virtual ~NearestNeighbors ()=default
 

Protected Attributes

DistanceFunction distFun_
 The used distance function. More...
 

Detailed Description

template<typename _T>
class cached_ik_kinematics_plugin::NearestNeighbors< _T >

Abstract representation of a container that can perform nearest neighbors queries.

Definition at line 49 of file NearestNeighbors.h.

Member Typedef Documentation

template<typename _T>
typedef std::function<double(const _T&, const _T&)> cached_ik_kinematics_plugin::NearestNeighbors< _T >::DistanceFunction

The definition of a distance function.

Definition at line 53 of file NearestNeighbors.h.

Constructor & Destructor Documentation

template<typename _T>
cached_ik_kinematics_plugin::NearestNeighbors< _T >::NearestNeighbors ( )
default
template<typename _T>
virtual cached_ik_kinematics_plugin::NearestNeighbors< _T >::~NearestNeighbors ( )
virtualdefault

Member Function Documentation

template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::add ( const _T &  data)
pure virtual
template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::add ( const std::vector< _T > &  data)
inlinevirtual
template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::clear ( )
pure virtual
template<typename _T>
const DistanceFunction& cached_ik_kinematics_plugin::NearestNeighbors< _T >::getDistanceFunction ( ) const
inline

Get the distance function used.

Definition at line 66 of file NearestNeighbors.h.

template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::list ( std::vector< _T > &  data) const
pure virtual
template<typename _T>
virtual _T cached_ik_kinematics_plugin::NearestNeighbors< _T >::nearest ( const _T &  data) const
pure virtual
template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::nearestK ( const _T &  data,
std::size_t  k,
std::vector< _T > &  nbh 
) const
pure virtual

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.

Implemented in cached_ik_kinematics_plugin::NearestNeighborsGNAT< _T >, and cached_ik_kinematics_plugin::NearestNeighborsGNAT< IKEntry * >.

template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::nearestR ( const _T &  data,
double  radius,
std::vector< _T > &  nbh 
) const
pure virtual

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.

Implemented in cached_ik_kinematics_plugin::NearestNeighborsGNAT< _T >, and cached_ik_kinematics_plugin::NearestNeighborsGNAT< IKEntry * >.

template<typename _T>
virtual bool cached_ik_kinematics_plugin::NearestNeighbors< _T >::remove ( const _T &  data)
pure virtual
template<typename _T>
virtual bool cached_ik_kinematics_plugin::NearestNeighbors< _T >::reportsSortedResults ( ) const
pure virtual

Return true if the solutions reported by this data structure are sorted, when calling nearestK / nearestR.

Implemented in cached_ik_kinematics_plugin::NearestNeighborsGNAT< _T >, and cached_ik_kinematics_plugin::NearestNeighborsGNAT< IKEntry * >.

template<typename _T>
virtual void cached_ik_kinematics_plugin::NearestNeighbors< _T >::setDistanceFunction ( const DistanceFunction distFun)
inlinevirtual

Set the distance function to use.

Definition at line 60 of file NearestNeighbors.h.

template<typename _T>
virtual std::size_t cached_ik_kinematics_plugin::NearestNeighbors< _T >::size ( ) const
pure virtual

Member Data Documentation

template<typename _T>
DistanceFunction cached_ik_kinematics_plugin::NearestNeighbors< _T >::distFun_
protected

The used distance function.

Definition at line 116 of file NearestNeighbors.h.


The documentation for this class was generated from the following file:


moveit_kinematics
Author(s): Dave Coleman , Ioan Sucan , Sachin Chitta
autogenerated on Wed Jul 10 2019 04:03:41