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
Gecode::Set::BndSet::BndSet | ( | void | ) | [inline] |
Gecode::Set::BndSet::BndSet | ( | Space * | home, | |
int | i, | |||
int | j | |||
) | [inline] |
Member Function Documentation
void Gecode::Set::BndSet::fst | ( | RangeList * | r | ) | [inline, protected] |
void Gecode::Set::BndSet::lst | ( | RangeList * | r | ) | [inline, protected] |
RangeList * Gecode::Set::BndSet::fst | ( | void | ) | const [inline, protected] |
RangeList * Gecode::Set::BndSet::lst | ( | void | ) | const [inline, protected] |
void Gecode::Set::BndSet::dispose | ( | Space * | home | ) | [inline] |
int Gecode::Set::BndSet::min | ( | void | ) | const [inline] |
int Gecode::Set::BndSet::max | ( | void | ) | const [inline] |
int Gecode::Set::BndSet::minN | ( | unsigned int | n | ) | const [inline] |
int Gecode::Set::BndSet::maxN | ( | unsigned int | n | ) | const [inline] |
unsigned int Gecode::Set::BndSet::size | ( | void | ) | const [inline] |
bool Gecode::Set::BndSet::empty | ( | void | ) | const [inline] |
bool Gecode::Set::BndSet::in | ( | int | i | ) | const [inline] |
RangeList * Gecode::Set::BndSet::ranges | ( | void | ) | const [inline] |
template<class I>
bool Gecode::Set::BndSet::overwrite | ( | Space * | home, | |
I & | i | |||
) | [inline, protected] |
bool Gecode::Set::BndSet::isConsistent | ( | void | ) | const |
Member Data Documentation
unsigned int Gecode::Set::BndSet::_size [protected] |
const int Gecode::Set::BndSet::MAX_OF_EMPTY = Limits::Set::int_min-1 [static] |
const int Gecode::Set::BndSet::MIN_OF_EMPTY = Limits::Set::int_max+1 [static] |
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)