Gecode::Set::BndSet Class Reference
Inherited by
Gecode::Set::GLBndSet, and
Gecode::Set::LUBndSet.
List of all members.
Detailed Description
Sets of integers.
Definition at line 152 of file var-imp.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.
|
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 | become (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::min-1 |
| Returned by empty sets when asked for their maximum element.
|
static const int | MIN_OF_EMPTY = Limits::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] |
Default constructor. Creates an empty set.
Definition at line 113 of file integerset.icc.
Gecode::Set::BndSet::BndSet |
( |
Space * |
home, |
|
|
int |
i, |
|
|
int |
j | |
|
) |
| | [inline] |
Gecode::Set::BndSet::BndSet |
( |
Space * |
home, |
|
|
const IntSet & |
s | |
|
) |
| | |
Initialize as the set represented by s.
Definition at line 44 of file integerset.cc.
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] |
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] |
void Gecode::Set::BndSet::become |
( |
Space * |
home, |
|
|
const BndSet & |
s | |
|
) |
| | [inline] |
RangeList * Gecode::Set::BndSet::ranges |
( |
void |
|
) |
const [inline] |
template<class I>
bool Gecode::Set::BndSet::overwrite |
( |
Space * |
home, |
|
|
I & |
i | |
|
) |
| | [inline, protected] |
Overwrite the ranges with those represented by i.
Definition at line 218 of file integerset.icc.
void Gecode::Set::BndSet::update |
( |
Space * |
home, |
|
|
BndSet & |
x | |
|
) |
| | [inline] |
Update this set to be a clone of set x.
Definition at line 189 of file integerset.icc.
bool Gecode::Set::BndSet::isConsistent |
( |
void |
|
) |
const |
Check whether internal invariants hold.
Definition at line 294 of file integerset.cc.
Member Data Documentation
Returned by empty sets when asked for their maximum element.
Definition at line 171 of file var-imp.icc.
Returned by empty sets when asked for their minimum element.
Definition at line 173 of file var-imp.icc.
The documentation for this class was generated from the following files: