mmcfilters
Public API documentation
Loading...
Searching...
No Matches
mmcfilters::MorphologicalTree::BreadthFirstNodeIterator Class Reference

Breadth-first iterator over one subtree. More...

#include <MorphologicalTree.hpp>

Public Types

using iterator_category = std::input_iterator_tag
 Standard iterator category exposed for STL compatibility.
using value_type = NodeId
 Node id yielded by the iterator.
using difference_type = std::ptrdiff_t
 Signed distance type exposed for STL compatibility.
using pointer = const NodeId*
 Pointer type exposed for STL compatibility.
using reference = const NodeId&
 Reference type exposed for STL compatibility.

Public Member Functions

 BreadthFirstNodeIterator ()=default
 Creates the end/sentinel breadth-first iterator.
 BreadthFirstNodeIterator (const MorphologicalTree *tree, NodeId rootNodeId, std::size_t expectedVersion)
 Creates a breadth-first iterator rooted at rootNodeId.
BreadthFirstNodeIterator & operator++ ()
 Advances to the next node in breadth-first order.
NodeId operator* () const
 Returns the current breadth-first node id.
bool operator== (const BreadthFirstNodeIterator &other) const
 Compares breadth-first iterator exhaustion state.
bool operator!= (const BreadthFirstNodeIterator &other) const
 Compares breadth-first iterator exhaustion state for inequality.

Detailed Description

Breadth-first iterator over one subtree.

Definition at line 3818 of file MorphologicalTree.hpp.

Member Typedef Documentation

◆ difference_type

Signed distance type exposed for STL compatibility.

Definition at line 3833 of file MorphologicalTree.hpp.

◆ iterator_category

Standard iterator category exposed for STL compatibility.

Definition at line 3829 of file MorphologicalTree.hpp.

◆ pointer

Pointer type exposed for STL compatibility.

Definition at line 3835 of file MorphologicalTree.hpp.

◆ reference

Reference type exposed for STL compatibility.

Definition at line 3837 of file MorphologicalTree.hpp.

◆ value_type

Node id yielded by the iterator.

Definition at line 3831 of file MorphologicalTree.hpp.

Constructor & Destructor Documentation

◆ BreadthFirstNodeIterator()

mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::BreadthFirstNodeIterator ( const MorphologicalTree * tree,
NodeId rootNodeId,
std::size_t expectedVersion )
inline

Creates a breadth-first iterator rooted at rootNodeId.

Parameters
treeTree topology.
rootNodeIdIdentifier of the traversal root.
expectedVersionMutation version required by the operation.

Definition at line 3851 of file MorphologicalTree.hpp.

Member Function Documentation

◆ operator!=()

bool mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator!= ( const BreadthFirstNodeIterator & other) const
inline

Compares breadth-first iterator exhaustion state for inequality.

Parameters
otherObject to compare with or transfer from.
Returns
True when the documented condition holds; otherwise false.

Definition at line 3897 of file MorphologicalTree.hpp.

◆ operator*()

NodeId mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator* ( ) const
inline

Returns the current breadth-first node id.

Returns
The current breadth-first node id.

Definition at line 3878 of file MorphologicalTree.hpp.

◆ operator++()

BreadthFirstNodeIterator & mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator++ ( )
inline

Advances to the next node in breadth-first order.

Returns
Mutable reference to the updated object.

Definition at line 3862 of file MorphologicalTree.hpp.

◆ operator==()

bool mmcfilters::MorphologicalTree::BreadthFirstNodeIterator::operator== ( const BreadthFirstNodeIterator & other) const
inline

Compares breadth-first iterator exhaustion state.

Parameters
otherObject to compare with or transfer from.
Returns
True when the documented condition holds; otherwise false.

Definition at line 3889 of file MorphologicalTree.hpp.


The documentation for this class was generated from the following file: