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)
ExecStatus partitionNXiUB(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
bool testSetEventAnyB(ModEvent me0, ModEvent me1, ModEvent me2)
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.
ViewArray< View0 > x
Array of views.
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.
ModEventDelta med
A set of modification events (used during propagation)
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)
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one)
void dispose(Space &home)
Free memory used by this set.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
bool testSetEventLB(ModEvent me0, ModEvent me1, ModEvent me2)
Node * x
Pointer to corresponding Boolean expression node.
bool assigned(void) const
Test if all variables are assigned.
ExecStatus partitionNCard(Space &home, bool &modified, ViewArray< View0 > &x, View1 &y, GLBndSet &unionOfDets)
Propagation has not computed fixpoint.
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.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low linear)
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)