ompl::geometric::KStrategy< Milestone > Class Template Reference

#include <ompl/geometric/planners/prm/ConnectionStrategy.h>

Inheritance diagram for ompl::geometric::KStrategy< Milestone >:

Public Member Functions

 KStrategy (const unsigned int k, std::shared_ptr< NearestNeighbors< Milestone > > nn)
 Constructor takes the maximum number of nearest neighbors to return (k) and the nearest neighbors datastruture to use (nn) More...
 
void setNearestNeighbors (const std::shared_ptr< NearestNeighbors< Milestone > > &nn)
 Set the nearest neighbors datastructure to use. More...
 
const std::vector< Milestone > & operator() (const Milestone &m)
 Given a milestone m, find the number of nearest neighbors connection attempts that should be made from it, according to the connection strategy. More...
 
unsigned int getNumNeighbors () const
 

Protected Attributes

unsigned int k_
 Maximum number of nearest neighbors to attempt to connect new milestones to. More...
 
std::shared_ptr< NearestNeighbors< Milestone > > nn_
 Nearest neighbors data structure. More...
 
std::vector< Milestone > neighbors_
 Scratch space for storing k-nearest neighbors. More...
 

Detailed Description

template<class Milestone>
class ompl::geometric::KStrategy< Milestone >

Attempt to connect to the k nearest neighbors.

Definition at line 56 of file ConnectionStrategy.h.

Constructor & Destructor Documentation

◆ KStrategy()

template<class Milestone >
ompl::geometric::KStrategy< Milestone >::KStrategy ( const unsigned int  k,
std::shared_ptr< NearestNeighbors< Milestone > >  nn 
)
inline

Constructor takes the maximum number of nearest neighbors to return (k) and the nearest neighbors datastruture to use (nn)

Definition at line 61 of file ConnectionStrategy.h.

Member Function Documentation

◆ getNumNeighbors()

template<class Milestone >
unsigned int ompl::geometric::KStrategy< Milestone >::getNumNeighbors ( ) const
inline

Definition at line 83 of file ConnectionStrategy.h.

◆ operator()()

template<class Milestone >
const std::vector< Milestone > & ompl::geometric::KStrategy< Milestone >::operator() ( const Milestone &  m)
inline

Given a milestone m, find the number of nearest neighbors connection attempts that should be made from it, according to the connection strategy.

Definition at line 77 of file ConnectionStrategy.h.

◆ setNearestNeighbors()

template<class Milestone >
void ompl::geometric::KStrategy< Milestone >::setNearestNeighbors ( const std::shared_ptr< NearestNeighbors< Milestone > > &  nn)
inline

Set the nearest neighbors datastructure to use.

Definition at line 69 of file ConnectionStrategy.h.

Member Data Documentation

◆ k_

template<class Milestone >
unsigned int ompl::geometric::KStrategy< Milestone >::k_
protected

Maximum number of nearest neighbors to attempt to connect new milestones to.

Definition at line 89 of file ConnectionStrategy.h.

◆ neighbors_

template<class Milestone >
std::vector<Milestone> ompl::geometric::KStrategy< Milestone >::neighbors_
protected

Scratch space for storing k-nearest neighbors.

Definition at line 95 of file ConnectionStrategy.h.

◆ nn_

template<class Milestone >
std::shared_ptr<NearestNeighbors<Milestone> > ompl::geometric::KStrategy< Milestone >::nn_
protected

Nearest neighbors data structure.

Definition at line 92 of file ConnectionStrategy.h.


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