Generated on Tue Mar 24 2020 14:04:04 for Gecode by doxygen 1.8.17
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 
46 namespace 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;
59  BoolBinary(Home home, BVA b0, BVB b1);
62  BoolBinary(Space& home, BoolBinary& p);
64  BoolBinary(Space& home, Propagator& p,
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;
82  BoolTernary(Home home, BVA b0, BVB b1, BVC b2);
85  BoolTernary(Space& home, BoolTernary& p);
86  public:
88  BoolTernary(Space& home, Propagator& p,
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:
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;
189  int n_zero;
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:
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:
309  QuadOrTrue(Space& home, Propagator& p,
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:
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:
361  int n_zero;
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);
402  NaryOrTrue(Home home, ViewArray<BV>& x);
404  NaryOrTrue(Space& home, NaryOrTrue<BV>& p);
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:
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;
501  int n_zero;
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);
567  static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
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:
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:
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 
655 #include <gecode/int/bool/base.hpp>
656 #include <gecode/int/bool/eq.hpp>
657 #include <gecode/int/bool/lq.hpp>
658 #include <gecode/int/bool/or.hpp>
659 #include <gecode/int/bool/eqv.hpp>
661 #include <gecode/int/bool/ite.hpp>
662 
663 #endif
664 
665 // STATISTICS: int-prop
666 
VY y
Single view.
Definition: pattern.hpp:277
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: clause.hpp:287
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: base.hpp:137
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eqv.hpp:87
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: eqv.cpp:49
NaryOr(Home home, ViewArray< VX > &x, VY y)
Constructor for posting.
Definition: or.hpp:736
BoolView b
View for condition.
Definition: bool.hh:583
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:526
virtual void reschedule(Space &home)
Schedule function.
Definition: clause.hpp:327
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Definition: lq.hpp:110
Eqv(Space &home, Eqv &p)
Constructor for cloning p.
Definition: eqv.hpp:43
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: clause.hpp:173
If-then-else bounds-consistent propagator.
Definition: bool.hh:606
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
Definition: eq.hpp:131
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: lq.hpp:53
virtual void reschedule(Space &home)
Schedule function.
Definition: or.hpp:815
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: eqv.hpp:172
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eqv.cpp:81
BVB x1
Boolean view.
Definition: bool.hh:80
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
Definition: eqv.hpp:48
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: ite.hpp:100
V2 x2
Definition: bool.hh:585
Council< Tagged > c
The advisor council.
Definition: bool.hh:513
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:119
ViewArray< VX > x
Array of views.
Definition: pattern.hpp:275
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lq.hpp:174
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Definition: eq.hpp:60
virtual void reschedule(Space &home)
Schedule function.
Definition: base.hpp:129
int pm2
Parity information mod 2.
Definition: bool.hh:460
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: eq.hpp:125
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:198
BVA x0
Boolean view.
Definition: bool.hh:79
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3)
Post propagator .
Definition: or.hpp:330
V0 x0
Views.
Definition: bool.hh:585
BoolBinary(Home home, BVA b0, BVB b1)
Definition: base.hpp:42
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: clause.hpp:53
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: or.hpp:805
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3)
Constructor for posting.
Definition: or.hpp:285
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:227
BVC x2
Boolean view Constructor for posting.
Definition: bool.hh:81
Computation spaces.
Definition: core.hpp:1742
ExecStatus resubscribe(Space &home, BV &x0, BV x1)
Update subscription.
Definition: or.hpp:694
Ternary Boolean disjunction propagator (true)
Definition: bool.hh:264
Base-class for both propagators and branchers.
Definition: core.hpp:628
Council< Advisor > c
The advisor council.
Definition: bool.hh:193
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: eq.hpp:159
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:718
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: base.hpp:67
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: clause.hpp:345
ViewArray< BV > x
Array of views.
Definition: pattern.hpp:145
ViewArray< BoolView > x
Views not yet subscribed to.
Definition: bool.hh:458
Mixed (n+1)-ary propagator.
Definition: pattern.hpp:272
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition: or.hpp:613
int n_zero
The number of views assigned to zero in x.
Definition: bool.hh:189
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: lq.hpp:126
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition: lq.hpp:59
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:337
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:290
ViewArray< VX > x
Positive views.
Definition: bool.hh:495
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: base.hpp:80
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:119
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:314
Boolean view for Boolean variables.
Definition: view.hpp:1380
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:84
Gecode toplevel namespace
Base-class for propagators.
Definition: core.hpp:1064
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq.hpp:76
Mixed binary propagator.
Definition: pattern.hpp:204
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition: ite.hpp:106
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq.hpp:184
Boolean clause propagator (disjunctive, true)
Definition: bool.hh:546
Generic domain change information to be supplied to advisors.
Definition: core.hpp:204
Basic b1(3)
#define GECODE_INT_EXPORT
Definition: int.hh:81
Boolean disjunction propagator.
Definition: bool.hh:328
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:634
If-then-else propagator base-class.
Definition: bool.hh:580
int n_zero
The number of views assigned to zero in x and y.
Definition: bool.hh:501
Home class for posting propagators
Definition: core.hpp:856
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:186
BV x2
Boolean view without subscription.
Definition: bool.hh:269
BoolTernary(Home home, BVA b0, BVB b1, BVC b2)
Definition: base.hpp:94
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: ite.hpp:170
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables)
Definition: bool.hh:554
Basic b2(i)
Boolean n-ary disjunction propagator.
Definition: bool.hh:355
Advisors for views (tagged whether for x or y)
Definition: bool.hh:503
n-ary propagator
Definition: pattern.hpp:142
static ExecStatus post(Home home, BV b0, BV b1, BV b2)
Post propagator .
Definition: or.hpp:220
ViewArray< BV > x
Views not yet subscribed to.
Definition: bool.hh:398
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: ite.hpp:77
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition: or.hpp:103
BV x1
Definition: pattern.hpp:87
ViewArray< VX > x
Views not yet subscribed to.
Definition: bool.hh:552
Boolean equality propagator.
Definition: bool.hh:105
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:687
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1075
Binary Boolean disjunction propagator (true)
Definition: bool.hh:237
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
n-ary Boolean equality propagator
Definition: bool.hh:133
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: clause.hpp:131
Boolean less or equal propagator.
Definition: bool.hh:159
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: lq.hpp:164
int n_one
The number of views assigned to one in x.
Definition: bool.hh:191
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:165
Boolean clause propagator (disjunctive)
Definition: bool.hh:492
static ExecStatus post(Home home, ViewArray< BoolView > &x, int pm2)
Post propagator .
Definition: eqv.cpp:54
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:148
Boolean less propagator.
Definition: bool.hh:223
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
IteBase(Space &home, IteBase &p)
Constructor for cloning p.
Definition: ite.hpp:52
Nary Boolean less or equal propagator.
Definition: bool.hh:183
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition: ite.hpp:176
VX z
Result.
Definition: bool.hh:499
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: clause.hpp:238
Tagged(Space &home, Propagator &p, Council< Tagged > &c, bool x)
Create tagged advisor.
Definition: clause.hpp:193
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: base.hpp:123
Base-class for binary Boolean propagators.
Definition: bool.hh:55
BV x2
Boolean view without subscription.
Definition: bool.hh:300
Base-class for ternary Boolean propagators.
Definition: bool.hh:77
Boolean n-ary disjunction propagator (true)
Definition: bool.hh:393
V1 x1
Definition: bool.hh:585
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition: ite.hpp:62
BV x3
Boolean view without subscription.
Definition: bool.hh:302
Propagation cost.
Definition: core.hpp:486
void cancel(Space &home)
Cancel subscriptions.
Definition: clause.hpp:293
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:828
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: eqv.hpp:81
Council of advisors
Definition: core.hpp:155
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Definition: lq.hpp:43
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition: clause.hpp:106
Gecode::IntSet d(v, 7)
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Definition: eqv.hpp:158
Base-class for advisors.
Definition: core.hpp:1292
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition: eq.hpp:115
BVB x1
Boolean view Constructor for posting.
Definition: bool.hh:58
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:752
Boolean n-ary equivalence propagator.
Definition: bool.hh:453
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator .
Definition: or.hpp:494
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: lq.hpp:158
Council< Advisor > c
The advisor council.
Definition: bool.hh:363
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: clause.hpp:316
IteDom(Space &home, IteDom &p)
Constructor for cloning p.
Definition: ite.hpp:165
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
Definition: lq.hpp:132
Boolean equivalence propagator.
Definition: bool.hh:426
virtual void reschedule(Space &home)
Schedule function.
Definition: base.hpp:73
If-then-else domain-consistent propagator.
Definition: bool.hh:632
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: eqv.cpp:44
Quarternary Boolean disjunction propagator (true)
Definition: bool.hh:295
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition: lq.hpp:228
virtual void reschedule(Space &home)
Schedule function.
Definition: ite.hpp:68
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Definition: eqv.hpp:178
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary)
Definition: ite.hpp:189
Or(Home home, BVA b0, BVB b1, BVC b2)
Constructor for posting.
Definition: or.hpp:461
ClauseTrue(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition: clause.hpp:43
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: eq.hpp:54
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Post propagator .
Definition: clause.hpp:246
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:477
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: clause.hpp:307
IteBnd(Space &home, IteBnd &p)
Constructor for cloning p.
Definition: ite.hpp:95
const bool x
Whether advises a view for x or y.
Definition: bool.hh:506
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:67
Binary propagator.
Definition: pattern.hpp:84
int ModEventDelta
Modification event deltas.
Definition: core.hpp:89
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:621
static ExecStatus post(Home home, BVA b0, BVB b1)
Post propagator .
Definition: or.hpp:125
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:839
BV x0
Two views.
Definition: pattern.hpp:87
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:232
BVA x0
Boolean view.
Definition: bool.hh:57
bool run
Whether the propagator is currently running.
Definition: bool.hh:187
static ExecStatus post(Home home, ViewArray< VX > &x, VY y)
Post propagator .
Definition: or.hpp:769
int n_zero
The number of views assigned to zero in x.
Definition: bool.hh:361
Clause(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Constructor for posting.
Definition: clause.hpp:204
TerOrTrue(Home home, BV b0, BV b1, BV b2)
Constructor for posting.
Definition: or.hpp:181
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition: eq.hpp:38
static ExecStatus post(Home home, ViewArray< BV > &b)
Post propagator .
Definition: or.hpp:663
ExecStatus
Definition: core.hpp:472
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:799
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Definition: or.hpp:208