Ponca  045d6c276f3af384cb0ea094d76ed661278a034a
Point Cloud Analysis library
Loading...
Searching...
No Matches
knnGraphRangeIterator.h
1/*
2 This Source Code Form is subject to the terms of the Mozilla Public
3 License, v. 2.0. If a copy of the MPL was not distributed with this
4 file, You can obtain one at http://mozilla.org/MPL/2.0/.
5*/
6
7#pragma once
8
9namespace Ponca {
10
11template <typename Traits>
12class KnnGraphRangeQuery;
13
14template <typename Traits>
16{
17protected:
18 friend class KnnGraphRangeQuery<Traits>;
19
20public:
21 inline KnnGraphRangeIterator(KnnGraphRangeQuery<Traits>* query, int index = -1) : m_query(query), m_index(index) {}
22
23public:
24 bool operator != (const KnnGraphRangeIterator& other) const{
25 return m_index != other.m_index;
26 }
27
28 void operator ++ (){
29 m_query->advance(*this);
30 }
31
32 int operator * () const{
33 return m_index;
34 }
35
36protected:
37 KnnGraphRangeQuery<Traits>* m_query {nullptr};
38 int m_index {-1};
39};
40
41} // namespace Ponca
This Source Code Form is subject to the terms of the Mozilla Public License, v.