Ponca  7df32c91629c89b89840c4d7917cb272433f2d2b
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::KnnGraphKNearestIterator< ContainerPtr, Index > Class Template Reference

Input iterator to read the KnnGraphKNearestQueryBase object. More...

#include <knnGraphKNearestIterator.h>

+ Collaboration diagram for Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >:

Public Types

using iterator_category = std::input_iterator_tag
 
using difference_type = std::ptrdiff_t
 
using value_type = Index
 
using pointer = ContainerPtr
 
using reference = const Index &
 
using Self = KnnGraphKNearestIterator< ContainerPtr, Index >
 

Public Member Functions

 KnnGraphKNearestIterator (ContainerPtr data)
 
 KnnGraphKNearestIterator (ContainerPtr data, Index i)
 
bool operator!= (const KnnGraphKNearestIterator &other) const
 Inequality operand.
 
bool operator== (const KnnGraphKNearestIterator &other) const
 Equality operand.
 
KnnGraphKNearestIteratoroperator++ ()
 Equality operand.
 
reference operator* () const
 Dereference operator.
 
Self operator++ (Index)
 Postfix increment.
 
void operator+= (const Index i)
 Value increment.
 
Self operator+ (const Index i)
 Plus operator.
 

Protected Attributes

ContainerPtr m_data
 
Index m_i {0}
 

Detailed Description

template<typename ContainerPtr, typename Index>
class Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >

Input iterator to read the KnnGraphKNearestQueryBase object.

As this is an input iterator, we don't guarantee anything other than reading the values with it. If you need to operate on the values of this iterator with algorithms that relies on forward iterator functionalities, you should copy the index values in an STL-like container.

Warning
This iterator object should never be duplicated, as it is a proxy that holds a reference to the actual data : The copy of this iterator would still point to the same KnnGraph reference. So, if the increment operator is used on the iterator, the duplicate will also have its state updated. If we then call the increment operator on the duplicate, the result will be an incorrect value.
See also
KnnGraphKNearestQueryBase

Definition at line 30 of file knnGraphKNearestIterator.h.

Member Typedef Documentation

◆ difference_type

template<typename ContainerPtr , typename Index >
using Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::difference_type = std::ptrdiff_t

Definition at line 34 of file knnGraphKNearestIterator.h.

◆ iterator_category

template<typename ContainerPtr , typename Index >
using Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::iterator_category = std::input_iterator_tag

Definition at line 33 of file knnGraphKNearestIterator.h.

◆ pointer

Definition at line 36 of file knnGraphKNearestIterator.h.

◆ reference

template<typename ContainerPtr , typename Index >
using Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::reference = const Index&

Definition at line 37 of file knnGraphKNearestIterator.h.

◆ Self

◆ value_type

template<typename ContainerPtr , typename Index >
using Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::value_type = Index

Definition at line 35 of file knnGraphKNearestIterator.h.

Constructor & Destructor Documentation

◆ KnnGraphKNearestIterator() [1/2]

template<typename ContainerPtr , typename Index >
Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::KnnGraphKNearestIterator ( ContainerPtr  data)
inline

Definition at line 40 of file knnGraphKNearestIterator.h.

◆ KnnGraphKNearestIterator() [2/2]

template<typename ContainerPtr , typename Index >
Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::KnnGraphKNearestIterator ( ContainerPtr  data,
Index  i 
)
inline

Definition at line 42 of file knnGraphKNearestIterator.h.

Member Function Documentation

◆ operator!=()

template<typename ContainerPtr , typename Index >
bool Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator!= ( const KnnGraphKNearestIterator< ContainerPtr, Index > &  other) const
inline

Inequality operand.

Definition at line 45 of file knnGraphKNearestIterator.h.

◆ operator*()

template<typename ContainerPtr , typename Index >
reference Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator* ( ) const
inline

Dereference operator.

Definition at line 58 of file knnGraphKNearestIterator.h.

◆ operator+()

template<typename ContainerPtr , typename Index >
Self Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator+ ( const Index  i)
inline

Plus operator.

Definition at line 72 of file knnGraphKNearestIterator.h.

◆ operator++() [1/2]

Equality operand.

Definition at line 51 of file knnGraphKNearestIterator.h.

◆ operator++() [2/2]

template<typename ContainerPtr , typename Index >
Self Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator++ ( Index  )
inline

Postfix increment.

Definition at line 61 of file knnGraphKNearestIterator.h.

◆ operator+=()

template<typename ContainerPtr , typename Index >
void Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator+= ( const Index  i)
inline

Value increment.

Definition at line 69 of file knnGraphKNearestIterator.h.

◆ operator==()

template<typename ContainerPtr , typename Index >
bool Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::operator== ( const KnnGraphKNearestIterator< ContainerPtr, Index > &  other) const
inline

Equality operand.

Definition at line 48 of file knnGraphKNearestIterator.h.

Member Data Documentation

◆ m_data

Definition at line 75 of file knnGraphKNearestIterator.h.

◆ m_i

template<typename ContainerPtr , typename Index >
Index Ponca::KnnGraphKNearestIterator< ContainerPtr, Index >::m_i {0}
protected

Definition at line 76 of file knnGraphKNearestIterator.h.