Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0
bool.hh
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Christian Schulte <schulte@gecode.org>
5 * Guido Tack <tack@gecode.org>
6 *
7 * Copyright:
8 * Christian Schulte, 2002
9 * Guido Tack, 2004
10 *
11 * This file is part of Gecode, the generic constraint
12 * development environment:
13 * http://www.gecode.org
14 *
15 * Permission is hereby granted, free of charge, to any person obtaining
16 * a copy of this software and associated documentation files (the
17 * "Software"), to deal in the Software without restriction, including
18 * without limitation the rights to use, copy, modify, merge, publish,
19 * distribute, sublicense, and/or sell copies of the Software, and to
20 * permit persons to whom the Software is furnished to do so, subject to
21 * the following conditions:
22 *
23 * The above copyright notice and this permission notice shall be
24 * included in all copies or substantial portions of the Software.
25 *
26 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
27 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
28 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
29 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
30 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
31 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
32 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
33 *
34 */
35
36#ifndef __GECODE_INT_BOOL_HH__
37#define __GECODE_INT_BOOL_HH__
38
39#include <gecode/int.hh>
40
46namespace Gecode { namespace Int { namespace Bool {
47
48 /*
49 * Base Classes
50 *
51 */
52
54 template<class BVA, class BVB>
55 class BoolBinary : public Propagator {
56 protected:
57 BVA x0;
58 BVB x1;
60 BoolBinary(Home home, BVA b0, BVB b1);
65 BVA b0, BVB b1);
66 public:
68 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
70 virtual void reschedule(Space& home);
72 virtual size_t dispose(Space& home);
73 };
74
76 template<class BVA, class BVB, class BVC>
77 class BoolTernary : public Propagator {
78 protected:
79 BVA x0;
80 BVB x1;
81 BVC x2;
83 BoolTernary(Home home, BVA b0, BVB b1, BVC b2);
86 public:
89 BVA b0, BVB b1, BVC b2);
91 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
93 virtual void reschedule(Space& home);
95 virtual size_t dispose(Space& home);
96 };
97
104 template<class BVA, class BVB>
105 class Eq : public BoolBinary<BVA,BVB> {
106 protected:
107 using BoolBinary<BVA,BVB>::x0;
108 using BoolBinary<BVA,BVB>::x1;
110 Eq(Home home, BVA b0, BVB b1);
112 Eq(Space& home, Eq& p);
113 public:
115 Eq(Space& home, Propagator& p,
116 BVA b0, BVB b1);
118 virtual Actor* copy(Space& home);
120 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
122 static ExecStatus post(Home home, BVA x0, BVB x1);
123 };
124
125
132 template<class BV>
133 class NaryEq : public NaryPropagator<BV,PC_BOOL_VAL> {
134 protected:
137 NaryEq(Home home, ViewArray<BV>& x);
139 NaryEq(Space& home, NaryEq& p);
140 public:
142 virtual Actor* copy(Space& home);
144 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
146 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
148 static ExecStatus post(Home home, ViewArray<BV>& x);
149 };
150
151
158 template<class BV>
159 class Lq : public BoolBinary<BV,BV> {
160 protected:
161 using BoolBinary<BV,BV>::x0;
162 using BoolBinary<BV,BV>::x1;
164 Lq(Home home, BV b0, BV b1);
166 Lq(Space& home, Lq& p);
167 public:
169 virtual Actor* copy(Space& home);
171 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
173 static ExecStatus post(Home home, BV b0, BV b1);
174 };
175
182 template<class VX>
183 class NaryLq : public NaryPropagator<VX,PC_BOOL_NONE> {
184 protected:
187 bool run;
191 int n_one;
195 NaryLq(Home home, ViewArray<VX>& x);
197 NaryLq(Space& home, NaryLq<VX>& p);
198 public:
200 virtual Actor* copy(Space& home);
202 virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
204 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
206 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
208 static ExecStatus post(Home home, ViewArray<VX>& x);
210 virtual size_t dispose(Space& home);
211 };
212
213
214
215
222 template<class BV>
223 class Le {
224 public:
226 static ExecStatus post(Home home, BV b0, BV b1);
227 };
228
229
236 template<class BVA, class BVB>
237 class BinOrTrue : public BoolBinary<BVA,BVB> {
238 protected:
239 using BoolBinary<BVA,BVB>::x0;
240 using BoolBinary<BVA,BVB>::x1;
242 BinOrTrue(Home home, BVA b0, BVB b1);
244 BinOrTrue(Space& home, BinOrTrue& p);
245 public:
247 BinOrTrue(Space& home, Propagator& p,
248 BVA b0, BVB b1);
250 virtual Actor* copy(Space& home);
252 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
254 static ExecStatus post(Home home, BVA b0, BVB b1);
255 };
256
263 template<class BV>
264 class TerOrTrue : public BoolBinary<BV,BV> {
265 protected:
266 using BoolBinary<BV,BV>::x0;
267 using BoolBinary<BV,BV>::x1;
269 BV x2;
271 TerOrTrue(Home home, BV b0, BV b1, BV b2);
273 TerOrTrue(Space& home, TerOrTrue& p);
274 public:
276 TerOrTrue(Space& home, Propagator& p,
277 BV b0, BV b1, BV b2);
279 virtual Actor* copy(Space& home);
281 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
283 static ExecStatus post(Home home, BV b0, BV b1, BV b2);
285 virtual size_t dispose(Space& home);
286 };
287
294 template<class BV>
295 class QuadOrTrue : public BoolBinary<BV,BV> {
296 protected:
297 using BoolBinary<BV,BV>::x0;
298 using BoolBinary<BV,BV>::x1;
300 BV x2;
302 BV x3;
304 QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3);
306 QuadOrTrue(Space& home, QuadOrTrue& p);
307 public:
310 BV b0, BV b1, BV b2, BV b3);
312 virtual Actor* copy(Space& home);
314 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
316 static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3);
318 virtual size_t dispose(Space& home);
319 };
320
327 template<class BVA, class BVB, class BVC>
328 class Or : public BoolTernary<BVA,BVB,BVC> {
329 protected:
330 using BoolTernary<BVA,BVB,BVC>::x0;
331 using BoolTernary<BVA,BVB,BVC>::x1;
332 using BoolTernary<BVA,BVB,BVC>::x2;
334 Or(Home home, BVA b0, BVB b1, BVC b2);
336 Or(Space& home, Or& p);
337 public:
339 Or(Space& home, Propagator& p, BVA b0, BVB b1, BVC b2);
341 virtual Actor* copy(Space& home);
343 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
345 static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
346 };
347
354 template<class VX,class VY>
355 class NaryOr
356 : public MixNaryOnePropagator<VX,PC_BOOL_NONE,VY,PC_BOOL_VAL> {
357 protected:
365 NaryOr(Home home, ViewArray<VX>& x, VY y);
367 NaryOr(Space& home, NaryOr<VX,VY>& p);
368 public:
370 virtual Actor* copy(Space& home);
372 virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
374 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
376 virtual void reschedule(Space& home);
378 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
380 static ExecStatus post(Home home, ViewArray<VX>& x, VY y);
382 virtual size_t dispose(Space& home);
383 };
384
385
392 template<class BV>
393 class NaryOrTrue : public BinaryPropagator<BV,PC_BOOL_VAL> {
394 protected:
400 ExecStatus resubscribe(Space& home, BV& x0, BV x1);
405 public:
407 virtual Actor* copy(Space& home);
409 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
411 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
413 static ExecStatus post(Home home, ViewArray<BV>& b);
415 virtual size_t dispose(Space& home);
416 };
417
418
425 template<class BVA, class BVB, class BVC>
426 class Eqv : public BoolTernary<BVA,BVB,BVC> {
427 protected:
428 using BoolTernary<BVA,BVB,BVC>::x0;
429 using BoolTernary<BVA,BVB,BVC>::x1;
430 using BoolTernary<BVA,BVB,BVC>::x2;
432 Eqv(Space& home, Eqv& p);
434 Eqv(Home home, BVA b0 ,BVB b1, BVC b2);
435 public:
437 virtual Actor* copy(Space& home);
439 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
441 static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
442 };
443
444
453 class NaryEqv : public BinaryPropagator<BoolView,PC_BOOL_VAL> {
454 protected:
460 int pm2;
462 void resubscribe(Space& home, BoolView& x0);
464 NaryEqv(Home home, ViewArray<BoolView>& x, int pm2);
466 NaryEqv(Space& home, NaryEqv& p);
467 public:
470 virtual Actor* copy(Space& home);
473 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
476 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
479 static ExecStatus post(Home home, ViewArray<BoolView>& x, int pm2);
481 virtual size_t dispose(Space& home);
482 };
483
484
491 template<class VX, class VY>
492 class Clause : public Propagator {
493 protected:
499 VX z;
503 class Tagged : public Advisor {
504 public:
506 const bool x;
508 Tagged(Space& home, Propagator& p, Council<Tagged>& c, bool x);
510 Tagged(Space& home, Tagged& a);
511 };
515 void cancel(Space& home);
517 Clause(Home home, ViewArray<VX>& x, ViewArray<VY>& y, VX z);
519 Clause(Space& home, Clause<VX,VY>& p);
520 public:
522 virtual Actor* copy(Space& home);
524 virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
526 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
528 virtual void reschedule(Space& home);
530 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
533 VX z);
535 virtual size_t dispose(Space& home);
536 };
537
538
545 template<class VX, class VY>
547 : public MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL> {
548 protected:
559 public:
561 virtual Actor* copy(Space& home);
563 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
565 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
569 virtual size_t dispose(Space& home);
570 };
571
572
579 template<class V0, class V1, class V2, PropCond pc>
580 class IteBase : public Propagator {
581 protected:
585 V0 x0; V1 x1; V2 x2;
587 IteBase(Space& home, IteBase& p);
589 IteBase(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
590 public:
592 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
594 virtual void reschedule(Space& home);
596 virtual size_t dispose(Space& home);
597 };
598
605 template<class V0, class V1, class V2>
606 class IteBnd : public IteBase<V0,V1,V2,PC_INT_BND> {
607 protected:
608 using IteBase<V0,V1,V2,PC_INT_BND>::b;
609 using IteBase<V0,V1,V2,PC_INT_BND>::x0;
610 using IteBase<V0,V1,V2,PC_INT_BND>::x1;
611 using IteBase<V0,V1,V2,PC_INT_BND>::x2;
613 IteBnd(Space& home, IteBnd& p);
615 IteBnd(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
616 public:
618 virtual Actor* copy(Space& home);
620 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
622 static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
623 };
624
631 template<class V0, class V1, class V2>
632 class IteDom : public IteBase<V0,V1,V2,PC_INT_DOM> {
633 protected:
634 using IteBase<V0,V1,V2,PC_INT_DOM>::b;
635 using IteBase<V0,V1,V2,PC_INT_DOM>::x0;
636 using IteBase<V0,V1,V2,PC_INT_DOM>::x1;
637 using IteBase<V0,V1,V2,PC_INT_DOM>::x2;
639 IteDom(Space& home, IteDom& p);
641 IteDom(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
642 public:
644 virtual Actor* copy(Space& home);
646 virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
648 virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
650 static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
651 };
652
653}}}
654
656#include <gecode/int/bool/eq.hpp>
657#include <gecode/int/bool/lq.hpp>
658#include <gecode/int/bool/or.hpp>
662
663#endif
664
665// STATISTICS: int-prop
666
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int p
Number of positive literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Base-class for both propagators and branchers.
Definition core.hpp:628
Base-class for advisors.
Definition core.hpp:1292
Binary propagator.
Definition pattern.hpp:84
Council of advisors
Definition core.hpp:1241
Generic domain change information to be supplied to advisors.
Definition core.hpp:204
Home class for posting propagators
Definition core.hpp:856
Boolean view for Boolean variables.
Definition view.hpp:1380
Binary Boolean disjunction propagator (true)
Definition bool.hh:237
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition or.hpp:103
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:148
static ExecStatus post(Home home, BVA b0, BVB b1)
Post propagator .
Definition or.hpp:125
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:119
Base-class for binary Boolean propagators.
Definition bool.hh:55
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition base.hpp:80
virtual void reschedule(Space &home)
Schedule function.
Definition base.hpp:73
BVB x1
Boolean view Constructor for posting.
Definition bool.hh:58
BoolBinary(Home home, BVA b0, BVB b1)
Definition base.hpp:42
BVA x0
Boolean view.
Definition bool.hh:57
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition base.hpp:67
Base-class for ternary Boolean propagators.
Definition bool.hh:77
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition base.hpp:123
BoolTernary(Home home, BVA b0, BVB b1, BVC b2)
Definition base.hpp:94
BVB x1
Boolean view.
Definition bool.hh:80
BVA x0
Boolean view.
Definition bool.hh:79
BVC x2
Boolean view Constructor for posting.
Definition bool.hh:81
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition base.hpp:137
virtual void reschedule(Space &home)
Schedule function.
Definition base.hpp:129
Boolean clause propagator (disjunctive, true)
Definition bool.hh:547
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition clause.hpp:106
ClauseTrue(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition clause.hpp:43
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition clause.hpp:131
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition clause.hpp:53
ViewArray< VX > x
Views not yet subscribed to.
Definition bool.hh:552
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition clause.hpp:67
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition clause.hpp:173
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables)
Definition bool.hh:554
Advisors for views (tagged whether for x or y)
Definition bool.hh:503
Tagged(Space &home, Propagator &p, Council< Tagged > &c, bool x)
Create tagged advisor.
Definition clause.hpp:193
const bool x
Whether advises a view for x or y.
Definition bool.hh:506
Boolean clause propagator (disjunctive)
Definition bool.hh:492
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition clause.hpp:345
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Post propagator .
Definition clause.hpp:246
ViewArray< VX > x
Positive views.
Definition bool.hh:495
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition clause.hpp:316
virtual void reschedule(Space &home)
Schedule function.
Definition clause.hpp:327
int n_zero
The number of views assigned to zero in x and y.
Definition bool.hh:501
Clause(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Constructor for posting.
Definition clause.hpp:204
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition clause.hpp:307
Council< Tagged > c
The advisor council.
Definition bool.hh:513
ViewArray< VY > y
Positive views (origin from negative variables)
Definition bool.hh:497
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition clause.hpp:238
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition clause.hpp:287
void cancel(Space &home)
Cancel subscriptions.
Definition clause.hpp:293
Boolean equality propagator.
Definition bool.hh:105
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Definition eq.hpp:60
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition eq.hpp:38
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:54
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:84
Boolean equivalence propagator.
Definition bool.hh:426
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eqv.hpp:87
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
Definition eqv.hpp:48
Eqv(Space &home, Eqv &p)
Constructor for cloning p.
Definition eqv.hpp:43
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eqv.hpp:81
If-then-else propagator base-class.
Definition bool.hh:580
IteBase(Space &home, IteBase &p)
Constructor for cloning p.
Definition ite.hpp:52
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition ite.hpp:62
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition ite.hpp:77
BoolView b
View for condition.
Definition bool.hh:583
virtual void reschedule(Space &home)
Schedule function.
Definition ite.hpp:68
If-then-else bounds-consistent propagator.
Definition bool.hh:606
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition ite.hpp:100
IteBnd(Space &home, IteBnd &p)
Constructor for cloning p.
Definition ite.hpp:95
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition ite.hpp:119
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition ite.hpp:106
If-then-else domain-consistent propagator.
Definition bool.hh:632
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary)
Definition ite.hpp:189
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition ite.hpp:198
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition ite.hpp:170
IteDom(Space &home, IteDom &p)
Constructor for cloning p.
Definition ite.hpp:165
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition ite.hpp:176
Boolean less propagator.
Definition bool.hh:223
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition lq.hpp:228
Boolean less or equal propagator.
Definition bool.hh:159
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq.hpp:53
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition lq.hpp:59
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Definition lq.hpp:43
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq.hpp:76
n-ary Boolean equality propagator
Definition bool.hh:133
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
Definition eq.hpp:131
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eq.hpp:165
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition eq.hpp:115
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition eq.hpp:159
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eq.hpp:125
Boolean n-ary equivalence propagator.
Definition bool.hh:453
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition eqv.cpp:81
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Definition eqv.hpp:178
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Definition eqv.hpp:158
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition eqv.hpp:172
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition eqv.cpp:44
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition eqv.cpp:49
int pm2
Parity information mod 2.
Definition bool.hh:460
ViewArray< BoolView > x
Views not yet subscribed to.
Definition bool.hh:458
static ExecStatus post(Home home, ViewArray< BoolView > &x, int pm2)
Post propagator .
Definition eqv.cpp:54
Nary Boolean less or equal propagator.
Definition bool.hh:183
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition lq.hpp:126
int n_one
The number of views assigned to one in x.
Definition bool.hh:191
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition lq.hpp:158
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
Definition lq.hpp:132
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Definition lq.hpp:110
int n_zero
The number of views assigned to zero in x.
Definition bool.hh:189
bool run
Whether the propagator is currently running.
Definition bool.hh:187
Council< Advisor > c
The advisor council.
Definition bool.hh:193
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition lq.hpp:184
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition lq.hpp:164
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition lq.hpp:174
Boolean n-ary disjunction propagator (true)
Definition bool.hh:393
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:718
ExecStatus resubscribe(Space &home, BV &x0, BV x1)
Update subscription.
Definition or.hpp:694
static ExecStatus post(Home home, ViewArray< BV > &b)
Post propagator .
Definition or.hpp:663
ViewArray< BV > x
Views not yet subscribed to.
Definition bool.hh:398
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:634
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition or.hpp:621
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition or.hpp:613
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:687
Boolean n-ary disjunction propagator.
Definition bool.hh:356
virtual void reschedule(Space &home)
Schedule function.
Definition or.hpp:815
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition or.hpp:805
NaryOr(Home home, ViewArray< VX > &x, VY y)
Constructor for posting.
Definition or.hpp:736
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:752
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:839
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition or.hpp:799
int n_zero
The number of views assigned to zero in x.
Definition bool.hh:361
Council< Advisor > c
The advisor council.
Definition bool.hh:363
static ExecStatus post(Home home, ViewArray< VX > &x, VY y)
Post propagator .
Definition or.hpp:769
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:828
Boolean disjunction propagator.
Definition bool.hh:328
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:526
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:477
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator .
Definition or.hpp:494
Or(Home home, BVA b0, BVB b1, BVC b2)
Constructor for posting.
Definition or.hpp:461
Quarternary Boolean disjunction propagator (true)
Definition bool.hh:295
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3)
Constructor for posting.
Definition or.hpp:285
BV x2
Boolean view without subscription.
Definition bool.hh:300
BV x3
Boolean view without subscription.
Definition bool.hh:302
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3)
Post propagator .
Definition or.hpp:330
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:290
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:337
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:314
Ternary Boolean disjunction propagator (true)
Definition bool.hh:264
TerOrTrue(Home home, BV b0, BV b1, BV b2)
Constructor for posting.
Definition or.hpp:181
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition or.hpp:208
BV x2
Boolean view without subscription.
Definition bool.hh:269
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition or.hpp:186
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition or.hpp:227
static ExecStatus post(Home home, BV b0, BV b1, BV b2)
Post propagator .
Definition or.hpp:220
Mixed binary propagator.
Definition pattern.hpp:204
Mixed (n+1)-ary propagator.
Definition pattern.hpp:272
n-ary propagator
Definition pattern.hpp:142
Propagation cost.
Definition core.hpp:486
Base-class for propagators.
Definition core.hpp:1064
ModEventDelta med
A set of modification events (used during propagation)
Definition core.hpp:1075
Computation spaces.
Definition core.hpp:1742
View arrays.
Definition array.hpp:253
#define GECODE_INT_EXPORT
Definition int.hh:81
int ModEventDelta
Modification event deltas.
Definition core.hpp:89
const Gecode::PropCond PC_BOOL_NONE
Propagation condition to be ignored (convenience)
Definition var-type.hpp:118
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Definition var-type.hpp:91
const Gecode::PropCond PC_BOOL_VAL
Propagate when a view becomes assigned (single value)
Definition var-type.hpp:126
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
Definition var-type.hpp:100
Gecode toplevel namespace
ExecStatus
Definition core.hpp:472