Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <iterators.h>
Public Member Functions | |
IntegerRange (IntegerType begin, IntegerType end) | |
Public Member Functions inherited from util::BeginEndWrapper< IntegerRangeIterator< IntegerType > > | |
BeginEndWrapper (IntegerRangeIterator< IntegerType > begin, IntegerRangeIterator< IntegerType > end) | |
IntegerRangeIterator< IntegerType > | begin () const |
IntegerRangeIterator< IntegerType > | end () const |
size_t | size () const |
bool | empty () const |
Additional Inherited Members | |
Public Types inherited from util::BeginEndWrapper< IntegerRangeIterator< IntegerType > > | |
using | const_iterator |
using | value_type |
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 147 of file iterators.h.
|
inline |
Definition at line 149 of file iterators.h.