Generated on Sat Feb 7 2015 02:01:20 for Gecode by doxygen 1.8.9.1
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  * Last modified:
12  * $Date: 2013-04-17 17:17:53 +0200 (Wed, 17 Apr 2013) $ by $Author: schulte $
13  * $Revision: 13580 $
14  *
15  * This file is part of Gecode, the generic constraint
16  * development environment:
17  * http://www.gecode.org
18  *
19  * Permission is hereby granted, free of charge, to any person obtaining
20  * a copy of this software and associated documentation files (the
21  * "Software"), to deal in the Software without restriction, including
22  * without limitation the rights to use, copy, modify, merge, publish,
23  * distribute, sublicense, and/or sell copies of the Software, and to
24  * permit persons to whom the Software is furnished to do so, subject to
25  * the following conditions:
26  *
27  * The above copyright notice and this permission notice shall be
28  * included in all copies or substantial portions of the Software.
29  *
30  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37  *
38  */
39 
40 #ifndef __GECODE_INT_BOOL_HH__
41 #define __GECODE_INT_BOOL_HH__
42 
43 #include <gecode/int.hh>
44 
50 namespace Gecode { namespace Int { namespace Bool {
51 
52  /*
53  * Base Classes
54  *
55  */
56 
58  template<class BVA, class BVB>
59  class BoolBinary : public Propagator {
60  protected:
61  BVA x0;
62  BVB x1;
63  BoolBinary(Home home, BVA b0, BVB b1);
66  BoolBinary(Space& home, bool share, BoolBinary& p);
68  BoolBinary(Space& home, bool share, Propagator& p,
69  BVA b0, BVB b1);
70  public:
72  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
74  virtual size_t dispose(Space& home);
75  };
76 
78  template<class BVA, class BVB, class BVC>
79  class BoolTernary : public Propagator {
80  protected:
81  BVA x0;
82  BVB x1;
83  BVC x2;
84  BoolTernary(Home home, BVA b0, BVB b1, BVC b2);
87  BoolTernary(Space& home, bool share, BoolTernary& p);
88  public:
90  BoolTernary(Space& home, bool share, Propagator& p,
91  BVA b0, BVB b1, BVC b2);
93  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
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, bool share, Eq& p);
113  public:
115  Eq(Space& home, bool share, Propagator& p,
116  BVA b0, BVB b1);
118  virtual Actor* copy(Space& home, bool share);
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, bool share, NaryEq& p);
140  public:
142  virtual Actor* copy(Space& home, bool share);
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, bool share, Lq& p);
167  public:
169  virtual Actor* copy(Space& home, bool share);
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, bool share, NaryLq<VX>& p);
198  public:
200  virtual Actor* copy(Space& home, bool share);
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, bool share, BinOrTrue& p);
245  public:
247  BinOrTrue(Space& home, bool share, Propagator& p,
248  BVA b0, BVB b1);
250  virtual Actor* copy(Space& home, bool share);
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, bool share, TerOrTrue& p);
274  public:
276  TerOrTrue(Space& home, bool share, Propagator& p,
277  BV b0, BV b1, BV b2);
279  virtual Actor* copy(Space& home, bool share);
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, bool share, QuadOrTrue& p);
307  public:
309  QuadOrTrue(Space& home, bool share, Propagator& p,
310  BV b0, BV b1, BV b2, BV b3);
312  virtual Actor* copy(Space& home, bool share);
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, bool share, Or& p);
337  public:
339  Or(Space& home, bool share, Propagator& p, BVA b0, BVB b1, BVC b2);
341  virtual Actor* copy(Space& home, bool share);
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, bool share, NaryOr<VX,VY>& p);
368  public:
370  virtual Actor* copy(Space& home, bool share);
372  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
374  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
376  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
378  static ExecStatus post(Home home, ViewArray<VX>& x, VY y);
380  virtual size_t dispose(Space& home);
381  };
382 
383 
390  template<class BV>
391  class NaryOrTrue : public BinaryPropagator<BV,PC_BOOL_VAL> {
392  protected:
398  ExecStatus resubscribe(Space& home, BV& x0, BV x1);
400  NaryOrTrue(Home home, ViewArray<BV>& x);
402  NaryOrTrue(Space& home, bool share, NaryOrTrue<BV>& p);
403  public:
405  virtual Actor* copy(Space& home, bool share);
407  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
409  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
411  static ExecStatus post(Home home, ViewArray<BV>& b);
413  virtual size_t dispose(Space& home);
414  };
415 
416 
423  template<class BVA, class BVB, class BVC>
424  class Eqv : public BoolTernary<BVA,BVB,BVC> {
425  protected:
430  Eqv(Space& home, bool share, Eqv& p);
432  Eqv(Home home, BVA b0 ,BVB b1, BVC b2);
433  public:
435  virtual Actor* copy(Space& home, bool share);
437  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
439  static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
440  };
441 
442 
451  class NaryEqv : public BinaryPropagator<BoolView,PC_BOOL_VAL> {
452  protected:
458  int pm2;
460  void resubscribe(Space& home, BoolView& x0);
462  NaryEqv(Home home, ViewArray<BoolView>& x, int pm2);
464  NaryEqv(Space& home, bool share, NaryEqv& p);
465  public:
468  virtual Actor* copy(Space& home, bool share);
471  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
474  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
477  static ExecStatus post(Home home, ViewArray<BoolView>& x, int pm2);
479  virtual size_t dispose(Space& home);
480  };
481 
482 
489  template<class VX, class VY>
490  class Clause : public Propagator {
491  protected:
497  VX z;
499  int n_zero;
501  class Tagged : public Advisor {
502  public:
504  const bool x;
506  Tagged(Space& home, Propagator& p, Council<Tagged>& c, bool x);
508  Tagged(Space& home, bool share, Tagged& a);
509  };
513  void cancel(Space& home);
515  Clause(Home home, ViewArray<VX>& x, ViewArray<VY>& y, VX z);
517  Clause(Space& home, bool share, Clause<VX,VY>& p);
518  public:
520  virtual Actor* copy(Space& home, bool share);
522  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
524  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
526  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
528  static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y,
529  VX z);
531  virtual size_t dispose(Space& home);
532  };
533 
534 
541  template<class VX, class VY>
543  : public MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL> {
544  protected:
554  ClauseTrue(Space& home, bool share, ClauseTrue<VX,VY>& p);
555  public:
557  virtual Actor* copy(Space& home, bool share);
559  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
561  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
563  static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
565  virtual size_t dispose(Space& home);
566  };
567 
568 
575  template<class View, PropCond pc>
576  class IteBase : public Propagator {
577  protected:
581  View x0, x1, x2;
583  IteBase(Space& home, bool share, IteBase& p);
585  IteBase(Home home, BoolView b, View x0, View x1, View x2);
586  public:
588  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
590  virtual size_t dispose(Space& home);
591  };
592 
599  template<class View>
600  class IteBnd : public IteBase<View,PC_INT_BND> {
601  protected:
607  IteBnd(Space& home, bool share, IteBnd& p);
609  IteBnd(Home home, BoolView b, View x0, View x1, View x2);
610  public:
612  virtual Actor* copy(Space& home, bool share);
614  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
616  static ExecStatus post(Home home, BoolView b, View x0, View x1, View x2);
617  };
618 
625  template<class View>
626  class IteDom : public IteBase<View,PC_INT_DOM> {
627  protected:
633  IteDom(Space& home, bool share, IteDom& p);
635  IteDom(Home home, BoolView b, View x0, View x1, View x2);
636  public:
638  virtual Actor* copy(Space& home, bool share);
640  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
642  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
644  static ExecStatus post(Home home, BoolView b, View x0, View x1, View x2);
645  };
646 
647 }}}
648 
649 #include <gecode/int/bool/base.hpp>
650 #include <gecode/int/bool/eq.hpp>
651 #include <gecode/int/bool/lq.hpp>
652 #include <gecode/int/bool/or.hpp>
653 #include <gecode/int/bool/eqv.hpp>
655 #include <gecode/int/bool/ite.hpp>
656 
657 #endif
658 
659 // STATISTICS: int-prop
660 
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:169
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: lq.hpp:162
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: clause.hpp:242
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:193
Council of advisors
Definition: core.hpp:226
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:88
If-then-else bounds-consistent propagator.
Definition: bool.hh:600
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
Definition: eq.hpp:135
BVC x2
Boolean view Constructor for posting.
Definition: bool.hh:83
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq.hpp:130
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: ite.hpp:72
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eqv.cpp:85
Boolean clause propagator (disjunctive, true)
Definition: bool.hh:542
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary)
Definition: ite.hpp:184
ViewArray< VY > y
Positive views (origin from negative variables)
Definition: bool.hh:495
static ExecStatus post(Home home, ViewArray< VX > &x)
Post propagator .
Definition: lq.hpp:136
TerOrTrue(Home home, BV b0, BV b1, BV b2)
Constructor for posting.
Definition: or.hpp:185
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: clause.hpp:57
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: eqv.hpp:176
IteDom(Space &home, bool share, IteDom &p)
Constructor for cloning p.
Definition: ite.hpp:160
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:231
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: or.hpp:809
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: ite.hpp:165
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: clause.hpp:291
NaryEqv(Home home, ViewArray< BoolView > &x, int pm2)
Constructor for posting.
Definition: eqv.hpp:162
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: base.hpp:121
Clause(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Constructor for posting.
Definition: clause.hpp:208
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:58
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:294
Mixed (n+1)-ary propagator.
Definition: propagator.hpp:268
ViewArray< BV > x
Array of views.
Definition: propagator.hpp:146
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition: lq.hpp:232
ExecStatus resubscribe(Space &home, BV &x0, BV x1)
Update subscription.
Definition: or.hpp:698
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: eq.hpp:163
Base-class for propagators.
Definition: core.hpp:755
Eqv(Space &home, bool share, Eqv &p)
Constructor for cloning p.
Definition: eqv.hpp:47
Base-class for advisors.
Definition: core.hpp:926
Boolean clause propagator (disjunctive)
Definition: bool.hh:490
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator .
Definition: or.hpp:498
static ExecStatus post(Home home, ViewArray< BoolView > &x, int pm2)
Post propagator .
Definition: eqv.cpp:58
ViewArray< VX > x
Positive views.
Definition: bool.hh:493
IteBase(Space &home, bool share, IteBase &p)
Constructor for cloning p.
Definition: ite.hpp:56
static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3)
Post propagator .
Definition: or.hpp:334
BoolBinary(Home home, BVA b0, BVB b1)
Definition: base.hpp:46
Computation spaces.
Definition: core.hpp:1362
Quarternary Boolean disjunction propagator (true)
Definition: bool.hh:295
Base-class for both propagators and branchers.
Definition: core.hpp:666
Or(Home home, BVA b0, BVB b1, BVC b2)
Constructor for posting.
Definition: or.hpp:465
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:190
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:341
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:722
Gecode::IntSet d(v, 7)
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: ite.hpp:95
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition: or.hpp:617
Ternary Boolean disjunction propagator (true)
Definition: bool.hh:264
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: base.hpp:78
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
If-then-else propagator base-class.
Definition: bool.hh:576
QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3)
Constructor for posting.
Definition: or.hpp:289
BoolTernary(Home home, BVA b0, BVB b1, BVC b2)
Definition: base.hpp:92
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:830
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: clause.hpp:320
n-ary Boolean equality propagator
Definition: bool.hh:133
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Definition: eq.hpp:64
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: eqv.cpp:48
Boolean equivalence propagator.
Definition: bool.hh:424
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Definition: eqv.hpp:182
Binary propagator.
Definition: propagator.hpp:87
Council< Advisor > c
The advisor council.
Definition: bool.hh:363
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eqv.cpp:53
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: clause.hpp:311
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:318
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y, VX z)
Post propagator .
Definition: clause.hpp:250
int n_zero
The number of views assigned to zero in x.
Definition: bool.hh:189
ViewArray< VX > x
Views not yet subscribed to.
Definition: bool.hh:548
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:764
NaryOr(Home home, ViewArray< VX > &x, VY y)
Constructor for posting.
Definition: or.hpp:740
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: clause.hpp:331
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:691
Boolean disjunction propagator.
Definition: bool.hh:328
void cancel(Space &home)
Cancel subscriptions.
Definition: clause.hpp:297
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:530
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: clause.hpp:135
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:819
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq.hpp:57
n-ary propagator
Definition: propagator.hpp:143
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables)
Definition: bool.hh:550
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:638
Council< Tagged > c
The advisor council.
Definition: bool.hh:511
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition: or.hpp:107
Boolean equality propagator.
Definition: bool.hh:105
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:123
Boolean n-ary equivalence propagator.
Definition: bool.hh:451
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:114
int n_zero
The number of views assigned to zero in x and y.
Definition: bool.hh:499
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eqv.hpp:91
int n_one
The number of views assigned to one in x.
Definition: bool.hh:191
static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2)
Post propagator (equivalence)
Definition: eqv.hpp:52
BVB x1
Boolean view.
Definition: bool.hh:82
bool run
Whether the propagator is currently running.
Definition: bool.hh:187
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: base.hpp:72
BV x2
Boolean view without subscription.
Definition: bool.hh:300
Boolean less or equal propagator.
Definition: bool.hh:159
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:625
static ExecStatus post(Home home, BV b0, BV b1, BV b2)
Post propagator .
Definition: or.hpp:224
If-then-else domain-consistent propagator.
Definition: bool.hh:626
Boolean n-ary disjunction propagator (true)
Definition: bool.hh:391
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition: ite.hpp:66
IteBnd(Space &home, bool share, IteBnd &p)
Constructor for cloning p.
Definition: ite.hpp:90
static ExecStatus post(Home home, BoolView b, View x0, View x1, View x2)
Post if-then-else propagator.
Definition: ite.hpp:171
static ExecStatus post(Home home, BVA b0, BVB b1)
Post propagator .
Definition: or.hpp:129
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: base.hpp:127
NaryLq(Home home, ViewArray< VX > &x)
Constructor for posting.
Definition: lq.hpp:114
static ExecStatus post(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Post propagator .
Definition: clause.hpp:110
Boolean less propagator.
Definition: bool.hh:223
Nary Boolean less or equal propagator.
Definition: bool.hh:183
ViewArray< BV > x
Views not yet subscribed to.
Definition: bool.hh:396
BVB x1
Boolean view Constructor for posting.
Definition: bool.hh:62
Generic domain change information to be supplied to advisors.
Definition: core.hpp:275
Mixed binary propagator.
Definition: propagator.hpp:203
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lq.hpp:178
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:803
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition: lq.hpp:63
Propagation cost.
Definition: core.hpp:537
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:129
Boolean n-ary disjunction propagator.
Definition: bool.hh:355
Binary Boolean disjunction propagator (true)
Definition: bool.hh:237
ExecStatus
Definition: core.hpp:523
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq.hpp:188
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: lq.hpp:80
Lq(Home home, BV b0, BV b1)
Constructor for posting.
Definition: lq.hpp:47
Eq(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition: eq.hpp:42
static ExecStatus post(Home home, BoolView b, View x0, View x1, View x2)
Post if-then-else propagator.
Definition: ite.hpp:101
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:152
ViewArray< BoolView > x
Views not yet subscribed to.
Definition: bool.hh:456
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:212
BVA x0
Boolean view.
Definition: bool.hh:81
static ExecStatus post(Home home, ViewArray< BV > &b)
Post propagator .
Definition: or.hpp:667
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: clause.hpp:71
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:481
BV x3
Boolean view without subscription.
Definition: bool.hh:302
static ExecStatus post(Home home, ViewArray< VX > &x, VY y)
Post propagator .
Definition: or.hpp:773
Tagged(Space &home, Propagator &p, Council< Tagged > &c, bool x)
Create tagged advisor.
Definition: clause.hpp:197
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:756
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:193
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
BoolView b
View for condition.
Definition: bool.hh:579
Gecode toplevel namespace
Base-class for ternary Boolean propagators.
Definition: bool.hh:79
BVA x0
Boolean view.
Definition: bool.hh:61
Advisors for views (tagged whether for x or y)
Definition: bool.hh:501
#define GECODE_INT_EXPORT
Definition: int.hh:78
Base-class for binary Boolean propagators.
Definition: bool.hh:59
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: clause.hpp:177
virtual ExecStatus advise(Space &home, Advisor &a, const Delta &d)
Give advice to propagator.
Definition: lq.hpp:168
int ModEventDelta
Modification event deltas.
Definition: core.hpp:173
Home class for posting propagators
Definition: core.hpp:717
int pm2
Parity information mod 2.
Definition: bool.hh:458
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
const bool x
Whether advises a view for x or y.
Definition: bool.hh:504
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eqv.hpp:85
NaryEq(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition: eq.hpp:119
ClauseTrue(Home home, ViewArray< VX > &x, ViewArray< VY > &y)
Constructor for posting.
Definition: clause.hpp:47
Boolean view for Boolean variables.
Definition: view.hpp:1315