9#include "kdTreeQuery.h"
10#include "../../query.h"
11#include "../Iterator/kdTreeKNearestIterator.h"
15template <
typename Traits,
16 template <
typename,
typename>
typename IteratorType,
21 using DataPoint =
typename Traits::DataPoint;
22 using IndexType =
typename Traits::IndexType;
23 using Scalar =
typename DataPoint::Scalar;
24 using VectorType =
typename DataPoint::VectorType;
26 using Iterator = IteratorType<typename Traits::IndexType, typename Traits::DataPoint>;
32 inline Iterator begin(){
36 return Iterator(QueryType::m_queue.begin());
38 inline Iterator end(){
39 return Iterator(QueryType::m_queue.end());
45 [](IndexType, IndexType){},
46 [
this](){
return QueryType::descentDistanceThreshold();},
47 [
this](IndexType idx){
return QueryType::skipIndexFunctor(idx);},
48 [
this](IndexType idx, IndexType, Scalar d){QueryType::m_queue.push({idx, d});
return false;}
53template <
typename Traits>
56template <
typename Traits>
[KdTreeSparse type definition]
void reset()
Init stack for a new search.
bool search_internal(const VectorType &point, LeafPreparationFunctor prepareLeafTraversal, DescentDistanceThresholdFunctor descentDistanceThreshold, SkipIndexFunctor skipFunctor, ProcessNeighborFunctor processNeighborFunctor)
const KdTreeBase< Traits > * m_kdtree
[KdTreeQuery kdtree type]
Base Query class combining QueryInputIsIndex and QueryOutputIsKNearest.
Base Query class combining QueryInputIsPosition and QueryOutputIsKNearest.
This Source Code Form is subject to the terms of the Mozilla Public License, v.