40namespace Gecode {
namespace Set {
namespace RelOp {
47 template<
class View0,
class View1>
54 template<
class View0,
class View1>
64 template<
class View0,
class View1>
72 template<
class View0,
class View1>
78 template<
class View0,
class View1>
93 template<
class View0,
class View1>
100 template<
class View0,
class View1>
105 template<
class View0,
class View1>
116 bool modified =
false;
117 bool oldModified =
false;
120 oldModified = modified;
122 if (oldModified || anybevent)
124 if (modified || oldModified || anybevent)
126 if (modified || oldModified || ubevent)
128 if (modified || oldModified || lbevent)
130 if (modified || oldModified || ubevent)
132 if (modified || oldModified || cardevent)
137 for(
int i=0;i<
x.size();i++) {
141 unionOfDets.includeI(home,det);
151 unionOfDets.dispose(home);
int p
Number of positive literals for node type.
Base-class for both propagators and branchers.
Home class for posting propagators
Range iterator for integer sets.
Mixed (n+1)-ary propagator.
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
unsigned int cardMax(void) const
Return cardinality maximum.
Range iterator for integer sets.
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
Range iterator for the greatest lower bound.
Propagator for nary partition
bool shared
Whether the any views share a variable implementation.
PartitionN(Space &home, PartitionN &p)
Constructor for cloning p.
GLBndSet unionOfDets
Union of the determined (which are dropped)
static ExecStatus post(Home home, ViewArray< View0 > &y, View1 x)
Post propagator .
virtual Actor * copy(Space &home)
Copy propagator during cloning.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.
static ExecStatus post(Home home, View0 x, View1 y)
Post propagator .
bool assigned(void) const
Test whether view is assigned.
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEventDelta
Modification event deltas.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
ExecStatus partitionNCard(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
bool shared(View0 v0, View1 v1, View2 v2)
ExecStatus partitionNYLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
ExecStatus partitionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
ExecStatus unionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &)
ExecStatus partitionNXiLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
ExecStatus partitionNYUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
bool testSetEventLB(ModEvent me0, ModEvent me1, ModEvent me2)
bool testSetEventCard(ModEvent me0, ModEvent me1, ModEvent me2)
bool testSetEventUB(ModEvent me0, ModEvent me1, ModEvent me2)
bool testSetEventAnyB(ModEvent me0, ModEvent me1, ModEvent me2)
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Gecode toplevel namespace
bool viewarrayshared(const ViewArray< View0 > &va, const View1 &y)
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Post propagator for SetVar SetOpType SetVar y
@ ES_OK
Execution is okay.
@ ES_FIX
Propagation has computed fixpoint.
@ ES_NOFIX
Propagation has not computed fixpoint.
bool shared(ViewArray< ViewX > x, ViewArray< ViewY > y)
Post propagator for SetVar x
int ModEvent
Type for modification events.