38 namespace Gecode {
namespace Set {
namespace Channel {
40 template <
typename View>
47 for (
int i=
xs.size();
i--;)
49 for (
int i=
ys.size();
i--;)
55 template <
typename View>
60 xs.update(home, share, p.
xs);
61 ys.update(home, share, p.
ys);
64 template <
typename View>
70 int xssize = xs.size();
71 for (
int i=ys.
size();
i--;)
76 int yssize = ys.size();
77 for (
int i=xs.
size();
i--;)
86 template <
typename View>
93 template <
typename View>
100 return sizeof(*this);
103 template <
typename View>
107 return new (home)
ChannelSet(home,share,*
this);
110 template <
typename View>
120 for (
int i=xs.
size();
i--;)
124 if (xs[
i].glbModified())
130 xs[
i].cacheGlb(home);
133 if (xs[
i].lubModified())
139 xs[
i].cacheLub(home);
143 for (
int i=ys.
size();
i--;)
147 if (ys[
i].glbModified())
153 ys[
i].cacheGlb(home);
156 if (ys[
i].lubModified())
162 ys[
i].cacheLub(home);
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Propagator for successors/predecessors channelling
const int min
Smallest allowed integer in integer set.
ExecStatus ES_SUBSUMED(Propagator &p)
int size(void) const
Return size of array (number of elements)
ViewArray< CachedView< View > > xs
SetViews, reflects the successors of .
Base-class for propagators.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Propagation has computed fixpoint.
const int max
Largest allowed integer in integer set.
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)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
ChannelSet(Space &home, bool share, ChannelSet &p)
Constructor for cloning p.
Value iterator from range iterator.
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.
ViewArray< CachedView< View > > ys
SetViews, reflects the predecessors of .
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.
int val(void) const
Return current value.
Gecode toplevel namespace
static ExecStatus post(Home home, ViewArray< CachedView< View > > &x, ViewArray< CachedView< View > > &y)
Post propagator for .
virtual Actor * copy(Space &home, bool)
Copy propagator during cloning.
int ModEventDelta
Modification event deltas.
Home class for posting propagators
Range iterator for difference of least upper bound and cache
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_QUADRATIC_HI)