9#include "../../query.h"
10#include "../Iterator/knnGraphRangeIterator.h"
16 template <
typename Traits>
19#ifndef PARSED_WITH_DOXYGEN
20 struct KnnGraphQueryOutputType :
public QueryOutputBase
22 using OutputParameter =
typename QueryOutputBase::DummyOutputParameter;
34 template <
typename Traits>
37 :
public KNearestIndexQuery<typename Traits::IndexType, typename Traits::DataPoint::Scalar>
40 :
public Query<QueryInputIsIndex<typename Traits::IndexType>, KnnGraphQueryOutputType>
44 using Iterator =
typename Traits::IndexContainer::const_iterator;
45#ifdef PARSED_WITH_DOXYGEN
59 inline Iterator
begin()
const {
return m_graph->index_data().begin() + QueryType::input() * m_graph->k(); }
62 inline Iterator
end()
const {
return m_graph->index_data().begin() + (QueryType::input() + 1) * m_graph->k(); }
Aggregator class used to declare specialized structures using CRTP.
Extension of the Query class that allows to read the result of a k-nearest neighbors search on the Kn...
Self & operator()(int index)
Call the k-nearest neighbors query with new input parameter.
Iterator end() const
Returns an iterator to the end of the k-nearest neighbors query.
Iterator begin() const
Returns an iterator to the beginning of the k-nearest neighbors query.
Base Query class combining QueryInputIsIndex and QueryOutputIsKNearest.
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.