Gecode::IntSet Class Reference
[Integer variables]
#include <int.hh>
Detailed Description
Integer sets.Integer sets are the means to specify arbitrary sets of integers to be used as domains for integer variables.
Definition at line 94 of file int.hh.
Constructors and initialization | |
IntSet (void) | |
Initialize as empty set. | |
IntSet (const IntSet &is) | |
Copy constructor. | |
IntSet (int n, int m) | |
Initialize as range with minimum n and maximum m. | |
IntSet (const int r[], int n) | |
Initialize with n integers from array r. | |
IntSet (const int r[][2], int n) | |
Initialize with n ranges from array r. | |
template<class I> | |
IntSet (I &i) | |
Initialize with range iterator i. | |
Range length | |
int | size (void) const |
Return number of ranges of the specification. | |
Range access | |
int | min (int i) const |
Return minimum of range at position i. | |
int | max (int i) const |
Return maximum of range at position i. | |
unsigned int | width (int i) const |
Return width of range at position i. | |
Entire set access | |
int | min (void) const |
Return minimum of entire set. | |
int | max (void) const |
Return maximum of entire set. | |
Cloning | |
void | update (bool share, IntSet &s) |
Update this set to be a copy of s. | |
Predefined value | |
static const IntSet | empty |
Empty set. | |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &, const Gecode::IntSet &s) |
Print integer set s. | |
Classes | |
class | MinInc |
Sort ranges according to increasing minimum. More... |
Constructor & Destructor Documentation
|
Initialize as empty set.
Definition at line 30 of file int-set.icc. |
|
Copy constructor.
Definition at line 33 of file int-set.icc. |
|
Initialize as range with minimum n and maximum m. Note that the set is empty if n is larger than m Definition at line 54 of file int-set.icc. |
|
Initialize with n integers from array r.
Definition at line 51 of file int-set.icc. |
|
Initialize with n ranges from array r. For position i in the array r, the minimum is r[i][0] and the maximum is r[i][1]. Definition at line 48 of file int-set.icc. |
|
Initialize with range iterator i.
Definition at line 37 of file int-set.icc. |
Member Function Documentation
|
Return number of ranges of the specification.
Definition at line 77 of file int-set.icc. |
|
Return minimum of range at position i.
Definition at line 62 of file int-set.icc. |
|
Return maximum of range at position i.
Definition at line 67 of file int-set.icc. |
|
Return width of range at position i.
Definition at line 72 of file int-set.icc. |
|
Return minimum of entire set.
Definition at line 82 of file int-set.icc. |
|
Return maximum of entire set.
Definition at line 87 of file int-set.icc. |
|
Update this set to be a copy of s. If share is true, the copy is identical. Otherwise an independent copy is created. Definition at line 57 of file int-set.icc. |
Friends And Related Function Documentation
|
Print integer set s.
Definition at line 97 of file int-set.cc. |
Member Data Documentation
|
Empty set.
|
The documentation for this class was generated from the following files:
- gecode/int.hh (Revision: 3579)
- gecode/int/int-set.cc (Revision: 3512)
- gecode/int/int-set.icc (Revision: 3512)