Range iterator from value iterator. More...
#include <values-ranges.hpp>
Protected Attributes | |
I | i |
Value iterator used. | |
Protected Attributes inherited from Gecode::Iter::Ranges::MinMax | |
int | mi |
Minimum of current range. | |
int | ma |
Maximum of current range. |
Constructors and initialization | |
ToRanges (void) | |
Default constructor. | |
ToRanges (I &i) | |
Initialize with value iterator i. | |
void | init (I &i) |
Initialize with value iterator i. |
Iteration control | |
void | operator++ (void) |
Move iterator to next range (if possible) |
Additional Inherited Members | |
MinMax (void) | |
Default constructor. | |
MinMax (int min, int max) | |
Initialize with range min to max. | |
bool | operator() (void) const |
Test whether iterator is still at a range or done. | |
int | min (void) const |
Return smallest value of range. | |
int | max (void) const |
Return largest value of range. | |
unsigned int | width (void) const |
Return width of range (distance between minimum and maximum) | |
Protected Member Functions inherited from Gecode::Iter::Ranges::MinMax | |
void | finish (void) |
Set range such that iteration stops |
Range iterator from value iterator.
The iterator only requires that the value iterator iterates values in increasing order. Duplicates in the iterated value sequence are okay.
Definition at line 46 of file values-ranges.hpp.
|
inline |
Default constructor.
Definition at line 70 of file values-ranges.hpp.
|
inline |
Initialize with value iterator i.
Definition at line 87 of file values-ranges.hpp.
|
inline |
Initialize with value iterator i.
Definition at line 94 of file values-ranges.hpp.
|
inline |
Move iterator to next range (if possible)
Definition at line 74 of file values-ranges.hpp.
|
protected |
Value iterator used.
Definition at line 49 of file values-ranges.hpp.