cheshirekow  v0.1.0
mpblocks::kd_tree::euclidean::Nearest< Traits > Class Template Reference

provides a search algorithm for finding the nearest point in the kd tree to some query point. More...

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

Inheritance diagram for mpblocks::kd_tree::euclidean::Nearest< Traits >:
mpblocks::kd_tree::NearestSearchIface< Traits >

Public Types

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

Public Member Functions

virtual void evaluate (const Point_t &q, const Point_t &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 (Format_t inf=std::numeric_limits< Format_t >::max())
 
Node_tresult ()
 
virtual bool shouldRecurse (const Point_t &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 >
virtual ~NearestSearchIface ()
 just ensure virtualness More...
 

Private Attributes

Format_t m_d2Best
 
Distance_t m_dist2Fn
 
Node_tm_nBest
 

Detailed Description

template<class Traits>
class mpblocks::kd_tree::euclidean::Nearest< Traits >

provides a search algorithm for finding the nearest point in the kd tree to some query point.

Definition at line 38 of file Nearest.h.

Member Typedef Documentation

Definition at line 45 of file Nearest.h.

Definition at line 42 of file Nearest.h.

Definition at line 46 of file Nearest.h.

template<class Traits >
typedef Traits::Node mpblocks::kd_tree::euclidean::Nearest< Traits >::Node_t

Definition at line 43 of file Nearest.h.

template<class Traits >
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::kd_tree::euclidean::Nearest< Traits >::Point_t

Definition at line 48 of file Nearest.h.

Constructor & Destructor Documentation

template<class Traits >
virtual mpblocks::kd_tree::euclidean::Nearest< Traits >::~Nearest ( )
inlinevirtual

Definition at line 56 of file Nearest.h.

Member Function Documentation

template<class Traits >
void mpblocks::kd_tree::euclidean::Nearest< Traits >::evaluate ( const Point_t q,
const Point_t 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

Implements mpblocks::kd_tree::NearestSearchIface< Traits >.

Definition at line 57 of file Nearest.hpp.

template<class Traits >
void mpblocks::kd_tree::euclidean::Nearest< Traits >::reset ( Format_t  inf = std::numeric_limits<Format_t>::max())

Definition at line 39 of file Nearest.hpp.

template<class Traits >
Traits::Node * mpblocks::kd_tree::euclidean::Nearest< Traits >::result ( )

Definition at line 48 of file Nearest.hpp.

template<class Traits >
bool mpblocks::kd_tree::euclidean::Nearest< Traits >::shouldRecurse ( const Point_t 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

Implements mpblocks::kd_tree::NearestSearchIface< Traits >.

Definition at line 72 of file Nearest.hpp.

Member Data Documentation

template<class Traits >
Format_t mpblocks::kd_tree::euclidean::Nearest< Traits >::m_d2Best
private

Definition at line 52 of file Nearest.h.

template<class Traits >
Distance_t mpblocks::kd_tree::euclidean::Nearest< Traits >::m_dist2Fn
private

Definition at line 51 of file Nearest.h.

template<class Traits >
Node_t* mpblocks::kd_tree::euclidean::Nearest< Traits >::m_nBest
private

Definition at line 53 of file Nearest.h.


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