Gecode::Set::BndSet Class Reference
Inherited by Gecode::Set::GLBndSet, and Gecode::Set::LUBndSet.Detailed Description
Sets of integers.
Definition at line 110 of file var.icc.
Constructors and initialization | |
BndSet (void) | |
Default constructor. Creates an empty set. | |
BndSet (Space *home, int i, int j) | |
Initialize as the set . | |
BndSet (Space *home, const IntSet &s) | |
Initialize as the set represented by s. | |
Memory management | |
void | dispose (Space *home) |
Free memory used by this set. | |
Value access | |
int | min (void) const |
Return smallest element. | |
int | max (void) const |
Return greatest element. | |
int | minN (unsigned int n) const |
Return n -th smallest element. | |
int | maxN (unsigned int n) const |
Return n -th greatest element. | |
unsigned int | size (void) const |
Return size. | |
Tests | |
bool | empty (void) const |
Test whether this set is empty. | |
bool | in (int i) const |
Test whether i is an element of this set. | |
Update operations | |
void | linkTo (Space *home, const BndSet &s) |
Make this set equal to s. | |
Range list access for iteration | |
RangeList * | ranges (void) const |
Return range list for iteration. | |
Cloning | |
void | update (Space *home, BndSet &x) |
Update this set to be a clone of set x. | |
Public Member Functions | |
bool | isConsistent (void) const |
Check whether internal invariants hold. | |
Static Public Attributes | |
static const int | MAX_OF_EMPTY = Limits::Set::int_min-1 |
Returned by empty sets when asked for their maximum element. | |
static const int | MIN_OF_EMPTY = Limits::Set::int_max+1 |
Returned by empty sets when asked for their minimum element. | |
Protected Member Functions | |
void | fst (RangeList *r) |
Set first range to r. | |
void | lst (RangeList *r) |
Set last range to r. | |
RangeList * | fst (void) const |
Return first range. | |
RangeList * | lst (void) const |
Return last range. | |
template<class I> | |
bool | overwrite (Space *home, I &i) |
Overwrite the ranges with those represented by i. | |
Protected Attributes | |
unsigned int | _size |
The size of this set. |
Constructor & Destructor Documentation
|
Default constructor. Creates an empty set.
Definition at line 130 of file integerset.icc. |
|
Initialize as the set .
Definition at line 160 of file integerset.icc. |
|
Initialize as the set represented by s.
Definition at line 28 of file integerset.cc. |
Member Function Documentation
|
Set first range to r.
Definition at line 150 of file integerset.icc. |
|
Set last range to r.
Definition at line 155 of file integerset.icc. |
|
Return first range.
Definition at line 134 of file integerset.icc. |
|
Return last range.
Definition at line 139 of file integerset.icc. |
|
Free memory used by this set.
Definition at line 144 of file integerset.icc. |
|
Return smallest element.
Definition at line 183 of file integerset.icc. |
|
Return greatest element.
Definition at line 189 of file integerset.icc. |
|
Return n -th smallest element.
Definition at line 196 of file integerset.icc. |
|
Return n -th greatest element.
Definition at line 213 of file integerset.icc. |
|
Return size.
Definition at line 173 of file integerset.icc. |
|
Test whether this set is empty.
Definition at line 178 of file integerset.icc. |
|
Test whether i is an element of this set.
Definition at line 320 of file integerset.icc. |
|
Make this set equal to s.
Definition at line 307 of file integerset.icc. |
|
Return range list for iteration.
Definition at line 168 of file integerset.icc. |
|
Overwrite the ranges with those represented by i.
Definition at line 267 of file integerset.icc. |
|
Update this set to be a clone of set x.
Definition at line 229 of file integerset.icc. |
|
Check whether internal invariants hold.
Definition at line 195 of file integerset.cc. |
Member Data Documentation
|
The size of this set.
|
|
Returned by empty sets when asked for their maximum element.
|
|
Returned by empty sets when asked for their minimum element.
|
The documentation for this class was generated from the following files:
- gecode/set/var.icc (Revision: 3568)
- gecode/set/var/integerset.cc (Revision: 3188)
- gecode/set/var/integerset.icc (Revision: 3413)