Gecode::Iter::Ranges::Array Class Reference
[Range iterators]
List of all members.Detailed Description
Range iterator for array of rangesAllows to iterate the ranges as defined by an array. The ranges can be iterated several times provided the iterator is reset by the reset member function.
Requires
#include "gecode/iter.hh"
Definition at line 34 of file ranges-array.icc.
Constructors and initialization | |
Array (void) | |
Default constructor. | |
Array (Range *r, int n) | |
Initialize with n ranges from r. | |
void | init (Range *r, int n) |
Initialize with n ranges from r. | |
Iteration control | |
bool | operator() (void) const |
Test whether iterator is still at a range or done. | |
void | operator++ (void) |
Move iterator to next range (if possible). | |
void | reset (void) |
Reset iterator to start from beginning. | |
Range access | |
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 Attributes | |
Range * | r |
Array for ranges. | |
int | c |
Current range. | |
int | n |
Number of ranges in array. | |
Classes | |
class | Range |
Ranges for array More... |
Constructor & Destructor Documentation
|
Default constructor.
Definition at line 82 of file ranges-array.icc. |
|
Initialize with n ranges from r.
Definition at line 85 of file ranges-array.icc. |
Member Function Documentation
|
Initialize with n ranges from r.
Definition at line 89 of file ranges-array.icc. |
|
Test whether iterator is still at a range or done.
Definition at line 98 of file ranges-array.icc. |
|
Move iterator to next range (if possible).
Definition at line 94 of file ranges-array.icc. |
|
Reset iterator to start from beginning.
Definition at line 103 of file ranges-array.icc. |
|
Return smallest value of range.
Definition at line 108 of file ranges-array.icc. |
|
Return largest value of range.
Definition at line 112 of file ranges-array.icc. |
|
Return width of range (distance between minimum and maximum).
Definition at line 116 of file ranges-array.icc. |
Member Data Documentation
|
Array for ranges.
Definition at line 43 of file ranges-array.icc. |
|
Current range.
Definition at line 45 of file ranges-array.icc. |
|
Number of ranges in array.
Definition at line 47 of file ranges-array.icc. |
The documentation for this class was generated from the following file:
- gecode/iter/ranges-array.icc (Revision: 3515)