cheshirekow  v0.1.0
mpblocks::dubins::kd_tree::Nearest< Scalar > Class Template Reference

#include <mpblocks/dubins/kd_tree/Nearest.h>

Inheritance diagram for mpblocks::dubins::kd_tree::Nearest< Scalar >:
mpblocks::kd_tree::NearestSearchIface< Traits< Scalar > >

Public Types

typedef Distance< Scalar > Distance_t
 
typedef Traits< Scalar >::HyperRect HyperRect_t
 
typedef Traits< Scalar >::Node Node_t
 
typedef Eigen::Matrix< Scalar, 3, 1 > Point
 
- Public Types inherited from mpblocks::kd_tree::NearestSearchIface< Traits< Scalar > >
typedef Traits< Scalar >::Format_t Format_t
 
typedef Traits< Scalar >::HyperRect HyperRect_t
 
typedef Traits< Scalar >::Node Node_t
 
typedef Vector_t Point_t
 
typedef Eigen::Matrix
< Format_t, Traits< Scalar >
::NDim, 1 > 
Vector_t
 

Public Member Functions

virtual void evaluate (const Point &q, const Point &p, Node_t *n)
 calculates Euclidean distance from q to p, and if its less than the current best replaces the current best node with n More...
 
void reset ()
 
Node_tresult ()
 
virtual bool shouldRecurse (const Point &q, const HyperRect_t &r)
 evaluate the Euclidean distance from q to it's closest point in r and if that distance is less than the current best distance, return true More...
 
virtual ~Nearest ()
 
- Public Member Functions inherited from mpblocks::kd_tree::NearestSearchIface< Traits< Scalar > >
virtual void evaluate (const Point_t &q, const Point_t &p, Node_t *n)=0
 evaluate the current point, and add the corresponding node to the result set if necessary More...
 
virtual bool shouldRecurse (const Point_t &q, const HyperRect_t &h)=0
 evaluate the hyper rectangle and return true if it is possible that we must recurse into it More...
 
virtual ~NearestSearchIface ()
 just ensure virtualness More...
 

Private Attributes

Scalar m_d2Best
 
Distance_t m_dist2Fn
 
Node_tm_nBest
 

Detailed Description

template<typename Scalar>
class mpblocks::dubins::kd_tree::Nearest< Scalar >

Definition at line 37 of file Nearest.h.

Member Typedef Documentation

template<typename Scalar >
typedef Distance<Scalar> mpblocks::dubins::kd_tree::Nearest< Scalar >::Distance_t

Definition at line 44 of file Nearest.h.

template<typename Scalar >
typedef Traits<Scalar>::HyperRect mpblocks::dubins::kd_tree::Nearest< Scalar >::HyperRect_t

Definition at line 42 of file Nearest.h.

template<typename Scalar >
typedef Traits<Scalar>::Node mpblocks::dubins::kd_tree::Nearest< Scalar >::Node_t

Definition at line 41 of file Nearest.h.

template<typename Scalar >
typedef Eigen::Matrix<Scalar,3,1> mpblocks::dubins::kd_tree::Nearest< Scalar >::Point

Definition at line 45 of file Nearest.h.

Constructor & Destructor Documentation

template<typename Scalar >
virtual mpblocks::dubins::kd_tree::Nearest< Scalar >::~Nearest ( )
inlinevirtual

Definition at line 53 of file Nearest.h.

Member Function Documentation

template<typename Scalar >
void mpblocks::dubins::kd_tree::Nearest< Scalar >::evaluate ( const Point q,
const Point p,
Node_t n 
)
virtual

calculates Euclidean distance from q to p, and if its less than the current best replaces the current best node with n

Definition at line 57 of file Nearest.hpp.

template<typename Scalar >
void mpblocks::dubins::kd_tree::Nearest< Scalar >::reset ( )

Definition at line 39 of file Nearest.hpp.

template<typename Scalar >
Traits< Scalar >::Node * mpblocks::dubins::kd_tree::Nearest< Scalar >::result ( )

Definition at line 48 of file Nearest.hpp.

template<typename Scalar >
bool mpblocks::dubins::kd_tree::Nearest< Scalar >::shouldRecurse ( const Point q,
const HyperRect_t r 
)
virtual

evaluate the Euclidean distance from q to it's closest point in r and if that distance is less than the current best distance, return true

Definition at line 71 of file Nearest.hpp.

Member Data Documentation

template<typename Scalar >
Scalar mpblocks::dubins::kd_tree::Nearest< Scalar >::m_d2Best
private

Definition at line 49 of file Nearest.h.

template<typename Scalar >
Distance_t mpblocks::dubins::kd_tree::Nearest< Scalar >::m_dist2Fn
private

Definition at line 48 of file Nearest.h.

template<typename Scalar >
Node_t* mpblocks::dubins::kd_tree::Nearest< Scalar >::m_nBest
private

Definition at line 50 of file Nearest.h.


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