9#include "kdTreeQuery.h"
10#include "../../query.h"
11#include "../Iterator/kdTreeKNearestIterator.h"
23 template <
typename Traits,
template <
typename,
typename>
typename IteratorType,
typename QueryType>
27 using DataPoint =
typename Traits::DataPoint;
28 using IndexType =
typename Traits::IndexType;
29 using Scalar =
typename DataPoint::Scalar;
30 using VectorType =
typename DataPoint::VectorType;
36 typename QueryType::InputType input)
42 PONCA_MULTIARCH
inline Self&
operator()(
typename QueryType::InputType input, IndexType k)
55 QueryAccelType::reset();
65 PONCA_MULTIARCH
inline void search()
69 [](IndexType, IndexType) {}, [
this]() {
return QueryType::descentDistanceThreshold(); },
70 [
this](IndexType idx) {
return QueryType::skipIndexFunctor(idx); },
71 [
this](IndexType idx, IndexType, Scalar d) {
72 QueryType::m_queue.push({idx, d});
83 template <
typename Traits>
93 template <
typename Traits>
Aggregator class used to declare specialized structures using CRTP.
Input iterator to read the KdTreeKNearestQueryBase object.
Extension of the Query class that allows to read the result of a k-nearest neighbors search on the Kd...
Self & operator()(typename QueryType::InputType input, IndexType k)
Call the k-nearest neighbors query with new input and neighbor number parameters.
Self & operator()(typename QueryType::InputType input)
Call the k-nearest neighbors query with new input parameter.
Iterator end()
Returns an iterator to the end of the k-nearest neighbors query.
Iterator begin()
Returns an iterator to the beginning of the k-nearest neighbors query.
Query object that provides a method to search neighbors on the KdTree depending on a distance thresho...
bool searchInternal(const VectorType &point, LeafPreparationFunctor prepareLeafTraversal, DescentDistanceThresholdFunctor descentDistanceThreshold, SkipIndexFunctor skipFunctor, ProcessNeighborFunctor processNeighborFunctor)
Search internally the neighbors of a point using the kdtree.
This Source Code Form is subject to the terms of the Mozilla Public License, v.