9#include "../../query.h"
10#include "../Iterator/knnGraphRangeIterator.h"
15template <
typename Traits>
class KnnGraphBase;
18#ifndef PARSED_WITH_DOXYGEN
19struct KnnGraphQueryOutputType :
public QueryOutputBase{
20 using OutputParameter =
typename QueryOutputBase::DummyOutputParameter;
32#ifdef PARSED_WITH_DOXYGEN
33:
public KNearestIndexQuery<typename Traits::IndexType, typename Traits::DataPoint::Scalar>
36:
public Query<QueryInputIsIndex<typename Traits::IndexType>,KnnGraphQueryOutputType>
40 using Iterator =
typename Traits::IndexContainer::const_iterator;
41#ifdef PARSED_WITH_DOXYGEN
54 return QueryType::template operator()<
Self>(index);
63 inline Iterator
end()
const{
64 return m_graph->index_data().begin() + (
QueryType::input()+1) * m_graph->k();
Customizable base class for KnnGraph datastructure.
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.
const InputType & input() const
Read access to the input.
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.