Ponca
624fc013d41bc7b7ad27159d1c16f7ce57f5a2e4
Point Cloud Analysis library
Loading...
Searching...
No Matches
kdTreeKNearestIterator.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
9
namespace
Ponca
{
10
11
template
<
typename
Index,
typename
DataPo
int
>
12
class
KdTreeKNearestIterator
13
{
14
public
:
15
using
Scalar =
typename
DataPoint::Scalar;
16
using
Iterator =
typename
limited_priority_queue<IndexSquaredDistance<Index, Scalar>
>::iterator;
17
18
inline
KdTreeKNearestIterator
() =
default
;
19
inline
KdTreeKNearestIterator
(
const
Iterator& iterator) : m_iterator(iterator) {}
20
virtual
inline
~KdTreeKNearestIterator
() =
default
;
21
22
public
:
23
inline
bool
operator !=(
const
KdTreeKNearestIterator
& other)
const
24
{
return
m_iterator != other.m_iterator;}
25
inline
void
operator ++() {++m_iterator;}
26
inline
Index operator * ()
const
{
return
m_iterator->index;}
27
inline
void
operator +=(
int
i) {m_iterator += i;}
28
29
protected
:
30
Iterator m_iterator;
31
};
32
}
// namespace ponca
Ponca::KdTreeKNearestIterator
Definition
kdTreeKNearestIterator.h:13
Ponca::limited_priority_queue
The limited_priority_queue class is similar to std::priority_queue but has a limited capacity and han...
Definition
limitedPriorityQueue.h:77
Ponca
This Source Code Form is subject to the terms of the Mozilla Public License, v.
Definition
limitedPriorityQueue.h:14
src
Ponca
src
SpatialPartitioning
KdTree
Iterator
kdTreeKNearestIterator.h
Generated on Thu Jun 12 2025 14:13:45 for Ponca by
1.9.8