Classes | |
class | _Alloc_base |
struct | _Bracket_accessor |
struct | always_true |
struct | squared_difference |
struct | squared_difference_counted |
class | _Base_iterator |
class | _Iterator |
class | KDTree |
struct | _Node_base |
struct | _Node |
class | _Node_compare |
struct | _Region |
Functions | |
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 &) |
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> | |
_Node_base * | _S_node_descend (const size_t __dim, const _Cmp &__cmp, const _Acc &__acc, const _Val &__val, const _Node_base *__node) |
template<class SearchVal, typename _Val, typename _Cmp, typename _Acc, typename _Dist, typename _Predicate> | |
std::pair< const _Node< _Val > *, std::pair< size_t, typename _Dist::distance_type > > | _S_node_nearest (const size_t __k, size_t __dim, SearchVal const &__val, const _Node< _Val > *__node, const _Node_base *__end, const _Node< _Val > *__best, typename _Dist::distance_type __max, const _Cmp &__cmp, const _Acc &__acc, const _Dist &__dist, _Predicate __p) |
_Dist::distance_type KDTree::_S_accumulate_node_distance | ( | const size_t | __dim, | |
const _Dist & | __dist, | |||
const _Acc & | __acc, | |||
const _ValA & | __a, | |||
const _ValB & | __b | |||
) | [inline] |
Compute the distance between two values and accumulate the result for all dimensions.
The distance functor and the accessor are references to the template parameters of the KDTree.
Referenced by KDTree::KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest(), and KDTree::KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest_if().
bool KDTree::_S_node_compare | ( | const size_t | __dim, | |
const _Cmp & | __cmp, | |||
const _Acc & | __acc, | |||
const _ValA & | __a, | |||
const _ValB & | __b | |||
) | [inline] |
Compare two values on the same dimension using a comparison functor _Cmp and an accessor _Acc.
The comparison functor and the accessor are references to the template parameters of the KDTree.
Referenced by _S_node_descend(), and _S_node_nearest().
_Node_base* KDTree::_S_node_descend | ( | const size_t | __dim, | |
const _Cmp & | __cmp, | |||
const _Acc & | __acc, | |||
const _Val & | __val, | |||
const _Node_base * | __node | |||
) | [inline] |
Descend on the left or the right of the node according to the comparison between the node's value and the value.
References KDTree::_Node_base::_M_left, KDTree::_Node_base::_M_right, and _S_node_compare().
Referenced by _S_node_nearest().
_Dist::distance_type KDTree::_S_node_distance | ( | const size_t | __dim, | |
const _Dist & | __dist, | |||
const _Acc & | __acc, | |||
const _ValA & | __a, | |||
const _ValB & | __b | |||
) | [inline] |
Compute the distance between two values for one dimension only.
The distance functor and the accessor are references to the template parameters of the KDTree.
Referenced by _S_node_nearest().
std::pair<const _Node<_Val>*, std::pair<size_t, typename _Dist::distance_type> > KDTree::_S_node_nearest | ( | const size_t | __k, | |
size_t | __dim, | |||
SearchVal const & | __val, | |||
const _Node< _Val > * | __node, | |||
const _Node_base * | __end, | |||
const _Node< _Val > * | __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.
References KDTree::_Node_base::_M_left, KDTree::_Node_base::_M_parent, KDTree::_Node_base::_M_right, _S_node_compare(), _S_node_descend(), and _S_node_distance().
Referenced by KDTree::KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest(), and KDTree::KDTree< __K, _Val, _Acc, _Dist, _Cmp, _Alloc >::find_nearest_if().
bool KDTree::operator!= | ( | _Iterator< _Val, _Val &, _Val * > const & | __X, | |
_Iterator< _Val, const _Val &, const _Val * > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.
bool KDTree::operator!= | ( | _Iterator< _Val, const _Val &, const _Val * > const & | __X, | |
_Iterator< _Val, _Val &, _Val * > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.
bool KDTree::operator!= | ( | _Iterator< _Val, _Ref, _Ptr > const & | __X, | |
_Iterator< _Val, _Ref, _Ptr > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.
bool KDTree::operator== | ( | _Iterator< _Val, _Val &, _Val * > const & | __X, | |
_Iterator< _Val, const _Val &, const _Val * > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.
bool KDTree::operator== | ( | _Iterator< _Val, const _Val &, const _Val * > const & | __X, | |
_Iterator< _Val, _Val &, _Val * > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.
bool KDTree::operator== | ( | _Iterator< _Val, _Ref, _Ptr > const & | __X, | |
_Iterator< _Val, _Ref, _Ptr > const & | __Y | |||
) | [inline] |
References KDTree::_Base_iterator::_M_node.