cheshirekow  v0.1.0
mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator > Class Template Reference

performs search for k-NN within a ball at a specified center and radius More...

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

Inheritance diagram for mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >:
mpblocks::kd_tree::NearestSearchIface< Traits >

Public Types

typedef Allocator< Key_tAllocator_t
 
typedef Distance< TraitsDistance_t
 
typedef Traits::Format_t Format_t
 
typedef HyperRect< TraitsHyperRect_t
 
typedef Key< TraitsKey_t
 
typedef Key_t::Compare KeyCompare_t
 
typedef Traits::Node Node_t
 
typedef Eigen::Matrix
< Format_t, Traits::NDim, 1 > 
Point_t
 
typedef std::set< Key_t,
KeyCompare_t, Allocator_t
PQueue_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...
 
 KNearestBallCenter (const Point_t &center=Point_t::Zero(), Format_t radius=1, unsigned int k=1)
 
void reset (const Point_t &center, Format_t radius, unsigned int k)
 resets the search for the specified point More...
 
void reset ()
 resets the queue but leaves active center and radius More...
 
const PQueue_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 ~KNearestBallCenter ()
 
- Public Member Functions inherited from mpblocks::kd_tree::NearestSearchIface< Traits >
virtual ~NearestSearchIface ()
 just ensure virtualness More...
 

Protected Attributes

Point_t m_center
 the center of the ball More...
 
Distance_t m_dist2
 distance computation More...
 
unsigned int m_k
 number of nearest nodes to find More...
 
PQueue_t m_queue
 k nearest nodes More...
 
Format_t m_radius
 max radius to search More...
 

Detailed Description

template<class Traits, template< class > class Allocator = std::allocator>
class mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >

performs search for k-NN within a ball at a specified center and radius

Definition at line 39 of file KNearestBallCenter.h.

Member Typedef Documentation

template<class Traits , template< class > class Allocator = std::allocator>
typedef Allocator<Key_t> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Allocator_t

Definition at line 50 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Distance<Traits> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Distance_t

Definition at line 46 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Traits::Format_t mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Format_t

Definition at line 43 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef HyperRect<Traits> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::HyperRect_t

Definition at line 47 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Key<Traits> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Key_t

Definition at line 48 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Key_t::Compare mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::KeyCompare_t

Definition at line 49 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Traits::Node mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Node_t

Definition at line 44 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef Eigen::Matrix<Format_t,Traits::NDim,1> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::Point_t

Definition at line 52 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
typedef std::set<Key_t,KeyCompare_t,Allocator_t> mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::PQueue_t

Definition at line 53 of file KNearestBallCenter.h.

Constructor & Destructor Documentation

template<class Traits , template< class > class Allocator>
mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::KNearestBallCenter ( const Point_t center = Point_t::Zero(),
Format_t  radius = 1,
unsigned int  k = 1 
)

Definition at line 38 of file KNearestBallCenter.hpp.

template<class Traits , template< class > class Allocator = std::allocator>
virtual mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::~KNearestBallCenter ( )
inlinevirtual

Definition at line 68 of file KNearestBallCenter.h.

Member Function Documentation

template<class Traits , template< class > class Allocator>
void mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::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 83 of file KNearestBallCenter.hpp.

template<class Traits , template< class > class Allocator>
void mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::reset ( const Point_t center,
Format_t  radius,
unsigned int  k 
)

resets the search for the specified point

Definition at line 50 of file KNearestBallCenter.hpp.

template<class Traits , template< class > class Allocator>
void mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::reset ( )

resets the queue but leaves active center and radius

Definition at line 65 of file KNearestBallCenter.hpp.

template<class Traits , template< class > class Allocator>
const KNearestBallCenter< Traits, Allocator >::PQueue_t & mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::result ( )

Definition at line 75 of file KNearestBallCenter.hpp.

template<class Traits , template< class > class Allocator>
bool mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::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 108 of file KNearestBallCenter.hpp.

Member Data Documentation

template<class Traits , template< class > class Allocator = std::allocator>
Point_t mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::m_center
protected

the center of the ball

Definition at line 57 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
Distance_t mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::m_dist2
protected

distance computation

Definition at line 60 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
unsigned int mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::m_k
protected

number of nearest nodes to find

Definition at line 56 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
PQueue_t mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::m_queue
protected

k nearest nodes

Definition at line 59 of file KNearestBallCenter.h.

template<class Traits , template< class > class Allocator = std::allocator>
Format_t mpblocks::kd_tree::euclidean::KNearestBallCenter< Traits, Allocator >::m_radius
protected

max radius to search

Definition at line 58 of file KNearestBallCenter.h.


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