Go to the documentation of this file.
38 namespace Gecode {
namespace Set {
namespace Channel {
40 template <
typename View>
46 for (
int i=
xs.size();
i--;)
48 for (
int i=
ys.size();
i--;)
54 template <
typename View>
58 xs.update(home, share,
p.xs);
59 ys.update(home, share,
p.ys);
62 template <
typename View>
67 int xssize = xs.size();
68 for (
int i=ys.size();
i--;) {
72 int yssize = ys.size();
73 for (
int i=xs.size();
i--;) {
81 template <
typename View>
87 template <
typename View>
94 template <
typename View>
100 return sizeof(*this);
103 template <
typename View>
106 return new (home)
ChannelSet(home,share,*
this);
109 template <
typename View>
117 for (
int i=xs.size();
i--;) {
120 if (xs[
i].glbModified()) {
125 xs[
i].cacheGlb(home);
128 if (xs[
i].lubModified()) {
133 xs[
i].cacheLub(home);
137 for (
int i=ys.size();
i--;) {
140 if (ys[
i].glbModified()) {
145 ys[
i].cacheGlb(home);
148 if (ys[
i].lubModified()) {
153 ys[
i].cacheLub(home);
ModEvent exclude(Space &home, View &x, int s)
Prune view x to exclude all values from s.
ViewArray< CachedView< View > > xs
SetViews, reflects the successors of .
ExecStatus ES_SUBSUMED(Propagator &p)
static const IntSet empty
Empty set.
const int min
Smallest allowed integer in integer set.
bool assigned(View x, int v)
Whether x is assigned to value v.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Base-class for both propagators and branchers.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
ViewArray< CachedView< View > > ys
SetViews, reflects the predecessors of .
Range iterator for difference of greatest lower bound and cache
int val(void) const
Return current value.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_QUADRATIC_HI)
Gecode toplevel namespace
Base-class for propagators.
const int max
Largest allowed integer in integer set.
Home class for posting propagators
virtual Actor * copy(Space &home, bool)
Copy propagator during cloning.
Value iterator from range iterator.
Propagator for successors/predecessors channelling
ChannelSet(Space &home, bool share, ChannelSet &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Range iterator for difference of least upper bound and cache
virtual size_t dispose(Space &home)
Delete propagator and return its size.
@ ES_FIX
Propagation has computed fixpoint.
static ExecStatus post(Home home, ViewArray< CachedView< View > > &x, ViewArray< CachedView< View > > &y)
Post propagator for .
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
virtual size_t dispose(Space &home)
Delete actor and return its size.
int ModEventDelta
Modification event deltas.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
virtual void reschedule(Space &home)
Schedule function.