45 : DerivedView<View>(
y) {}
62 return x.unknownSize();
112 return x.cardMin(home,m);
118 return x.cardMax(home,m);
124 return x.include(home,i);
130 return x.exclude(home,i);
136 return x.intersect(home,i);
142 return x.intersect(home,i,j);
148 return x.include(home,i,j);
154 return x.exclude(home,i,j);
160 return x.excludeI(home,iter);
166 return x.includeI(home,iter);
172 return x.intersectI(home,iter);
203 return View::schedule(home,p,
me);
208 return View::me(
med);
214 return View::med(me);
225 return View::modevent(d);
267 lubCache.update(home,
y.lubCache);
268 glbCache.update(home,
y.glbCache);
372 template<
class Char,
class Traits,
class View>
373 std::basic_ostream<Char,Traits>&
376 return os <<
x.base();
382 return x.base() ==
y.base();
388 return x.base() !=
y.base();
394 :
gr(
x.base()),
cr(
x.glbCache) {
401 :
cr(
x.lubCache),
lr(
x.base()) {
Generic domain change information to be supplied to advisors.
View base(void) const
Return view from which this view is derived.
View x
View from which this view is derived.
void update(Space &home, DerivedView< View > &y)
Update this view to be a clone of view y.
Range iterator for integer sets.
Range iterator for computing set difference.
void init(GlbRanges< View > &i, BndSetRanges &j)
Base-class for propagators.
Range iterator for integer sets.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
bool glbModified(void) const
Check whether greatest lower bound cache differs from current domain.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
GLBndSet glbCache
The cached greatest lower bound.
void initCache(Space &home, const IntSet &glb, const IntSet &lub)
Initialize cache to bounds glb and lub.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
LUBndSet lubCache
The cached least upper bound.
int lubMin(void) const
Return minimum of the least upper bound.
unsigned int cardMax(void) const
Return maximum cardinality.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
static ModEvent modevent(const Delta &d)
Return modification event.
bool contains(int i) const
Test whether i is in the greatest lower bound.
unsigned int cardMin(void) const
Return minimum cardinality.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
void cacheLub(Space &home)
Update least upper bound cache to current domain.
void cacheGlb(Space &home)
Update greatest lower bound cache to current domain.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
bool lubModified(void) const
Check whether least upper bound cache differs from current domain.
unsigned int unknownSize(void) const
Return the number of unknown elements.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
bool notContains(int i) const
Test whether i is not in the least upper bound.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
int lubMax(void) const
Return maximum of the least upper bound.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
int glbMin(void) const
Return minimum of the greatest lower bound.
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
CachedView(void)
Default constructor.
GlbRanges< View > gr
Lower bound iterator.
GlbDiffRanges(const CachedView< View > &x)
Constructor.
BndSetRanges cr
Cached lower bound.
void init(const CachedView< View > &x)
Initialize with ranges for view x.
GlbRanges(void)
Default constructor.
Range iterator for the greatest lower bound.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
GlbRanges(void)
Default constructor.
LubRanges< View > lr
Upper bound iterator.
BndSetRanges cr
Cached upper bound.
LubDiffRanges(const CachedView< View > &x)
Constructor.
LubRanges(void)
Default constructor.
void init(const CachedView< View > &x)
Initialize with ranges for view x.
Range iterator for the least upper bound.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
int ModEventDelta
Modification event deltas.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.