36 namespace Gecode {
namespace Set {
namespace Element {
38 template<
class SView,
class RView>
49 template<
class SView,
class RView>
58 template<
class SView,
class RView>
72 template<
class SView,
class RView>
78 template<
class SView,
class RView>
85 template<
class SView,
class RView>
94 template<
class SView,
class RView>
100 template<
class SView,
class RView>
107 bool fix_flag =
false;
114 for(
int i=0; vx1lb(); ++vx1lb) {
115 while (
iv[
i].idx < vx1lb.
val())
i++;
127 if (
iv[i].idx < vx1ub.
val()) {
139 for (
int k=i; k<
n; k++) {
154 while (
iv[i].idx < vx1u.
val()) {
158 assert(
iv[i].idx == vx1u.
val());
160 SView candidate =
iv[
i].view;
161 int candidateInd =
iv[
i].idx;
185 for (
int k=i; k<
n; k++) {
193 if (
x1.cardMax()==0) {
204 for (; vx1lb(); ++vx1lb) {
205 while (
iv[i].idx < vx1lb.
val()) i++;
206 assert(
iv[i].idx==vx1lb.
val());
209 for (
int j=0; vx1lb2(); ++vx1lb2) {
210 while (
iv[j].idx < vx1lb2.
val()) j++;
211 assert(
iv[j].idx==vx1lb2.
val());
212 if (
iv[i].idx!=
iv[j].idx) {
225 if (
x1.cardMin()-
x1.glbSize() > 1) {
231 for (; vx1u() &&
x1.cardMin()-
x1.glbSize() > 1; ++vx1u) {
233 while (
iv[i].idx < vx1u.
val()) i++;
234 assert(
iv[i].idx == vx1u.
val());
239 for (; vx1u2(); ++vx1u2) {
241 while (
iv[j].idx < vx1u2.
val()) j++;
242 assert(
iv[j].idx == vx1u2.
val());
243 if (
iv[i].idx!=
iv[j].idx) {
271 for (;
x1.cardMin()-
x1.glbSize() == 2 && vx1u(); ++vx1u) {
273 while (
iv[i].idx < vx1u.
val()) i++;
274 assert (
iv[i].idx == vx1u.
val());
279 for (; vx1u2(); ++vx1u2) {
281 while (
iv[j].idx < vx1u2.
val()) j++;
282 assert (
iv[j].idx == vx1u2.
val());
283 if (
iv[i].idx!=
iv[j].idx) {
286 for (; vx1u3(); ++vx1u3) {
288 while (
iv[k].idx < vx1u3.
val()) k++;
289 assert (
iv[k].idx == vx1u3.
val());
290 if (
iv[j].idx!=
iv[k].idx &&
iv[i].idx!=
iv[k].idx) {
313 if (!
iv[
i].view.assigned())
static PropCost quadratic(PropCost::Mod m, unsigned int n)
Quadratic complexity for modifier m and size measure n.
Range iterator for the unknown set.
Range iterator for singleton range.
ExecStatus ES_SUBSUMED(Propagator &p)
int ModEvent
Type for modification events.
Base-class for propagators.
void update(Space &home, IdxViewArray< View > &x)
Cloning.
Range iterator for the greatest lower bound.
Propagator for element with disjointness
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Propagation has computed fixpoint.
int val(void) const
Return current value.
Range iterator for the least upper bound.
Base-class for both propagators and branchers.
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
Range iterator for computing intersection (binary)
void cancel(Space &home, Propagator &p, PropCond pc)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Value iterator from range iterator.
Range iterator for integer sets.
ElementDisjoint(Space &home, ElementDisjoint &p)
Constructor for cloning p.
int size(void) const
Return the current size.
#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.
void dispose(Space &home)
Free memory used by this set.
static ExecStatus post(Home home, IdxViewArray &x, RView y)
Post propagator for .
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Post propagator for SetVar SetOpType SetVar SetRelType r
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
void reschedule(Space &home, Propagator &p, PropCond pc)
Schedule propagator p.
virtual size_t dispose(Space &home)
Delete actor and return its size.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Growing sets of integers.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual void reschedule(Space &home)
Schedule function.
bool me_modified(ModEvent me)
Check whether modification event me describes variable modification.
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function.