Ponca  6f9f1b59d7c8c4654a710cfcef7342f4f5c79ba1
Point Cloud Analysis library
Loading...
Searching...
No Matches
Ponca::NeighborGraphRangeIterator< _NeighborGraph > Class Template Reference

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

#include <neighborGraphRangeIterator.h>

+ Collaboration diagram for Ponca::NeighborGraphRangeIterator< _NeighborGraph >:

Public Types

using iterator_category = std::input_iterator_tag
 
using difference_type = std::ptrdiff_t
 
using value_type = Index
 
using pointer = Index *
 
using reference = const Index &
 

Public Member Functions

 NeighborGraphRangeIterator (NeighborGraphRangeQuery< NeighborGraph > *query, Index index=Index(-1))
 
bool operator!= (const NeighborGraphRangeIterator &other) const
 Inequality operand.
 
bool operator== (const NeighborGraphRangeIterator &other) const
 Equality operand.
 
NeighborGraphRangeIteratoroperator++ ()
 Prefix increment.
 
void operator++ (value_type)
 Postfix increment.
 
reference operator* () const
 Dereference operator.
 

Protected Types

using NeighborGraph = _NeighborGraph
 
using Traits = typename NeighborGraph::Traits
 
using Index = typename Traits::IndexType
 

Protected Attributes

NeighborGraphRangeQuery< NeighborGraph > * m_query {nullptr}
 
value_type m_index {-1}
 

Friends

class NeighborGraphRangeQuery< NeighborGraph >
 

Detailed Description

template<typename _NeighborGraph>
class Ponca::NeighborGraphRangeIterator< _NeighborGraph >

Input iterator to read the NeighborGraphRangeQuery 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
NeighborGraphRangeQuery

Definition at line 29 of file neighborGraphRangeIterator.h.

Member Typedef Documentation

◆ difference_type

using Ponca::NeighborGraphRangeIterator< _NeighborGraph >::difference_type = std::ptrdiff_t

Definition at line 41 of file neighborGraphRangeIterator.h.

◆ Index

using Ponca::NeighborGraphRangeIterator< _NeighborGraph >::Index = typename Traits::IndexType
protected

Definition at line 35 of file neighborGraphRangeIterator.h.

◆ iterator_category

using Ponca::NeighborGraphRangeIterator< _NeighborGraph >::iterator_category = std::input_iterator_tag

Definition at line 40 of file neighborGraphRangeIterator.h.

◆ NeighborGraph

◆ pointer

◆ reference

◆ Traits

using Ponca::NeighborGraphRangeIterator< _NeighborGraph >::Traits = typename NeighborGraph::Traits
protected

Definition at line 33 of file neighborGraphRangeIterator.h.

◆ value_type

Definition at line 42 of file neighborGraphRangeIterator.h.

Constructor & Destructor Documentation

◆ NeighborGraphRangeIterator()

Ponca::NeighborGraphRangeIterator< _NeighborGraph >::NeighborGraphRangeIterator ( NeighborGraphRangeQuery< NeighborGraph > *  query,
Index  index = Index(-1) 
)
inline

Definition at line 46 of file neighborGraphRangeIterator.h.

Member Function Documentation

◆ operator!=()

Inequality operand.

Definition at line 54 of file neighborGraphRangeIterator.h.

◆ operator*()

reference Ponca::NeighborGraphRangeIterator< _NeighborGraph >::operator* ( ) const
inline

Dereference operator.

Definition at line 76 of file neighborGraphRangeIterator.h.

◆ operator++() [1/2]

Prefix increment.

Definition at line 66 of file neighborGraphRangeIterator.h.

◆ operator++() [2/2]

void Ponca::NeighborGraphRangeIterator< _NeighborGraph >::operator++ ( value_type  )
inline

Postfix increment.

Definition at line 73 of file neighborGraphRangeIterator.h.

◆ operator==()

Equality operand.

Definition at line 60 of file neighborGraphRangeIterator.h.

Friends And Related Symbol Documentation

◆ NeighborGraphRangeQuery< NeighborGraph >

friend class NeighborGraphRangeQuery< NeighborGraph >
friend

Definition at line 1 of file neighborGraphRangeIterator.h.

Member Data Documentation

◆ m_index

value_type Ponca::NeighborGraphRangeIterator< _NeighborGraph >::m_index {-1}
protected

Definition at line 80 of file neighborGraphRangeIterator.h.

◆ m_query

Definition at line 79 of file neighborGraphRangeIterator.h.