Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
pgl::BitMatrix< TPointType >::Iterator Class Reference

Forward iterator over the set cells, in row-major order. More...

#include <bitmatrix.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
using value_type = PointType
using difference_type = std::ptrdiff_t
using pointer = const PointType*
using reference = const PointType&

Public Member Functions

 Iterator ()=default
reference operator* () const
 The cell the iterator is on.
pointer operator-> () const
 The cell the iterator is on.
Iteratoroperator++ ()
 Advances to the next set cell.
Iterator operator++ (int)
 Advances to the next set cell, returning the previous one.
bool operator== (const Iterator &other) const
 Whether two iterators are on the same cell of the same matrix.
bool operator!= (const Iterator &other) const
 Whether two iterators are on different cells.

Friends

class BitMatrix

Detailed Description

template<class TPointType = Point<int>>
class pgl::BitMatrix< TPointType >::Iterator

Forward iterator over the set cells, in row-major order.

Member Typedef Documentation

◆ difference_type

template<class TPointType = Point<int>>
using pgl::BitMatrix< TPointType >::Iterator::difference_type = std::ptrdiff_t

◆ iterator_category

template<class TPointType = Point<int>>
using pgl::BitMatrix< TPointType >::Iterator::iterator_category = std::forward_iterator_tag

◆ pointer

template<class TPointType = Point<int>>
using pgl::BitMatrix< TPointType >::Iterator::pointer = const PointType*

◆ reference

template<class TPointType = Point<int>>
using pgl::BitMatrix< TPointType >::Iterator::reference = const PointType&

◆ value_type

template<class TPointType = Point<int>>
using pgl::BitMatrix< TPointType >::Iterator::value_type = PointType

Constructor & Destructor Documentation

◆ Iterator()

template<class TPointType = Point<int>>
pgl::BitMatrix< TPointType >::Iterator::Iterator ( )
default

Member Function Documentation

◆ operator!=()

template<class TPointType = Point<int>>
bool pgl::BitMatrix< TPointType >::Iterator::operator!= ( const Iterator & other) const
inline

Whether two iterators are on different cells.

◆ operator*()

template<class TPointType = Point<int>>
reference pgl::BitMatrix< TPointType >::Iterator::operator* ( ) const
inline

The cell the iterator is on.

◆ operator++() [1/2]

template<class TPointType = Point<int>>
Iterator & pgl::BitMatrix< TPointType >::Iterator::operator++ ( )
inline

Advances to the next set cell.

◆ operator++() [2/2]

template<class TPointType = Point<int>>
Iterator pgl::BitMatrix< TPointType >::Iterator::operator++ ( int )
inline

Advances to the next set cell, returning the previous one.

◆ operator->()

template<class TPointType = Point<int>>
pointer pgl::BitMatrix< TPointType >::Iterator::operator-> ( ) const
inline

The cell the iterator is on.

◆ operator==()

template<class TPointType = Point<int>>
bool pgl::BitMatrix< TPointType >::Iterator::operator== ( const Iterator & other) const
inline

Whether two iterators are on the same cell of the same matrix.

◆ BitMatrix

template<class TPointType = Point<int>>
friend class BitMatrix
friend