![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
Allows to easily construct nice functions for range-based for loop. This can be used like this:
for (const int i : IntegerRange<int>(0, 10)) { ... }
But it main purpose is to be used as return value for more complex classes:
for (const ArcIndex arc : graph.AllOutgoingArcs()); for (const NodeIndex node : graph.AllNodes());
Definition at line 235 of file iterators.h.
#include <iterators.h>
Public Member Functions | |
IntegerRange (IntegerType begin, IntegerType end) | |
Requires begin <= end. | |
Public Member Functions inherited from util::BeginEndWrapper< IntegerRangeIterator< IntegerType > > | |
BeginEndWrapper ()=default | |
If Iterator is default-constructible, an empty range. | |
IntegerRangeIterator< IntegerType > | begin () const |
IntegerRangeIterator< IntegerType > | end () const |
size_t | size () const |
Available only if Iterator is a random access iterator. | |
bool | empty () const |
Additional Inherited Members | |
Public Types inherited from util::BeginEndWrapper< IntegerRangeIterator< IntegerType > > | |
using | const_iterator |
using | value_type |
|
inline |
Requires begin <= end.
Definition at line 238 of file iterators.h.