Go to the documentation of this file.
44 namespace Gecode {
namespace Set {
namespace RelOp {
51 template<
class View0,
class View1>
58 template<
class View0,
class View1>
68 template<
class View0,
class View1>
76 template<
class View0,
class View1>
79 return new (home)
PartitionN(home,share,*
this);
82 template<
class View0,
class View1>
97 template<
class View0,
class View1>
104 template<
class View0,
class View1>
109 template<
class View0,
class View1>
120 bool modified =
false;
121 bool oldModified =
false;
124 oldModified = modified;
126 if (oldModified || anybevent)
128 if (modified || oldModified || anybevent)
130 if (modified || oldModified || ubevent)
132 if (modified || oldModified || lbevent)
134 if (modified || oldModified || ubevent)
136 if (modified || oldModified || cardevent)
141 for(
int i=0;
i<
x.size();
i++){
145 unionOfDets.includeI(home,det);
155 unionOfDets.dispose(home);
Post propagator for SetVar x
Post propagator for SetVar SetOpType SetVar y
ExecStatus partitionNXiLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
ExecStatus ES_SUBSUMED(Propagator &p)
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
ExecStatus partitionNCard(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
ViewArray< View0 > x
Array of views.
Post propagator for SetVar SetOpType SetVar SetRelType SetVar z
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool shared(View0 v0, View1 v1, View2 v2)
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.
ExecStatus partitionNYUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
bool assigned(void) const
Test whether view is assigned.
Mixed (n+1)-ary propagator.
Range iterator for integer sets.
bool shared
Whether the any views share a variable implementation.
Propagator for nary partition
virtual Actor * copy(Space &home, bool)
Copy propagator during cloning.
bool testSetEventCard(ModEvent me0, ModEvent me1, ModEvent me2)
Gecode toplevel namespace
static ExecStatus post(Home home, ViewArray< View0 > &y, View1 x)
Post propagator .
bool testSetEventUB(ModEvent me0, ModEvent me1, ModEvent me2)
ExecStatus partitionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
bool viewarrayshared(const Space &home, const ViewArray< View0 > &va, const View1 &y)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
bool shared(const Space &home) const
Test whether array contains shared views.
Home class for posting propagators
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
GLBndSet unionOfDets
Union of the determined (which are dropped)
unsigned int cardMax(void) const
Return cardinality maximum.
Range iterator for the greatest lower bound.
int ModEvent
Type for modification events.
bool testSetEventAnyB(ModEvent me0, ModEvent me1, ModEvent me2)
ExecStatus partitionNYLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
@ ES_FIX
Propagation has computed fixpoint.
Range iterator for integer sets.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
PartitionN(Space &home, bool share, PartitionN &p)
Constructor for cloning p.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool testSetEventLB(ModEvent me0, ModEvent me1, ModEvent me2)
int ModEventDelta
Modification event deltas.
@ ES_NOFIX
Propagation has not computed fixpoint.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
static ExecStatus post(Home home, View0 x, View1 y)
Post propagator .
ExecStatus unionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)