cheshirekow
v0.1.0
|
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>
Public Types | |
typedef Distance< Traits > | Distance_t |
typedef Traits::Format_t | Format_t |
typedef HyperRect< Traits > | HyperRect_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_t * | result () |
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_t * | m_nBest |
provides a search algorithm for finding the nearest point in the kd tree to some query point.
typedef Distance<Traits> mpblocks::kd_tree::euclidean::Nearest< Traits >::Distance_t |
typedef Traits::Format_t mpblocks::kd_tree::euclidean::Nearest< Traits >::Format_t |
typedef HyperRect<Traits> mpblocks::kd_tree::euclidean::Nearest< Traits >::HyperRect_t |
typedef Traits::Node mpblocks::kd_tree::euclidean::Nearest< Traits >::Node_t |
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::kd_tree::euclidean::Nearest< Traits >::Point_t |
|
inlinevirtual |
|
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.
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.
Traits::Node * mpblocks::kd_tree::euclidean::Nearest< Traits >::result | ( | ) |
Definition at line 48 of file Nearest.hpp.
|
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.
|
private |
|
private |
|
private |