9#include "../../query.h"
10#include "../Iterator/neighborGraphRangeIterator.h"
53 template <
typename _NeighborGraph>
55 typename _NeighborGraph::Traits::DataPoint::Scalar>
60 using Traits =
typename NeighborGraph::Traits;
62 using DataPoint =
typename Traits::DataPoint;
63 using IndexType =
typename Traits::IndexType;
64 using Scalar =
typename DataPoint::Scalar;
65 using VectorType =
typename DataPoint::VectorType;
82 return QueryType::template
operator()<
Self>(index, radius);
99 PONCA_MULTIARCH
inline Iterator end() {
return Iterator(
this,
static_cast<int>(m_graph->pointCount())); }
102 PONCA_MULTIARCH
inline void initialize(Iterator& iterator)
105 m_flag.insert(QueryType::input());
107 PONCA_DEBUG_ASSERT(
m_stack.empty());
108 m_stack.push(QueryType::input());
110 iterator.m_index = -1;
120 const auto& points = m_graph->points();
121 const auto&
point = points[QueryType::input()].pos();
123 if (iterator ==
end())
138 PONCA_DEBUG_ASSERT(
idx_nei >= 0);
142 Scalar
th = QueryType::descentDistanceThreshold();
159 if (iterator.m_index != QueryType::input())
167 typename Traits::KnnGraphRangeSet
m_flag;
Aggregator class used to declare specialized structures using CRTP.
Input iterator to read the NeighborGraphRangeQuery object.
Extension of the Query class that allows to read the result of a range neighbor search on the KnnGrap...
void advance(Iterator &iterator)
Helper function for the NeighborGraphRangeIterator that advances the range neighbors search using the...
Iterator begin()
Returns an iterator to the beginning of the range neighbors query.
Self & operator()(int index)
Call the range neighbors query with new input parameter.
Traits::KnnGraphRangeStack m_stack
Holds the next ids the Query should visit.
Traits::KnnGraphRangeSet m_flag
Stores every visited neighbor ids.
Self & operator()(int index, Scalar radius)
Call the range neighbors query with new input and radius parameters.
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.