36 namespace Gecode {
namespace Set {
45 : DerivedView<View>(y) {}
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);
179 x.subscribe(home,p,pc,schedule);
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);
282 glbCache.includeI(home,gr);
285 lubCache.intersectI(home,lr);
292 glbCache.includeI(home,gr);
299 lubCache.intersectI(home,lr);
305 return glbCache.
size() != glbSize();
311 return lubCache.
size() != lubSize();
372 template<
class Char,
class Traits,
class View>
373 std::basic_ostream<Char,Traits>&
374 operator <<(std::basic_ostream<Char,Traits>& os,
376 return os <<
x.base();
382 : gr(x.
base()), cr(x.glbCache) {
389 :
cr(x.lubCache), lr(x.
base()) {
View base(void) const
Return view from which this view is derived.
int lubMin(void) const
Return minimum element of least upper bound.
static ModEvent modevent(const Delta &d)
Return modification event.
Range iterator for integer sets.
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
int ModEvent
Type for modification events.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
Base-class for propagators.
bool notContains(int i) const
Test whether i is not in the least upper bound.
BndSetRanges cr
Cached lower bound.
Base-class for derived views.
int glbMin(void) const
Return minimum element of greatest lower bound.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
int lubMax(void) const
Return maximum element of least upper bound.
GlbDiffRanges(const CachedView< View > &x)
Constructor.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
unsigned int unknownSize(void) const
Return number of unknown elements (elements in lub but not in glb)
unsigned int glbSize(void) const
Return number of elements in the greatest lower bound.
FloatVal intersect(const FloatVal &x, const FloatVal &y)
void update(Space &home, DerivedView< View > &y)
Update this view to be a clone of view y.
int PropCond
Type for propagation conditions.
unsigned int cardMin(void) const
Return cardinality minimum.
Range iterator for integer sets.
CachedView(void)
Default constructor.
int glbMax(void) const
Return maximum of greatest lower bound.
int med(void) const
Return median of domain (greatest element not greater than the median)
Post propagator for SetVar SetOpType SetVar y
const double base
Base for geometric restart sequence.
Generic domain change information to be supplied to advisors.
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
ModEvent include(Space &home, View &x, int s)
Prune view x to only include values from s.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
Post propagator for SetVar x
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
unsigned int cardMax(void) const
Return cardinality maximum.
bool contains(int i) const
Test whether i is in greatest lower bound.
unsigned int size(void) const
Return size (cardinality) of domain.
Gecode toplevel namespace
LubRanges< View > lr
Upper bound iterator.
Range iterator for computing set difference.
LubDiffRanges(const CachedView< View > &x)
Constructor.
void init(GlbRanges< View > &i, BndSetRanges &j)
Initialize with iterator i and j.
GlbRanges< View > gr
Lower bound iterator.
int ModEventDelta
Modification event deltas.
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
unsigned int lubSize(void) const
Return number of elements in the least upper bound.
BndSetRanges cr
Cached upper bound.