|
template<typename _ValA , typename _ValB , typename _Cmp , typename _Acc > |
bool | _S_node_compare (const size_t __dim, const _Cmp &__cmp, const _Acc &__acc, const _ValA &__a, const _ValB &__b) |
|
template<typename _ValA , typename _ValB , typename _Dist , typename _Acc > |
_Dist::distance_type | _S_node_distance (const size_t __dim, const _Dist &__dist, const _Acc &__acc, const _ValA &__a, const _ValB &__b) |
|
template<typename _ValA , typename _ValB , typename _Dist , typename _Acc > |
_Dist::distance_type | _S_accumulate_node_distance (const size_t __dim, const _Dist &__dist, const _Acc &__acc, const _ValA &__a, const _ValB &__b) |
|
template<typename _Val , typename _Cmp , typename _Acc , typename NodeType > |
const NodeType * | _S_node_descend (const size_t __dim, const _Cmp &__cmp, const _Acc &__acc, const _Val &__val, const NodeType *__node) |
|
template<class SearchVal , typename NodeType , typename _Cmp , typename _Acc , typename _Dist , typename _Predicate > |
std::pair< const NodeType *, std::pair< size_t, typename _Dist::distance_type > > | _S_node_nearest (const size_t __k, size_t __dim, SearchVal const &__val, const NodeType *__node, const _Node_base *__end, const NodeType *__best, typename _Dist::distance_type __max, const _Cmp &__cmp, const _Acc &__acc, const _Dist &__dist, _Predicate __p) |
|
template<typename _Val , typename _Ref , typename _Ptr > |
bool | operator== (_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &) |
|
template<typename _Val > |
bool | operator== (_Iterator< _Val, const _Val &, const _Val * > const &, _Iterator< _Val, _Val &, _Val * > const &) |
|
template<typename _Val > |
bool | operator== (_Iterator< _Val, _Val &, _Val * > const &, _Iterator< _Val, const _Val &, const _Val * > const &) |
|
template<typename _Val , typename _Ref , typename _Ptr > |
bool | operator!= (_Iterator< _Val, _Ref, _Ptr > const &, _Iterator< _Val, _Ref, _Ptr > const &) |
|
template<typename _Val > |
bool | operator!= (_Iterator< _Val, const _Val &, const _Val * > const &, _Iterator< _Val, _Val &, _Val * > const &) |
|
template<typename _Val > |
bool | operator!= (_Iterator< _Val, _Val &, _Val * > const &, _Iterator< _Val, const _Val &, const _Val * > const &) |
|
std::pair<const NodeType*,std::pair<size_t, typename _Dist::distance_type> > KDTree::_S_node_nearest |
( |
const size_t |
__k, |
|
|
size_t |
__dim, |
|
|
SearchVal const & |
__val, |
|
|
const NodeType * |
__node, |
|
|
const _Node_base * |
__end, |
|
|
const NodeType * |
__best, |
|
|
typename _Dist::distance_type |
__max, |
|
|
const _Cmp & |
__cmp, |
|
|
const _Acc & |
__acc, |
|
|
const _Dist & |
__dist, |
|
|
_Predicate |
__p |
|
) |
| |
|
inline |
Find the nearest node to __val from __node
If many nodes are equidistant to __val, the node with the lowest memory address is returned.
- Returns
- the nearest node of __end node if no nearest node was found for the given arguments.
References _S_node_compare(), _S_node_descend(), and _S_node_distance().
Referenced by KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest(), and KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest_if().