Generated on Sat Feb 7 2015 02:01:20 for Gecode by doxygen 1.8.9.1
bool.cpp
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  *
6  * Copyright:
7  * Christian Schulte, 2005
8  *
9  * Last modified:
10  * $Date: 2013-04-17 17:43:48 +0200 (Wed, 17 Apr 2013) $ by $Author: schulte $
11  * $Revision: 13581 $
12  *
13  * This file is part of Gecode, the generic constraint
14  * development environment:
15  * http://www.gecode.org
16  *
17  * Permission is hereby granted, free of charge, to any person obtaining
18  * a copy of this software and associated documentation files (the
19  * "Software"), to deal in the Software without restriction, including
20  * without limitation the rights to use, copy, modify, merge, publish,
21  * distribute, sublicense, and/or sell copies of the Software, and to
22  * permit persons to whom the Software is furnished to do so, subject to
23  * the following conditions:
24  *
25  * The above copyright notice and this permission notice shall be
26  * included in all copies or substantial portions of the Software.
27  *
28  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
29  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
30  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
31  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
32  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
33  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
34  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
35  *
36  */
37 
38 #include "test/int.hh"
39 
40 #include <gecode/minimodel.hh>
41 
42 namespace Test { namespace Int {
43 
45  namespace Bool {
46 
47  inline int
48  check(int x0, Gecode::BoolOpType op, int x1) {
49  switch (op) {
50  case Gecode::BOT_AND: return x0 & x1;
51  case Gecode::BOT_OR: return x0 | x1;
52  case Gecode::BOT_IMP: return !x0 | x1;
53  case Gecode::BOT_EQV: return x0 == x1;
54  case Gecode::BOT_XOR: return x0 != x1;
55  default: GECODE_NEVER;
56  }
58  return 0;
59  }
60 
66  class BinXYZ : public Test {
68  protected:
71  public:
74  : Test("Bool::Bin::XYZ::"+str(op0),3,0,1), op(op0) {}
76  virtual bool solution(const Assignment& x) const {
77  return check(x[0],op,x[1]) == x[2];
78  }
80  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
81  using namespace Gecode;
82  rel(home,
83  channel(home,x[0]), op, channel(home,x[1]),
84  channel(home,x[2]));
85  }
86  };
87 
89  class BinXXY : public Test {
90  protected:
93  public:
96  : Test("Bool::Bin::XXY::"+str(op0),2,0,1), op(op0) {}
98  virtual bool solution(const Assignment& x) const {
99  return check(x[0],op,x[0]) == x[1];
100  }
102  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
103  using namespace Gecode;
104  BoolVar b = channel(home,x[0]);
105  rel(home, b, op, b, channel(home,x[1]));
106  }
107  };
108 
110  class BinXYX : public Test {
111  protected:
114  public:
117  : Test("Bool::Bin::XYX::"+str(op0),2,0,1), op(op0) {}
119  virtual bool solution(const Assignment& x) const {
120  return check(x[0],op,x[1]) == x[0];
121  }
123  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
124  using namespace Gecode;
125  BoolVar b = channel(home,x[0]);
126  rel(home, b, op, channel(home,x[1]), b);
127  }
128  };
129 
131  class BinXYY : public Test {
132  protected:
135  public:
138  : Test("Bool::Bin::XYY::"+str(op0),2,0,1), op(op0) {}
140  virtual bool solution(const Assignment& x) const {
141  return check(x[0],op,x[1]) == x[1];
142  }
144  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
145  using namespace Gecode;
146  BoolVar b = channel(home,x[1]);
147  rel(home, channel(home,x[0]), op, b, b);
148  }
149  };
150 
152  class BinXXX : public Test {
153  protected:
156  public:
159  : Test("Bool::Bin::XXX::"+str(op0),1,0,1), op(op0) {}
161  virtual bool solution(const Assignment& x) const {
162  return check(x[0],op,x[0]) == x[0];
163  }
165  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
166  using namespace Gecode;
167  BoolVar b = channel(home,x[0]);
168  rel(home, b, op, b, b);
169  }
170  };
171 
173  class BinConstXY : public Test {
174  protected:
178  int c;
179  public:
182  : Test("Bool::Bin::XY::"+str(op0)+"::"+str(c0),2,0,1),
183  op(op0), c(c0) {}
185  virtual bool solution(const Assignment& x) const {
186  return check(x[0],op,x[1]) == c;
187  }
189  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
190  using namespace Gecode;
191  rel(home, channel(home,x[0]), op, channel(home,x[1]), c);
192  }
193  };
194 
196  class BinConstXX : public Test {
197  protected:
201  int c;
202  public:
205  : Test("Bool::Bin::XX::"+str(op0)+"::"+str(c0),1,0,1),
206  op(op0), c(c0) {}
208  virtual bool solution(const Assignment& x) const {
209  return check(x[0],op,x[0]) == c;
210  }
212  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
213  using namespace Gecode;
214  BoolVar b = channel(home,x[0]);
215  rel(home, b, op, b, c);
216  }
217  };
218 
220  class Nary : public Test {
221  protected:
224  public:
227  : Test("Bool::Nary::"+str(op0)+"::"+str(n),n+1,0,1), op(op0) {}
229  virtual bool solution(const Assignment& x) const {
230  int n = x.size()-1;
231  int b = check(x[n-2],op,x[n-1]);
232  for (int i=0; i<n-2; i++)
233  b = check(x[i],op,b);
234  return b == x[n];
235  }
237  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
238  using namespace Gecode;
239  BoolVarArgs b(x.size()-1);
240  for (int i=x.size()-1; i--; )
241  b[i]=channel(home,x[i]);
242  rel(home, op, b, channel(home,x[x.size()-1]));
243  }
244  };
245 
247  class NaryShared : public Test {
248  protected:
251  public:
254  : Test("Bool::Nary::Shared::"+str(op0)+"::"+str(n),n,0,1),
255  op(op0) {
256  if ((op == Gecode::BOT_EQV) || (op == Gecode::BOT_XOR))
257  testfix = false;
258  }
260  virtual bool solution(const Assignment& x) const {
261  int n = x.size();
262  int b = check(x[n-2],op,x[n-1]);
263  for (int i=0; i<n-2; i++)
264  b = check(x[i],op,b);
265  return b == x[n-1];
266  }
268  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
269  using namespace Gecode;
270  BoolVarArgs b(x.size());
271  for (int i=x.size(); i--; )
272  b[i]=channel(home,x[i]);
273  rel(home, op, b, b[x.size()-1]);
274  }
275  };
276 
278  class NaryConst : public Test {
279  protected:
283  int c;
284  public:
286  NaryConst(Gecode::BoolOpType op0, int n, int c0)
287  : Test("Bool::Nary::"+str(op0)+"::"+str(n)+"::"+str(c0),n,0,1),
288  op(op0), c(c0) {}
290  virtual bool solution(const Assignment& x) const {
291  int n = x.size();
292  int b = check(x[n-2],op,x[n-1]);
293  for (int i=0; i<n-2; i++)
294  b = check(x[i],op,b);
295  return b == c;
296  }
298  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
299  using namespace Gecode;
300  BoolVarArgs b(x.size());
301  for (int i=x.size(); i--; )
302  b[i]=channel(home,x[i]);
303  rel(home, op, b, c);
304  }
305  };
306 
307 
309  class ClauseXYZ : public Test {
310  protected:
313  public:
316  : Test("Bool::Clause::XYZ::"+str(op0)+"::"+str(n),n+1,0,1), op(op0) {}
318  virtual bool solution(const Assignment& x) const {
319  int n = (x.size()-1) / 2;
320  int b;
321  if (n == 1) {
322  b = check(x[0],op,!x[1]);
323  } else {
324  b = check(x[0],op,!x[n]);
325  for (int i=1; i<n; i++)
326  b = check(b,op,check(x[i],op,!x[n+i]));
327  }
328  return b == x[x.size()-1];
329  }
331  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
332  using namespace Gecode;
333  int n = (x.size()-1) / 2;
334  BoolVarArgs a(n), b(n);
335  for (int i=n; i--; ) {
336  a[i]=channel(home,x[i]);
337  b[i]=channel(home,x[i+n]);
338  }
339  clause(home, op, a, b, channel(home,x[x.size()-1]));
340  }
341  };
342 
344  class ClauseXXYYX : public Test {
345  protected:
348  public:
351  : Test("Bool::Clause::XXYYX::"+str(op0)+"::"+str(n),n,0,1),
352  op(op0) {}
354  virtual bool solution(const Assignment& x) const {
355  int n = x.size() / 2;
356  int b;
357  if (n == 1) {
358  b = check(x[0],op,!x[1]);
359  } else {
360  b = check(x[0],op,!x[n]);
361  for (int i=1; i<n; i++)
362  b = check(b,op,check(x[i],op,!x[n+i]));
363  }
364  return b == x[0];
365  }
367  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
368  using namespace Gecode;
369  int n = x.size() / 2;
370  BoolVarArgs a(2*n), b(2*n);
371  for (int i=n; i--; ) {
372  a[i]=a[i+n]=channel(home,x[i]);
373  b[i]=b[i+n]=channel(home,x[i+n]);
374  }
375  clause(home, op, a, b, a[0]);
376  }
377  };
378 
380  class ClauseXXY : public Test {
381  protected:
384  public:
387  : Test("Bool::Clause::XXY::"+str(op0)+"::"+str(n),n,0,1),
388  op(op0) {}
390  virtual bool solution(const Assignment& x) const {
391  return (x[0] == 1) == (op == Gecode::BOT_OR);
392  }
394  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
395  using namespace Gecode;
396  int n = x.size() / 2;
397  BoolVarArgs a(2*n), b(2*n);
398  for (int i=n; i--; ) {
399  a[i]=b[i+n]=channel(home,x[i]);
400  b[i]=a[i+n]=channel(home,x[i+n]);
401  }
402  clause(home, op, a, b, a[0]);
403  }
404  };
405 
407  class ClauseConst : public Test {
408  protected:
412  int c;
413  public:
415  ClauseConst(Gecode::BoolOpType op0, int n, int c0)
416  : Test("Bool::Clause::"+str(op0)+"::"+str(n)+"::"+str(c0),n,0,1),
417  op(op0), c(c0) {}
419  virtual bool solution(const Assignment& x) const {
420  int n = x.size() / 2;
421  int b;
422  if (n == 1) {
423  b = check(x[0],op,!x[1]);
424  } else {
425  b = check(x[0],op,!x[n]);
426  for (int i=1; i<n; i++)
427  b = check(b,op,check(x[i],op,!x[n+i]));
428  }
429  return b == c;
430  }
432  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
433  using namespace Gecode;
434  int n = x.size() / 2;
435  BoolVarArgs a(n), b(n);
436  for (int i=n; i--; ) {
437  a[i]=channel(home,x[i]);
438  b[i]=channel(home,x[i+n]);
439  }
440  clause(home, op, a, b, c);
441  }
442  };
443 
445  class ITE : public Test {
446  public:
449  : Test("ITE::"+str(icl),4,-4,4,false,icl) {}
451  virtual bool solution(const Assignment& x) const {
452  if ((x[0] < 0) || (x[0] > 1))
453  return false;
454  if (x[0] == 1)
455  return x[1] == x[3];
456  else
457  return x[2] == x[3];
458  }
460  virtual void post(Gecode::Space& home, Gecode::IntVarArray& x) {
461  using namespace Gecode;
462  if (Base::rand(2) != 0)
463  ite(home,channel(home,x[0]),x[1],x[2],x[3]);
464  else
465  rel(home, ite(channel(home,x[0]),x[1],x[2]) == x[3]);
466  }
467  };
468 
470  class Create {
471  public:
473  Create(void) {
474  using namespace Gecode;
475  for (BoolOpTypes bots; bots(); ++bots) {
476  (void) new BinXYZ(bots.bot());
477  (void) new BinXXY(bots.bot());
478  (void) new BinXYX(bots.bot());
479  (void) new BinXYY(bots.bot());
480  (void) new BinXXX(bots.bot());
481  (void) new BinConstXY(bots.bot(),0);
482  (void) new BinConstXY(bots.bot(),1);
483  (void) new BinConstXX(bots.bot(),0);
484  (void) new BinConstXX(bots.bot(),1);
485  (void) new Nary(bots.bot(),2);
486  (void) new Nary(bots.bot(),6);
487  (void) new Nary(bots.bot(),10);
488  (void) new NaryShared(bots.bot(),2);
489  (void) new NaryShared(bots.bot(),6);
490  (void) new NaryShared(bots.bot(),10);
491  (void) new NaryConst(bots.bot(),2,0);
492  (void) new NaryConst(bots.bot(),6,0);
493  (void) new NaryConst(bots.bot(),10,0);
494  (void) new NaryConst(bots.bot(),2,1);
495  (void) new NaryConst(bots.bot(),6,1);
496  (void) new NaryConst(bots.bot(),10,1);
497  if ((bots.bot() == BOT_AND) || (bots.bot() == BOT_OR)) {
498  (void) new ClauseXYZ(bots.bot(),2);
499  (void) new ClauseXYZ(bots.bot(),6);
500  (void) new ClauseXYZ(bots.bot(),10);
501  (void) new ClauseXXYYX(bots.bot(),2);
502  (void) new ClauseXXYYX(bots.bot(),6);
503  (void) new ClauseXXYYX(bots.bot(),10);
504  (void) new ClauseXXY(bots.bot(),2);
505  (void) new ClauseXXY(bots.bot(),6);
506  (void) new ClauseXXY(bots.bot(),10);
507  (void) new ClauseConst(bots.bot(),2,0);
508  (void) new ClauseConst(bots.bot(),6,0);
509  (void) new ClauseConst(bots.bot(),10,0);
510  (void) new ClauseConst(bots.bot(),2,1);
511  (void) new ClauseConst(bots.bot(),6,1);
512  (void) new ClauseConst(bots.bot(),10,1);
513  }
514  }
515  }
516  };
517 
521 
523 
524  }
525 }}
526 
527 // STATISTICS: test-int
528 
BinConstXY(Gecode::BoolOpType op0, int c0)
Construct and register test.
Definition: bool.cpp:181
Test for Clause Boolean operation
Definition: bool.cpp:380
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:80
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:223
int check(int x0, Gecode::BoolOpType op, int x1)
Definition: bool.cpp:48
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:165
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:410
IntConLevel
Consistency levels for integer propagators.
Definition: int.hh:937
BinConstXX(Gecode::BoolOpType op0, int c0)
Construct and register test.
Definition: bool.cpp:204
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition: arithmetic.cpp:218
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:208
Test for binary Boolean operation with shared variables
Definition: bool.cpp:89
Test for binary Boolean operation with shared variables
Definition: bool.cpp:110
static Gecode::Support::RandomGenerator rand
Random number generator.
Definition: test.hh:138
Test for Nary Boolean operation with constant
Definition: bool.cpp:278
BoolOpType
Operation types for Booleans.
Definition: int.hh:916
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:318
Nary(Gecode::BoolOpType op0, int n)
Construct and register test.
Definition: bool.cpp:226
BinXYX(Gecode::BoolOpType op0)
Construct and register test.
Definition: bool.cpp:116
Test for Clause Boolean operation
Definition: bool.cpp:344
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:229
Conjunction.
Definition: int.hh:917
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:140
Test for binary Boolean operation with constant
Definition: bool.cpp:173
int c
Integer constant.
Definition: bool.cpp:178
Test for Nary Boolean operation
Definition: bool.cpp:220
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:98
Implication.
Definition: int.hh:919
Create(void)
Perform creation and registration.
Definition: bool.cpp:473
Integer variable array.
Definition: int.hh:741
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:176
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:237
NaryShared(Gecode::BoolOpType op0, int n)
Construct and register test.
Definition: bool.cpp:253
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:119
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:290
Computation spaces.
Definition: core.hpp:1362
Exclusive or.
Definition: int.hh:921
NaryConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
Definition: bool.cpp:286
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:212
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:199
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, BoolVar z, IntConLevel)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
Definition: bool.cpp:875
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:123
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
Definition: int.hpp:212
ITE(Gecode::IntConLevel icl)
Construct and register test.
Definition: bool.cpp:448
ITE itebnd(Gecode::ICL_BND)
ClauseConst(Gecode::BoolOpType op0, int n, int c0)
Construct and register test.
Definition: bool.cpp:415
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:76
Gecode::IntConLevel icl
Consistency level.
Definition: int.hh:226
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:451
Test for binary Boolean operation with shared variables
Definition: bool.cpp:131
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:134
BinXYZ(Gecode::BoolOpType op0)
Construct and register test.
Definition: bool.cpp:73
Test for if-the-else-constraint
Definition: bool.cpp:445
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:260
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:383
int c
Integer constant.
Definition: bool.cpp:412
BinXYY(Gecode::BoolOpType op0)
Construct and register test.
Definition: bool.cpp:137
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:144
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:161
int c
Integer constant.
Definition: bool.cpp:283
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:394
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:331
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:367
Test for Nary Boolean operation
Definition: bool.cpp:247
Disjunction.
Definition: int.hh:918
ITE itedom(Gecode::ICL_DOM)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:298
void ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z, IntConLevel icl)
Post propagator for if-then-else constraint.
Definition: bool.cpp:911
Passing Boolean variables.
Definition: int.hh:690
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:155
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:92
Boolean integer variables.
Definition: int.hh:491
bool testfix
Whether to perform fixpoint test.
Definition: int.hh:232
General test support.
Definition: afc.cpp:43
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:347
BinXXY(Gecode::BoolOpType op0)
Construct and register test.
Definition: bool.cpp:95
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:432
Test for Clause Boolean operation
Definition: bool.cpp:309
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
ClauseXYZ(Gecode::BoolOpType op0, int n)
Construct and register test.
Definition: bool.cpp:315
Base class for assignments
Definition: int.hh:63
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:419
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:460
Test for Clause Boolean operation with constant
Definition: bool.cpp:407
Equivalence.
Definition: int.hh:920
Help class to create and register tests.
Definition: bool.cpp:470
Test for binary Boolean operation with shared variables
Definition: bool.cpp:152
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:113
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:268
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:102
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:185
BinXXX(Gecode::BoolOpType op0)
Construct and register test.
Definition: bool.cpp:158
Bounds propagation or consistency.
Definition: int.hh:939
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:354
Test for binary Boolean operation with shared variables and constant
Definition: bool.cpp:196
Iterator for Boolean operation types.
Definition: int.hh:362
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Definition: bool.cpp:390
ClauseXXY(Gecode::BoolOpType op0, int n)
Construct and register test.
Definition: bool.cpp:386
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post constraint.
Definition: bool.cpp:189
ClauseXXYYX(Gecode::BoolOpType op0, int n)
Construct and register test.
Definition: bool.cpp:350
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:312
void rel(Home home, BoolOpType o, const BoolVarArgs &x, int n, IntConLevel)
Post domain consistent propagator for Boolean operation on x.
Definition: bool.cpp:755
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:70
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:281
int size(void) const
Return size of array (number of elements)
Definition: array.hpp:985
int c
Integer constant.
Definition: bool.cpp:201
#define GECODE_NEVER
Assert that this command is never executed.
Definition: macros.hpp:60
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
int size(void) const
Return number of variables.
Definition: int.hpp:50
Gecode::BoolOpType op
Boolean operation type for test.
Definition: bool.cpp:250
Create c
Definition: bool.cpp:518
Domain propagation or consistency.
Definition: int.hh:940