31#if defined(IntegerSequenceIterator_RECURSES)
32#error Recursive header files inclusion detected in IntegerSequenceIterator.h
35#define IntegerSequenceIterator_RECURSES
37#if !defined IntegerSequenceIterator_h
39#define IntegerSequenceIterator_h
44#include <boost/iterator/iterator_facade.hpp>
45#include "DGtal/base/Common.h"
64 template <
typename TInteger>
66 :
public boost::iterator_facade< IntegerSequenceIterator< TInteger >,
68 boost::random_access_traversal_tag >
165#undef IntegerSequenceIterator_RECURSES
Aim: It is a simple class that mimics a (non mutable) iterator over integers. You can increment it,...
void increment()
Increments the iterator. Required by boost::iterator_facade.
~IntegerSequenceIterator()=default
void advance(std::ptrdiff_t n)
IntegerSequenceIterator(Integer n=Integer(0))
Integer const & dereference() const
IntegerSequenceIterator & operator=(const IntegerSequenceIterator &other)=default
bool equal(IntegerSequenceIterator const &other) const
Integer myNumber
The current value of the interator.
friend class boost::iterator_core_access
std::ptrdiff_t distance_to(IntegerSequenceIterator const &other)
IntegerSequenceIterator(const IntegerSequenceIterator &other)=default
void decrement()
Decrements the iterator. Required by boost::iterator_facade.
IntegerSequenceIterator(IntegerSequenceIterator &&other)=default
IntegerSequenceIterator< TInteger > Self
DGtal is the top-level namespace which contains all DGtal functions and types.