9#include "../../query.h"
10#include "../Iterator/knnGraphRangeIterator.h"
14 template <
typename Traits>
15 class StaticKnnGraphBase;
55 template <
typename Traits>
63 using DataPoint =
typename Traits::DataPoint;
64 using IndexType =
typename Traits::IndexType;
65 using Scalar =
typename DataPoint::Scalar;
66 using VectorType =
typename DataPoint::VectorType;
79 return QueryType::template
operator()<
Self>(index, radius);
99 PONCA_MULTIARCH
inline void initialize(Iterator& iterator)
102 m_flag.insert(QueryType::input());
104 PONCA_DEBUG_ASSERT(
m_stack.empty());
105 m_stack.push(QueryType::input());
107 iterator.m_index = -1;
118 const auto& points = m_graph->points();
119 const auto&
point = points[QueryType::input()].pos();
121 if (iterator ==
end())
136 PONCA_DEBUG_ASSERT(
idx_nei >= 0);
140 Scalar
th = QueryType::descentDistanceThreshold();
157 if (iterator.m_index != QueryType::input())
165 typename Traits::KnnGraphRangeSet
m_flag;
Aggregator class used to declare specialized structures using CRTP.
Input iterator to read the KnnGraphRangeQuery object.
Extension of the Query class that allows to read the result of a range neighbor search on the KnnGrap...
Self & operator()(int index, Scalar radius)
Call the range neighbors query with new input and radius parameters.
void advance(Iterator &iterator)
Helper function for the KnnGraphRangeIterator that advances the range neighbors search using the k-ne...
Iterator begin()
Returns an iterator to the beginning of the range neighbors query.
Traits::KnnGraphRangeStack m_stack
Holds the next ids the Query should visit.
Self & operator()(int index)
Call the range neighbors query with new input parameter.
Traits::KnnGraphRangeSet m_flag
Stores every visited neighbor ids.
Iterator end()
Returns an iterator to the end of the range neighbors query.
Composes the Query object depending on an input type and output type.
This Source Code Form is subject to the terms of the Mozilla Public License, v.