50 if (v+1 == c->
min()) {
57 }
else if (v <= c->
max()) {
60 }
else if (v == c->
max()+1) {
61 if ((c->next() != NULL) && (v+1 == c->next()->
min())) {
72 p =
reinterpret_cast<RangeList**
>(c->nextRef());
friend FloatVal max(const FloatVal &x, const FloatVal &y)
friend FloatVal min(const FloatVal &x, const FloatVal &y)
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
int max(void) const
Return largest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
void operator++(void)
Move iterator to next range (if possible)
Ranges(const ValSet &vs)
Initialize.
int min(void) const
Return smallest value of range.
int size(void) const
Return size (number of values)
RangeList * fst
First element of range list.
bool subset(View x) const
Whether all values of x are included in the value set.
bool empty(void) const
Test whether set is empty.
int max(void) const
Return largest value (provided the set is not empty)
Iter::Ranges::CompareStatus compare(View x) const
Compare view x with value set.
void flush(void)
Flush entries.
void dispose(Space &home)
Dispose value set.
void update(Space &home, ValSet &vs)
Update value set during cloning.
int n
Number of stored values (integer precision is sufficient)
RangeList * lst
Last element of range list.
int min(void) const
Return smallest value (provided the set is not empty)
void add(Space &home, int v)
Add value v to value set.
Range iterator for integer views.
Lists of ranges (intervals)
T * alloc(long unsigned int n)
Allocate block of n objects of type T from space heap.
CompareStatus
Comapre two iterators with each other.
@ CS_DISJOINT
Intersection is empty.
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
CompareStatus compare(I &i, J &j)
Check whether range iterator i is a subset of j, or whether they are disjoint.
Gecode toplevel namespace
Post propagator for SetVar x