44 namespace Gecode {
namespace Set {
namespace Channel {
55 for (
int i=
ys.size();
i--;)
66 ys.update(home,share,p.
ys);
79 for (
int i=
ys.size();
i--;) {
83 int yssize =
ys.size();
107 return sizeof(*this);
113 return new (home)
ChannelInt(home,share,*
this);
123 if (
xs[
v].modified())
126 if (
xs[
v].modified()) {
136 for (
int i=
ys.size();
i--;) {
137 if (
ys[
i].glbModified()) {
142 ys[
i].cacheGlb(home);
144 if (
ys[
i].lubModified()) {
149 ys[
i].cacheLub(home);
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.
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 .
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.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Subscribe propagator p with propagation condition pc to variable.
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
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to all views.
#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 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 Actor * copy(Space &home, bool)
Copy propagator during cloning.
virtual size_t dispose(Space &home)
Delete propagator and return its size.