dip::NeighborList::Iterator class

Iterates over the neighbors in the NeighborList.

Constructors, destructors, assignment and conversion operators

Iterator() defaulted
Default constructible, yields an invalid iterator.

Aliases

using iterator_category = std::forward_iterator_tag
Iterator category
using reference = dip::NeighborList::Iterator::value_type const&
The type you get when you dereference
using value_type = dip::dfloat
The type that the iterator points at

Functions

auto Coordinates() const -> dip::IntegerArray const&
Get the coordinates for the current neighbor
auto IsInImage(dip::UnsignedArray const& coords, dip::UnsignedArray const& imsz) const -> bool
Returns true if the neighbor pointed to is within the image
void swap(dip::NeighborList::Iterator& other) noexcept
Swap

Operators

auto operator!=(dip::NeighborList::Iterator const& other) const -> bool
Inequality comparison
auto operator*() const -> dip::NeighborList::Iterator::reference
Dereference, yields the distance to the neighbor
auto operator++() -> dip::NeighborList::Iterator&
Pre-increment
auto operator++(int ) -> dip::NeighborList::Iterator
Post-increment
auto operator==(dip::NeighborList::Iterator const& other) const -> bool
Equality comparison

Alias documentation

using iterator_category = std::forward_iterator_tag

Iterator category

using value_type = dip::dfloat

The type that the iterator points at

using reference = dip::NeighborList::Iterator::value_type const&

The type you get when you dereference

Function documentation

Iterator( ) defaulted

Default constructible, yields an invalid iterator.

void swap( dip::NeighborList::Iterator& other) noexcept

Swap

dip::IntegerArray const& Coordinates( ) const

Get the coordinates for the current neighbor

bool IsInImage( dip::UnsignedArray const& coords, dip::UnsignedArray const& imsz) const

Returns true if the neighbor pointed to is within the image

dip::NeighborList::Iterator::reference operator*( ) const

Dereference, yields the distance to the neighbor

dip::NeighborList::Iterator operator++( int )

Post-increment

bool operator==( dip::NeighborList::Iterator const& other) const

Equality comparison

bool operator!=( dip::NeighborList::Iterator const& other) const

Inequality comparison