Generated on Fri Jul 13 2018 06:08:23 for Gecode by doxygen 1.8.14
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: 2016-06-29 17:28:17 +0200 (Wed, 29 Jun 2016) $ by $Author: schulte $
13  * $Revision: 15137 $
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 void reschedule(Space& home);
76  virtual size_t dispose(Space& home);
77  };
78 
80  template<class BVA, class BVB, class BVC>
81  class BoolTernary : public Propagator {
82  protected:
83  BVA x0;
84  BVB x1;
85  BVC x2;
86  BoolTernary(Home home, BVA b0, BVB b1, BVC b2);
89  BoolTernary(Space& home, bool share, BoolTernary& p);
90  public:
92  BoolTernary(Space& home, bool share, Propagator& p,
93  BVA b0, BVB b1, BVC b2);
95  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
97  virtual void reschedule(Space& home);
99  virtual size_t dispose(Space& home);
100  };
101 
108  template<class BVA, class BVB>
109  class Eq : public BoolBinary<BVA,BVB> {
110  protected:
114  Eq(Home home, BVA b0, BVB b1);
116  Eq(Space& home, bool share, Eq& p);
117  public:
119  Eq(Space& home, bool share, Propagator& p,
120  BVA b0, BVB b1);
122  virtual Actor* copy(Space& home, bool share);
124  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
126  static ExecStatus post(Home home, BVA x0, BVB x1);
127  };
128 
129 
136  template<class BV>
137  class NaryEq : public NaryPropagator<BV,PC_BOOL_VAL> {
138  protected:
141  NaryEq(Home home, ViewArray<BV>& x);
143  NaryEq(Space& home, bool share, NaryEq& p);
144  public:
146  virtual Actor* copy(Space& home, bool share);
148  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
150  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
152  static ExecStatus post(Home home, ViewArray<BV>& x);
153  };
154 
155 
162  template<class BV>
163  class Lq : public BoolBinary<BV,BV> {
164  protected:
165  using BoolBinary<BV,BV>::x0;
166  using BoolBinary<BV,BV>::x1;
168  Lq(Home home, BV b0, BV b1);
170  Lq(Space& home, bool share, Lq& p);
171  public:
173  virtual Actor* copy(Space& home, bool share);
175  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
177  static ExecStatus post(Home home, BV b0, BV b1);
178  };
179 
186  template<class VX>
187  class NaryLq : public NaryPropagator<VX,PC_BOOL_NONE> {
188  protected:
191  bool run;
193  int n_zero;
195  int n_one;
199  NaryLq(Home home, ViewArray<VX>& x);
201  NaryLq(Space& home, bool share, NaryLq<VX>& p);
202  public:
204  virtual Actor* copy(Space& home, bool share);
206  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
208  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
210  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
212  static ExecStatus post(Home home, ViewArray<VX>& x);
214  virtual size_t dispose(Space& home);
215  };
216 
217 
218 
219 
226  template<class BV>
227  class Le {
228  public:
230  static ExecStatus post(Home home, BV b0, BV b1);
231  };
232 
233 
240  template<class BVA, class BVB>
241  class BinOrTrue : public BoolBinary<BVA,BVB> {
242  protected:
246  BinOrTrue(Home home, BVA b0, BVB b1);
248  BinOrTrue(Space& home, bool share, BinOrTrue& p);
249  public:
251  BinOrTrue(Space& home, bool share, Propagator& p,
252  BVA b0, BVB b1);
254  virtual Actor* copy(Space& home, bool share);
256  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
258  static ExecStatus post(Home home, BVA b0, BVB b1);
259  };
260 
267  template<class BV>
268  class TerOrTrue : public BoolBinary<BV,BV> {
269  protected:
270  using BoolBinary<BV,BV>::x0;
271  using BoolBinary<BV,BV>::x1;
273  BV x2;
275  TerOrTrue(Home home, BV b0, BV b1, BV b2);
277  TerOrTrue(Space& home, bool share, TerOrTrue& p);
278  public:
280  TerOrTrue(Space& home, bool share, Propagator& p,
281  BV b0, BV b1, BV b2);
283  virtual Actor* copy(Space& home, bool share);
285  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
287  static ExecStatus post(Home home, BV b0, BV b1, BV b2);
289  virtual size_t dispose(Space& home);
290  };
291 
298  template<class BV>
299  class QuadOrTrue : public BoolBinary<BV,BV> {
300  protected:
301  using BoolBinary<BV,BV>::x0;
302  using BoolBinary<BV,BV>::x1;
304  BV x2;
306  BV x3;
308  QuadOrTrue(Home home, BV b0, BV b1, BV b2, BV b3);
310  QuadOrTrue(Space& home, bool share, QuadOrTrue& p);
311  public:
313  QuadOrTrue(Space& home, bool share, Propagator& p,
314  BV b0, BV b1, BV b2, BV b3);
316  virtual Actor* copy(Space& home, bool share);
318  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
320  static ExecStatus post(Home home, BV b0, BV b1, BV b2, BV b3);
322  virtual size_t dispose(Space& home);
323  };
324 
331  template<class BVA, class BVB, class BVC>
332  class Or : public BoolTernary<BVA,BVB,BVC> {
333  protected:
338  Or(Home home, BVA b0, BVB b1, BVC b2);
340  Or(Space& home, bool share, Or& p);
341  public:
343  Or(Space& home, bool share, Propagator& p, BVA b0, BVB b1, BVC b2);
345  virtual Actor* copy(Space& home, bool share);
347  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
349  static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
350  };
351 
358  template<class VX,class VY>
359  class NaryOr
360  : public MixNaryOnePropagator<VX,PC_BOOL_NONE,VY,PC_BOOL_VAL> {
361  protected:
365  int n_zero;
369  NaryOr(Home home, ViewArray<VX>& x, VY y);
371  NaryOr(Space& home, bool share, NaryOr<VX,VY>& p);
372  public:
374  virtual Actor* copy(Space& home, bool share);
376  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
378  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
380  virtual void reschedule(Space& home);
382  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
384  static ExecStatus post(Home home, ViewArray<VX>& x, VY y);
386  virtual size_t dispose(Space& home);
387  };
388 
389 
396  template<class BV>
397  class NaryOrTrue : public BinaryPropagator<BV,PC_BOOL_VAL> {
398  protected:
404  ExecStatus resubscribe(Space& home, BV& x0, BV x1);
406  NaryOrTrue(Home home, ViewArray<BV>& x);
408  NaryOrTrue(Space& home, bool share, NaryOrTrue<BV>& p);
409  public:
411  virtual Actor* copy(Space& home, bool share);
413  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
415  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
417  static ExecStatus post(Home home, ViewArray<BV>& b);
419  virtual size_t dispose(Space& home);
420  };
421 
422 
429  template<class BVA, class BVB, class BVC>
430  class Eqv : public BoolTernary<BVA,BVB,BVC> {
431  protected:
436  Eqv(Space& home, bool share, Eqv& p);
438  Eqv(Home home, BVA b0 ,BVB b1, BVC b2);
439  public:
441  virtual Actor* copy(Space& home, bool share);
443  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
445  static ExecStatus post(Home home, BVA b0, BVB b1, BVC b2);
446  };
447 
448 
457  class NaryEqv : public BinaryPropagator<BoolView,PC_BOOL_VAL> {
458  protected:
464  int pm2;
466  void resubscribe(Space& home, BoolView& x0);
468  NaryEqv(Home home, ViewArray<BoolView>& x, int pm2);
470  NaryEqv(Space& home, bool share, NaryEqv& p);
471  public:
474  virtual Actor* copy(Space& home, bool share);
477  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
480  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
483  static ExecStatus post(Home home, ViewArray<BoolView>& x, int pm2);
485  virtual size_t dispose(Space& home);
486  };
487 
488 
495  template<class VX, class VY>
496  class Clause : public Propagator {
497  protected:
503  VX z;
505  int n_zero;
507  class Tagged : public Advisor {
508  public:
510  const bool x;
512  Tagged(Space& home, Propagator& p, Council<Tagged>& c, bool x);
514  Tagged(Space& home, bool share, Tagged& a);
515  };
519  void cancel(Space& home);
521  Clause(Home home, ViewArray<VX>& x, ViewArray<VY>& y, VX z);
523  Clause(Space& home, bool share, Clause<VX,VY>& p);
524  public:
526  virtual Actor* copy(Space& home, bool share);
528  virtual ExecStatus advise(Space& home, Advisor& a, const Delta& d);
530  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
532  virtual void reschedule(Space& home);
534  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
537  VX z);
539  virtual size_t dispose(Space& home);
540  };
541 
542 
549  template<class VX, class VY>
551  : public MixBinaryPropagator<VX,PC_BOOL_VAL,VY,PC_BOOL_VAL> {
552  protected:
562  ClauseTrue(Space& home, bool share, ClauseTrue<VX,VY>& p);
563  public:
565  virtual Actor* copy(Space& home, bool share);
567  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
569  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
571  static ExecStatus post(Home home, ViewArray<VX>& x, ViewArray<VY>& y);
573  virtual size_t dispose(Space& home);
574  };
575 
576 
583  template<class V0, class V1, class V2, PropCond pc>
584  class IteBase : public Propagator {
585  protected:
589  V0 x0; V1 x1; V2 x2;
591  IteBase(Space& home, bool share, IteBase& p);
593  IteBase(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
594  public:
596  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
598  virtual void reschedule(Space& home);
600  virtual size_t dispose(Space& home);
601  };
602 
609  template<class V0, class V1, class V2>
610  class IteBnd : public IteBase<V0,V1,V2,PC_INT_BND> {
611  protected:
617  IteBnd(Space& home, bool share, IteBnd& p);
619  IteBnd(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
620  public:
622  virtual Actor* copy(Space& home, bool share);
624  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
626  static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
627  };
628 
635  template<class V0, class V1, class V2>
636  class IteDom : public IteBase<V0,V1,V2,PC_INT_DOM> {
637  protected:
643  IteDom(Space& home, bool share, IteDom& p);
645  IteDom(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
646  public:
648  virtual Actor* copy(Space& home, bool share);
650  virtual PropCost cost(const Space& home, const ModEventDelta& med) const;
652  virtual ExecStatus propagate(Space& home, const ModEventDelta& med);
654  static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2);
655  };
656 
657 }}}
658 
659 #include <gecode/int/bool/base.hpp>
660 #include <gecode/int/bool/eq.hpp>
661 #include <gecode/int/bool/lq.hpp>
662 #include <gecode/int/bool/or.hpp>
663 #include <gecode/int/bool/eqv.hpp>
665 #include <gecode/int/bool/ite.hpp>
666 
667 #endif
668 
669 // STATISTICS: int-prop
670 
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:169
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:365
Council< Advisor > c
The advisor council.
Definition: bool.hh:197
Council of advisors
Definition: core.hpp:232
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eq.hpp:88
If-then-else bounds-consistent propagator.
Definition: bool.hh:610
IteBnd(Space &home, bool share, IteBnd &p)
Constructor for cloning p.
Definition: ite.hpp:100
static ExecStatus post(Home home, ViewArray< BV > &x)
Post propagator .
Definition: eq.hpp:135
BVC x2
Boolean view Constructor for posting.
Definition: bool.hh:85
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq.hpp:130
IteDom(Space &home, bool share, IteDom &p)
Constructor for cloning p.
Definition: ite.hpp:170
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: eqv.cpp:48
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: eqv.cpp:85
Boolean clause propagator (disjunctive, true)
Definition: bool.hh:550
ViewArray< VY > y
Positive views (origin from negative variables)
Definition: bool.hh:501
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 size_t dispose(Space &home)
Delete propagator and return its size.
Definition: eqv.hpp:176
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 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
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: ite.hpp:105
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:58
BV x2
Boolean view without subscription.
Definition: bool.hh:273
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:294
Mixed (n+1)-ary propagator.
Definition: propagator.hpp:282
ViewArray< BV > x
Array of views.
Definition: propagator.hpp:152
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
Base-class for propagators.
Definition: core.hpp:1092
Eqv(Space &home, bool share, Eqv &p)
Constructor for cloning p.
Definition: eqv.hpp:47
Base-class for advisors.
Definition: core.hpp:1294
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: base.hpp:72
Boolean clause propagator (disjunctive)
Definition: bool.hh:496
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:499
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
virtual void reschedule(Space &home)
Schedule function.
Definition: or.hpp:819
Computation spaces.
Definition: core.hpp:1748
Quarternary Boolean disjunction propagator (true)
Definition: bool.hh:299
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition: ite.hpp:181
Base-class for both propagators and branchers.
Definition: core.hpp:696
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 void reschedule(Space &home)
Schedule function.
Definition: ite.hpp:73
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
IteBase(Space &home, bool share, IteBase &p)
Constructor for cloning p.
Definition: ite.hpp:56
Gecode::IntSet d(v, 7)
NaryOrTrue(Home home, ViewArray< BV > &x)
Constructor for posting.
Definition: or.hpp:617
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: clause.hpp:57
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Ternary Boolean disjunction propagator (true)
Definition: bool.hh:268
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: base.hpp:85
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
If-then-else propagator base-class.
Definition: bool.hh:584
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:99
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: or.hpp:843
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:137
static ExecStatus post(Home home, BVA x0, BVB x1)
Post propagator .
Definition: eq.hpp:64
Boolean equivalence propagator.
Definition: bool.hh:430
void resubscribe(Space &home, BoolView &x0)
Update subscription.
Definition: eqv.hpp:182
Binary propagator.
Definition: propagator.hpp:89
Council< Advisor > c
The advisor council.
Definition: bool.hh:367
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:193
virtual void reschedule(Space &home)
Schedule function.
Definition: base.hpp:134
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low binary)
Definition: base.hpp:128
ViewArray< VX > x
Views not yet subscribed to.
Definition: bool.hh:556
ModEventDelta med
A set of modification events (used during propagation)
Definition: core.hpp:1103
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:349
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:691
Boolean disjunction propagator.
Definition: bool.hh:332
void cancel(Space &home)
Cancel subscriptions.
Definition: clause.hpp:297
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
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 PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as high ternary)
Definition: ite.hpp:194
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: or.hpp:832
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: lq.hpp:57
n-ary propagator
Definition: propagator.hpp:149
static ExecStatus post(Home home, BoolView b, V0 x0, V1 x1, V2 x2)
Post if-then-else propagator.
Definition: ite.hpp:111
ViewArray< VY > y
Views not yet subscribed to (origin from negative variables)
Definition: bool.hh:558
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:638
Council< Tagged > c
The advisor council.
Definition: bool.hh:517
BinOrTrue(Home home, BVA b0, BVB b1)
Constructor for posting.
Definition: or.hpp:107
Boolean equality propagator.
Definition: bool.hh:109
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:124
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:123
Boolean n-ary equivalence propagator.
Definition: bool.hh:457
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: eq.hpp:163
int n_zero
The number of views assigned to zero in x and y.
Definition: bool.hh:505
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:195
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:84
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:803
bool run
Whether the propagator is currently running.
Definition: bool.hh:191
BV x2
Boolean view without subscription.
Definition: bool.hh:304
Boolean less or equal propagator.
Definition: bool.hh:163
BoolView b
View for condition.
Definition: bool.hh:587
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:636
Boolean n-ary disjunction propagator (true)
Definition: bool.hh:397
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:142
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:227
Nary Boolean less or equal propagator.
Definition: bool.hh:187
ViewArray< BV > x
Views not yet subscribed to.
Definition: bool.hh:402
BVB x1
Boolean view Constructor for posting.
Definition: bool.hh:62
Generic domain change information to be supplied to advisors.
Definition: core.hpp:281
Mixed binary propagator.
Definition: propagator.hpp:213
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: lq.hpp:178
static ExecStatus post(Home home, BV b0, BV b1)
Post propagator .
Definition: lq.hpp:63
Propagation cost.
Definition: core.hpp:554
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: eq.hpp:129
Boolean n-ary disjunction propagator.
Definition: bool.hh:359
Binary Boolean disjunction propagator (true)
Definition: bool.hh:241
ExecStatus
Definition: core.hpp:540
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
virtual void reschedule(Space &home)
Schedule function.
Definition: base.hpp:78
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:462
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: or.hpp:212
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: lq.hpp:162
BVA x0
Boolean view.
Definition: bool.hh:83
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:306
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
Gecode toplevel namespace
Base-class for ternary Boolean propagators.
Definition: bool.hh:81
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low ternary)
Definition: ite.hpp:67
BVA x0
Boolean view.
Definition: bool.hh:61
Advisors for views (tagged whether for x or y)
Definition: bool.hh:507
#define GECODE_INT_EXPORT
Definition: int.hh:81
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:169
Home class for posting propagators
Definition: core.hpp:922
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Definition: ite.hpp:82
virtual void reschedule(Space &home)
Schedule function.
Definition: clause.hpp:331
int pm2
Parity information mod 2.
Definition: bool.hh:464
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as low unary)
Definition: or.hpp:625
const bool x
Whether advises a view for x or y.
Definition: bool.hh:510
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
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Definition: ite.hpp:203
virtual Actor * copy(Space &home, bool share)
Copy propagator during cloning.
Definition: ite.hpp:175
Boolean view for Boolean variables.
Definition: view.hpp:1315