44 namespace Gecode {
namespace Set {
namespace Channel {
55 for (
int i=
ys.size();
i--;)
66 ys.update(home,share,
p.ys);
78 int xssize = xs.size();
79 for (
int i=ys.
size();
i--;) {
83 int yssize = ys.size();
86 for (
int i=xs.
size();
i--;) {
114 return sizeof(*this);
120 return new (home)
ChannelInt(home,share,*
this);
127 for (
int v=xs.size();
v--;) {
130 if (xs[
v].modified())
133 if (xs[
v].modified()) {
143 for (
int i=ys.
size();
i--;) {
144 if (ys[
i].glbModified()) {
149 ys[
i].cacheGlb(home);
151 if (ys[
i].lubModified()) {
156 ys[
i].cacheLub(home);
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
int size(void) const
Return size of array (number of elements)
const int min
Smallest allowed integer in integer set.
ExecStatus ES_SUBSUMED(Propagator &p)
ChannelInt(Space &home, bool share, ChannelInt &p)
Constructor for cloning p.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_QUADRATIC_LO)
Base-class for propagators.
ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > xs
IntViews, reflects which set contains element .
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
const int max
Largest allowed integer in integer set.
const int max
Largest allowed integer value.
int val(void) const
Return current value.
Base-class for both propagators and branchers.
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
static ExecStatus post(Home home, ViewArray< Gecode::Int::CachedView< Gecode::Int::IntView > > &x, ViewArray< CachedView< View > > &y)
Post propagator for .
Execution has resulted in failure.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Value iterator from range iterator.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Range iterator for difference of greatest lower bound and cache
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
static const IntSet empty
Empty set.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Integer view for integer variables.
virtual void reschedule(Space &home)
Schedule function.
virtual size_t dispose(Space &home)
Delete actor and return its size.
bool assigned(View x, int v)
Whether x is assigned to value v.
ViewArray< CachedView< View > > ys
SetViews that are constrained to be disjoint.
Propagation has not computed fixpoint.
Gecode toplevel namespace
Propagator for channelling between variable-value-dual models
int ModEventDelta
Modification event deltas.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators
Range iterator for difference of least upper bound and cache
Range iterator for cached integer views
virtual size_t dispose(Space &home)
Delete propagator and return its size.