Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
Range and value iterators

Topics

 Range iterators
 
 Value iterators
 

Detailed Description

Both range and value iterators have a rather simple interface for controlling iteration (which deviates from what you might be used to from other iterators).

The application operator (if i is an iterator, it is invoked by i() ) tests whether an iterator has not yet reached its end (in this case, true is returned). The prefix increment operator (if i is an iterator, this is invoked as ++i) moves the iterator to the next element (either next value or next range).

Value iterators provide access to the value by the member function val(). Range iterators provide access to the smallest, largest, and width of the current range by min(), max(), and width() respectively.

Requires