Range iterator for integer views. More...
#include <view.hpp>
Constructors and initialization | |
ViewRanges (void) | |
Default constructor. More... | |
ViewRanges (const View &x) | |
Initialize with ranges for view x. More... | |
void | init (const View &x) |
Initialize with ranges for view x. More... | |
Iteration control | |
bool | operator() (void) const |
Test whether iterator is still at a range or done. More... | |
void | operator++ (void) |
Move iterator to next range (if possible) More... | |
Range access | |
int | min (void) const |
Return smallest value of range. More... | |
int | max (void) const |
Return largest value of range. More... | |
unsigned int | width (void) const |
Return width of range (distance between minimum and maximum) More... | |
Range iterator for integer views.
This class provides (by specialization) a range iterator for all integer views.
Note that this template class serves only as a specification of the interface of the various specializations.
Gecode::Int::ViewRanges< View >::ViewRanges | ( | void | ) |
Default constructor.
Gecode::Int::ViewRanges< View >::ViewRanges | ( | const View & | x | ) |
Initialize with ranges for view x.
void Gecode::Int::ViewRanges< View >::init | ( | const View & | x | ) |
Initialize with ranges for view x.
bool Gecode::Int::ViewRanges< View >::operator() | ( | void | ) | const |
Test whether iterator is still at a range or done.
void Gecode::Int::ViewRanges< View >::operator++ | ( | void | ) |
Move iterator to next range (if possible)
int Gecode::Int::ViewRanges< View >::min | ( | void | ) | const |
Return smallest value of range.
int Gecode::Int::ViewRanges< View >::max | ( | void | ) | const |
Return largest value of range.
unsigned int Gecode::Int::ViewRanges< View >::width | ( | void | ) | const |
Return width of range (distance between minimum and maximum)