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

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

Inheritance diagram for mpblocks::kd_tree::r2_s1::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

Distance_tdistFn ()
 expose distance function More...
 
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::r2_s1::Nearest< Traits >

Definition at line 37 of file Nearest.h.

Member Typedef Documentation

template<class Traits >
typedef Distance<Traits> mpblocks::kd_tree::r2_s1::Nearest< Traits >::Distance_t

Definition at line 44 of file Nearest.h.

Definition at line 41 of file Nearest.h.

Definition at line 45 of file Nearest.h.

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

Definition at line 42 of file Nearest.h.

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

Definition at line 47 of file Nearest.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file Nearest.h.

Member Function Documentation

template<class Traits >
Distance_t& mpblocks::kd_tree::r2_s1::Nearest< Traits >::distFn ( )
inline

expose distance function

Definition at line 58 of file Nearest.h.

template<class Traits >
void mpblocks::kd_tree::r2_s1::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::r2_s1::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::r2_s1::Nearest< Traits >::result ( )

Definition at line 48 of file Nearest.hpp.

template<class Traits >
bool mpblocks::kd_tree::r2_s1::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::r2_s1::Nearest< Traits >::m_d2Best
private

Definition at line 51 of file Nearest.h.

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

Definition at line 50 of file Nearest.h.

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

Definition at line 52 of file Nearest.h.


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