38 namespace Gecode {
namespace Int {
92 return x.regret_min();
97 return x.regret_max();
195 return x.narrow_r(home,i,depend);
201 return x.inter_r(home,i,depend);
207 return x.minus_r(home,i,depend);
213 return x.narrow_v(home,i,depend);
219 return x.inter_v(home,i,depend);
225 return x.minus_v(home,i,depend);
237 return View::med(me);
277 y_cur = y_cur->next()) {
279 new (home)
RangeList(y_cur->min(),y_cur->max(),NULL);
390 return same(x.
base(),y.
base()) && (x.offset() == y.offset());
396 || (
same(x.
base(),y.
base()) && (x.offset() < y.offset()));
int min(void) const
Return minimum of domain.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
RangeList * _lastRange
Last cached range.
bool before(const CachedView< View > &x, const CachedView< View > &y)
int ModEvent
Type for modification events.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
void init(const View &x)
Initialize with ranges for view x.
Base-class for derived views.
Range iterator for integer views.
int med(void) const
Return median of domain (greatest element not greater than the median)
bool range(void) const
Test whether domain is a range.
bool same(const CachedView< View > &x, const CachedView< View > &y)
int min(void) const
Return smallest value of range.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
int ranges(void) const
Return number of ranges of the specification.
View base(void) const
Return view from which this view is derived.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
void update(Space &home, bool share, DerivedView< View > &y)
Update this view to be a clone of view y.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
RangeList * next(void) const
Return next element.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
int max(void) const
Return maximum of domain.
CachedView(void)
Default constructor.
void init(const CachedView< View > &x)
Initialize with ranges for view x.
void init(const Gecode::RangeList *s)
Initialize with BndSet s.
unsigned int size(void) const
Return size (cardinality) of set.
ViewDiffRanges(void)
Default constructor.
void update(Space &home, bool share, CachedView< View > &y)
Update this view to be a clone of view y.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
unsigned int size(void) const
Return size (cardinality) of domain.
unsigned int _size
Size of cached domain.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int val(void) const
Return assigned value (only if assigned)
bool modified(void) const
Check whether cache differs from current domain.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
View x
View from which this view is derived.
void dispose(Space &home, RangeList *l)
Free memory for all elements between this and l (inclusive)
Lists of ranges (intervals)
bool in(int n) const
Test whether n is contained in domain.
int max(void) const
Return largest value of range.
Gecode toplevel namespace
void init(Iter::Ranges::RangeList &i, ViewRanges< View > &j)
Initialize with iterator i and j.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
void cache(Space &home)
Update cache to current domain.
int ModEventDelta
Modification event deltas.
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Iter::Ranges::RangeList cr
Cached domain iterator.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
int max(int i) const
Return maximum of range at position i.
RangeList * _firstRange
First cached range.
int min(int i) const
Return minimum of range at position i.
ViewRanges< View > dr
Current domain iterator.