Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
util::IntegerRangeIterator< IntegerType > Class Template Reference

Simple iterator on an integer range, see IntegerRange below. More...

#include <iterators.h>

Inheritance diagram for util::IntegerRangeIterator< IntegerType >:

Public Member Functions

 IntegerRangeIterator (IntegerType value)
 
 IntegerRangeIterator (const IntegerRangeIterator &other)
 
IntegerRangeIteratoroperator= (const IntegerRangeIterator &other)
 
bool operator!= (const IntegerRangeIterator &other) const
 
bool operator== (const IntegerRangeIterator &other) const
 
IntegerType operator* () const
 
IntegerRangeIteratoroperator++ ()
 
IntegerRangeIterator operator++ (int)
 

Detailed Description

template<typename IntegerType>
class util::IntegerRangeIterator< IntegerType >

Simple iterator on an integer range, see IntegerRange below.

Definition at line 105 of file iterators.h.

Constructor & Destructor Documentation

◆ IntegerRangeIterator() [1/2]

template<typename IntegerType >
util::IntegerRangeIterator< IntegerType >::IntegerRangeIterator ( IntegerType value)
inlineexplicit

Definition at line 108 of file iterators.h.

◆ IntegerRangeIterator() [2/2]

template<typename IntegerType >
util::IntegerRangeIterator< IntegerType >::IntegerRangeIterator ( const IntegerRangeIterator< IntegerType > & other)
inline

Definition at line 109 of file iterators.h.

Member Function Documentation

◆ operator!=()

template<typename IntegerType >
bool util::IntegerRangeIterator< IntegerType >::operator!= ( const IntegerRangeIterator< IntegerType > & other) const
inline

This may seems weird, but using < instead of != avoid almost-infinite loop if one use IntegerRange<int>(1, 0) below for instance.

Definition at line 114 of file iterators.h.

◆ operator*()

template<typename IntegerType >
IntegerType util::IntegerRangeIterator< IntegerType >::operator* ( ) const
inline

Definition at line 122 of file iterators.h.

◆ operator++() [1/2]

template<typename IntegerType >
IntegerRangeIterator & util::IntegerRangeIterator< IntegerType >::operator++ ( )
inline

Definition at line 123 of file iterators.h.

◆ operator++() [2/2]

template<typename IntegerType >
IntegerRangeIterator util::IntegerRangeIterator< IntegerType >::operator++ ( int )
inline

Definition at line 127 of file iterators.h.

◆ operator=()

template<typename IntegerType >
IntegerRangeIterator & util::IntegerRangeIterator< IntegerType >::operator= ( const IntegerRangeIterator< IntegerType > & other)
inline

Definition at line 111 of file iterators.h.

◆ operator==()

template<typename IntegerType >
bool util::IntegerRangeIterator< IntegerType >::operator== ( const IntegerRangeIterator< IntegerType > & other) const
inline

Definition at line 119 of file iterators.h.


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