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>
99 const IntSet& z, View1 y) {
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++){
143 while (
i<
x.size() &&
x[
i].assigned()) {
145 unionOfDets.includeI(home,det);
155 unionOfDets.dispose(home);
ExecStatus partitionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
bool testSetEventAnyB(ModEvent me0, ModEvent me1, ModEvent me2)
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
ExecStatus partitionNYLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Range iterator for integer sets.
ExecStatus ES_SUBSUMED(Propagator &p)
ExecStatus unionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &)
Mixed (n+1)-ary propagator.
int ModEvent
Type for modification events.
ExecStatus partitionNXiLB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
Range iterator for the greatest lower bound.
virtual Actor * copy(Space &home, bool)
Copy propagator during cloning.
Propagation has computed fixpoint.
PartitionN(Space &home, bool share, PartitionN &p)
Constructor for cloning p.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Base-class for both propagators and branchers.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool shared(const Space &home) const
Test whether array contains shared views.
Propagator for nary partition
Range iterator for integer sets.
ExecStatus partitionNYUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
void update(Space &home, BndSet &x)
Update this set to be a clone of set x.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
bool includeI(Space &home, I &i)
Include the set represented by i in this set.
GLBndSet unionOfDets
Union of the determined (which are dropped)
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
bool shared(View0 v0, View1 v1, View2 v2)
bool testSetEventLB(ModEvent me0, ModEvent me1, ModEvent me2)
Node * x
Pointer to corresponding Boolean expression node.
ExecStatus partitionNCard(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
Propagation has not computed fixpoint.
int size(void) const
Return size of array (number of elements)
bool shared
Whether the any views share a variable implementation.
bool testSetEventCard(ModEvent me0, ModEvent me1, ModEvent me2)
Gecode toplevel namespace
bool testSetEventUB(ModEvent me0, ModEvent me1, ModEvent me2)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
static ExecStatus post(Home home, View0, View1)
Post propagator .
static ExecStatus post(Home home, ViewArray< View0 > &y, View1 x)
Post propagator .
bool viewarrayshared(const Space &home, const ViewArray< View0 > &va, const View1 &y)