36 template <
typename View>
42 for (
int i=
xs.size(); i--;)
44 for (
int i=
ys.size(); i--;)
50 template <
typename View>
54 xs.update(home, p.
xs);
55 ys.update(home, p.
ys);
58 template <
typename View>
63 int xssize =
xs.size();
64 for (
int i=
ys.size(); i--;) {
68 int yssize =
ys.size();
69 for (
int i=
xs.size(); i--;) {
77 template <
typename View>
83 template <
typename View>
90 template <
typename View>
99 template <
typename View>
105 template <
typename View>
113 for (
int i=
xs.size(); i--;) {
114 if (
xs[i].assigned())
116 if (
xs[i].glbModified()) {
121 xs[i].cacheGlb(home);
124 if (
xs[i].lubModified()) {
129 xs[i].cacheLub(home);
133 for (
int i=
ys.size(); i--;) {
134 if (
ys[i].assigned())
136 if (
ys[i].glbModified()) {
141 ys[i].cacheGlb(home);
144 if (
ys[i].lubModified()) {
149 ys[i].cacheLub(home);
Base-class for both propagators and branchers.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Home class for posting propagators
static const IntSet empty
Empty set.
Value iterator from range iterator.
int val(void) const
Return current value.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Propagator(Home home)
Constructor for posting.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
static ExecStatus post(Home home, ViewArray< CachedView< View > > &x, ViewArray< CachedView< View > > &y)
Post propagator for .
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_QUADRATIC_HI)
virtual Actor * copy(Space &home)
Copy propagator during cloning.
ChannelSet(Space &home, ChannelSet &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ViewArray< CachedView< View > > xs
SetViews, reflects the successors of .
ViewArray< CachedView< View > > ys
SetViews, reflects the predecessors of .
Range iterator for difference of greatest lower bound and cache
Range iterator for difference of least upper bound and cache
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
Channeling propagators for set variables.
const int min
Smallest allowed integer in integer set.
const int max
Largest allowed integer in integer set.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.