40 namespace Gecode {
namespace Set {
49 : DerivedView<View>(y) {}
66 return x.unknownSize();
91 CachedView<View>::lubMin(
void)
const {
97 CachedView<View>::lubMax(
void)
const {
103 CachedView<View>::glbMin(
void)
const {
109 CachedView<View>::glbMax(
void)
const {
116 return x.cardMin(home,m);
122 return x.cardMax(home,m);
128 return x.include(home,i);
134 return x.exclude(home,i);
140 return x.intersect(home,i);
146 return x.intersect(home,i,j);
152 return x.include(home,i,j);
158 return x.exclude(home,i,j);
164 return x.excludeI(home,iter);
170 return x.includeI(home,iter);
176 return x.intersectI(home,iter);
183 x.subscribe(home,p,pc,schedule);
207 return View::schedule(home,p,me);
212 return View::me(med);
218 return View::med(me);
229 return View::modevent(d);
271 lubCache.update(home,y.lubCache);
272 glbCache.update(home,y.glbCache);
286 glbCache.includeI(home,gr);
289 lubCache.intersectI(home,lr);
296 glbCache.includeI(home,gr);
303 lubCache.intersectI(home,lr);
309 return glbCache.
size() != glbSize();
315 return lubCache.
size() != lubSize();
376 template<
class Char,
class Traits,
class View>
377 std::basic_ostream<Char,Traits>&
378 operator <<(std::basic_ostream<Char,Traits>& os,
380 return os <<
x.base();
386 : gr(x.base()), cr(x.glbCache) {
393 : cr(x.lubCache), lr(x.base()) {
static ModEvent modevent(const Delta &d)
Return modification event.
Range iterator for integer sets.
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.
BndSetRanges cr
Cached lower bound.
Base-class for derived views.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
int med(void) const
Return median of domain (greatest element not greater than the median)
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.
FloatVal intersect(const FloatVal &x, const FloatVal &y)
View base(void) const
Return view from which this view is derived.
int PropCond
Type for propagation conditions.
void update(Space &home, bool share, DerivedView< View > &y)
Update this view to be a clone of view y.
Range iterator for integer sets.
CachedView(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.
ModEvent include(Space &home, View &x, int s)
Prune view x to only include values from s.
GlbRanges(void)
Default constructor.
void init(const T &x)
Initialize with least upper bound ranges for set variable 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.
Gecode toplevel namespace
LubRanges< View > lr
Upper bound iterator.
Range iterator for computing set difference.
LubDiffRanges(const CachedView< View > &x)
Constructor.
LubRanges(void)
Default 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.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
BndSetRanges cr
Cached upper bound.