Generated on Thu Apr 5 2018 19:44:19 for Gecode by doxygen 1.8.13
dom.cpp
Go to the documentation of this file.
1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2 /*
3  * Main authors:
4  * Guido Tack <tack@gecode.org>
5  *
6  * Copyright:
7  * Guido Tack, 2005
8  *
9  * Last modified:
10  * $Date$ by $Author$
11  * $Revision$
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 <gecode/minimodel.hh>
39 
40 #include "test/set.hh"
41 
42 using namespace Gecode;
43 
44 namespace Test { namespace Set {
45 
47  namespace Dom {
48 
54 
55  static const int d1r[4][2] = {
56  {-4,-3},{-1,-1},{1,1},{3,5}
57  };
58  static IntSet d1(d1r,4);
59 
60  static const int d1cr[5][2] = {
62  {-2,-2},{0,0},{2,2},
64  };
65  static IntSet d1c(d1cr,5);
66 
67  static IntSet ds_33(-3,3);
68 
69  static const int d2r[2][2] = {
71  };
72  static IntSet ds_33c(d2r,2);
73 
74  namespace {
75  static int minSymDiff(const SetAssignment& x, int i, const IntSet& is) {
77  CountableSetRanges xr00(x.lub, x[i]);
78  IntSetRanges xr10(is);
79  DiffA a(xr00,xr10);
81  CountableSetRanges xr01(x.lub, x[i]);
82  IntSetRanges xr11(is);
83  DiffB b(xr11,xr01);
85  return u() ? u.min() : Gecode::Set::Limits::max+1;
86  }
87  template<class I>
88  static bool in(int i, I& c, bool eq=false) {
89  if (eq && i==Gecode::Set::Limits::max+1)
90  return true;
92  return Iter::Ranges::subset(s,c);
93  }
94  }
95 
97  class DomRange : public SetTest {
98  private:
100  IntSet is;
101  public:
103  DomRange(SetRelType srt0, int n) :
104  SetTest("Dom::Range::"+str(srt0)+"::"+str(n),n,ds_33,(n == 1)),
105  srt(srt0), is(srt == Gecode::SRT_CMPL ? ds_33c: ds_33) {}
107  virtual bool solution(const SetAssignment& x) const {
108  for (int i=x.size(); i--; ) {
109  CountableSetRanges xr(x.lub, x[i]);
110  IntSetRanges dr(is);
111  switch (srt) {
112  case SRT_EQ:
113  if (!Iter::Ranges::equal(xr, dr))
114  return false;
115  break;
116  case SRT_LQ:
117  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
118  return false;
119  break;
120  case SRT_LE:
121  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
122  return false;
123  break;
124  case SRT_GQ:
125  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
126  return false;
127  break;
128  case SRT_GR:
129  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
130  return false;
131  break;
132  case SRT_NQ:
133  if (Iter::Ranges::equal(xr, dr))
134  return false;
135  break;
136  case SRT_SUB:
137  if (!Iter::Ranges::subset(xr, dr))
138  return false;
139  break;
140  case SRT_SUP:
141  if (!Iter::Ranges::subset(dr, xr))
142  return false;
143  break;
144  case SRT_DISJ:
145  {
147  inter(xr, dr);
148  if (inter())
149  return false;
150  }
151  break;
152  case SRT_CMPL:
153  {
155  if (!Iter::Ranges::equal(xr,drc))
156  return false;
157  }
158  break;
159  }
160  }
161  return true;
162  }
164  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
165  if (x.size() == 1)
166  Gecode::dom(home, x[0], srt, is);
167  else
168  Gecode::dom(home, x, srt, is);
169  }
171  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
172  assert(x.size() == 1);
173  if (Base::rand(2) != 0) {
174  Gecode::dom(home, x[0], srt, is, r);
175  } else {
176  switch (r.mode()) {
177  case Gecode::RM_EQV:
178  Gecode::rel(home, Gecode::dom(x[0], srt, is) == r.var()); break;
179  case Gecode::RM_IMP:
180  Gecode::rel(home, Gecode::dom(x[0], srt, is) << r.var()); break;
181  case Gecode::RM_PMI:
182  Gecode::rel(home, Gecode::dom(x[0], srt, is) >> r.var()); break;
183  default: GECODE_NEVER;
184  }
185  }
186  }
187  };
188 
190  class DomIntRange : public SetTest {
191  private:
192  Gecode::SetRelType srt;
193  public:
196  : SetTest("Dom::IntRange::"+str(srt0)+"::"+str(n),1,ds_33,n==1),
197  srt(srt0) {}
199  virtual bool solution(const SetAssignment& x) const {
200  for (int i=x.size(); i--; ) {
201  CountableSetRanges xr(x.lub, x[i]);
202  IntSet is(-3,-1);
203  IntSetRanges dr(is);
204  switch (srt) {
205  case SRT_EQ:
206  if (!Iter::Ranges::equal(xr, dr))
207  return false;
208  break;
209  case SRT_LQ:
210  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
211  return false;
212  break;
213  case SRT_LE:
214  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
215  return false;
216  break;
217  case SRT_GQ:
218  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
219  return false;
220  break;
221  case SRT_GR:
222  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
223  return false;
224  break;
225  case SRT_NQ:
226  if (!(!Iter::Ranges::equal(xr, dr)))
227  return false;
228  break;
229  case SRT_SUB:
230  if (!(Iter::Ranges::subset(xr, dr)))
231  return false;
232  break;
233  case SRT_SUP:
234  if (!(Iter::Ranges::subset(dr, xr)))
235  return false;
236  break;
237  case SRT_DISJ:
238  {
240  inter(xr, dr);
241  if (inter())
242  return false;
243  }
244  break;
245  case SRT_CMPL:
246  {
248  if (!Iter::Ranges::equal(xr,drc))
249  return false;
250  }
251  break;
252  }
253  }
254  return true;
255  }
257  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
258  if (x.size() == 1)
259  Gecode::dom(home, x[0], srt, -3, -1);
260  else
261  Gecode::dom(home, x, srt, -3, -1);
262  }
264  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
265  assert(x.size() == 1);
266  if (Base::rand(2) != 0) {
267  Gecode::dom(home, x[0], srt, -3, -1, r);
268  } else {
269  switch (r.mode()) {
270  case Gecode::RM_EQV:
271  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) == r.var()); break;
272  case Gecode::RM_IMP:
273  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) << r.var()); break;
274  case Gecode::RM_PMI:
275  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) >> r.var()); break;
276  default: GECODE_NEVER;
277  }
278  }
279  }
280  };
281 
283  class DomInt : public SetTest {
284  private:
285  Gecode::SetRelType srt;
286  public:
289  SetTest("Dom::Int::"+str(srt0)+"::"+str(n),n,ds_33,n==1),
290  srt(srt0) {}
292  virtual bool solution(const SetAssignment& x) const {
293  IntSet is(-3,-3);
294  for (int i=x.size(); i--; ) {
295  CountableSetRanges xr(x.lub, x[i]);
296  IntSetRanges dr(is);
297  switch (srt) {
298  case SRT_EQ:
299  if (!Iter::Ranges::equal(xr, dr))
300  return false;
301  break;
302  case SRT_LQ:
303  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
304  return false;
305  break;
306  case SRT_LE:
307  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
308  return false;
309  break;
310  case SRT_GQ:
311  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
312  return false;
313  break;
314  case SRT_GR:
315  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
316  return false;
317  break;
318  case SRT_NQ:
319  if (Iter::Ranges::equal(xr, dr))
320  return false;
321  break;
322  case SRT_SUB:
323  if (!(Iter::Ranges::subset(xr, dr)))
324  return false;
325  break;
326  case SRT_SUP:
327  if (!(Iter::Ranges::subset(dr, xr)))
328  return false;
329  break;
330  case SRT_DISJ:
331  {
333  inter(xr, dr);
334 
335  if (inter())
336  return false;
337  break;
338  }
339  case SRT_CMPL:
340  {
342 
343  if (!Iter::Ranges::equal(xr,drc))
344  return false;
345  break;
346  }
347  }
348  }
349  return true;
350  }
352  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
353  if (x.size() == 1)
354  Gecode::dom(home, x[0], srt, -3);
355  else
356  Gecode::dom(home, x, srt, -3);
357  }
359  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
360  assert(x.size() == 1);
361  if (Base::rand(2) != 0) {
362  Gecode::dom(home, x[0], srt, -3, r);
363  } else {
364  switch (r.mode()) {
365  case Gecode::RM_EQV:
366  Gecode::rel(home, Gecode::dom(x[0], srt, -3) == r.var()); break;
367  case Gecode::RM_IMP:
368  Gecode::rel(home, Gecode::dom(x[0], srt, -3) << r.var()); break;
369  case Gecode::RM_PMI:
370  Gecode::rel(home, Gecode::dom(x[0], srt, -3) >> r.var()); break;
371  default: GECODE_NEVER;
372  }
373  }
374  }
375  };
376 
378  class DomDom : public SetTest {
379  private:
380  Gecode::SetRelType srt;
381  Gecode::IntSet is;
382  public:
385  SetTest("Dom::Dom::"+str(srt0)+"::"+str(n),n,d1,(n == 1)),
386  srt(srt0), is(srt == Gecode::SRT_CMPL ? d1c: d1) {}
388  virtual bool solution(const SetAssignment& x) const {
389  for (int i=x.size(); i--; ) {
390  CountableSetRanges xr(x.lub, x[i]);
391  IntSetRanges dr(is);
392  switch (srt) {
393  case SRT_EQ:
394  if (!Iter::Ranges::equal(xr, dr))
395  return false;
396  break;
397  case SRT_LQ:
398  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
399  return false;
400  break;
401  case SRT_LE:
402  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
403  return false;
404  break;
405  case SRT_GQ:
406  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
407  return false;
408  break;
409  case SRT_GR:
410  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
411  return false;
412  break;
413  case SRT_NQ:
414  if (Iter::Ranges::equal(xr, dr))
415  return false;
416  break;
417  case SRT_SUB:
418  if (!Iter::Ranges::subset(xr, dr))
419  return false;
420  break;
421  case SRT_SUP:
422  if (!Iter::Ranges::subset(dr, xr))
423  return false;
424  break;
425  case SRT_DISJ:
426  {
428  inter(xr, dr);
429  if (inter())
430  return false;
431  }
432  break;
433  case SRT_CMPL:
434  {
436  if (!Iter::Ranges::equal(xr,drc))
437  return false;
438  }
439  break;
440  }
441  }
442  return true;
443  }
445  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
446  if (x.size() == 1)
447  Gecode::dom(home, x[0], srt, is);
448  else
449  Gecode::dom(home, x, srt, is);
450  }
452  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
453  assert(x.size() == 1);
454  Gecode::dom(home, x[0], srt, is, r);
455  }
456  };
457 
459  class CardRange : public SetTest {
460  public:
463  : SetTest("Dom::CardRange::"+str(n),n,d1,false) {}
465  virtual bool solution(const SetAssignment& x) const {
466  for (int i=x.size(); i--; ) {
467  CountableSetRanges xr(x.lub, x[i]);
468  unsigned int card = Iter::Ranges::size(xr);
469  if ((card < 2) || (card > 3))
470  return false;
471  }
472  return true;
473  }
475  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
476  if (x.size() == 1)
477  Gecode::cardinality(home, x[0], 2, 3);
478  else
479  Gecode::cardinality(home, x, 2, 3);
480  }
481  };
482 
503 
524 
545 
566 
567  CardRange _cr1(1);
568  CardRange _cr2(2);
569 
570 }}}
571 
572 // STATISTICS: test-set
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:359
DomInt _domint_le1(SRT_LE, 1)
DomInt _domint_gq1(SRT_GQ, 1)
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:475
Test for cardinality range
Definition: dom.cpp:459
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:465
DomIntRange _domintrange_lq1(SRT_LQ, 1)
DomIntRange _domintrange_eq2(SRT_EQ, 2)
DomDom _domdom_gq2(SRT_GQ, 2)
DomIntRange _domintrange_sub1(SRT_SUB, 1)
DomDom _domdom_eq2(SRT_EQ, 2)
DomDom _domdom_sub1(SRT_SUB, 1)
SetRelType
Common relation types for sets.
Definition: set.hh:645
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:452
Inverse implication for reification.
Definition: int.hh:848
Range iterator for singleton range.
DomInt _domint_gq2(SRT_GQ, 2)
const int min
Smallest allowed integer in integer set.
Definition: set.hh:103
Range iterator for integer sets.
Definition: int.hh:272
DomInt _domint_eq1(SRT_EQ, 1)
int size(void) const
Return size of array (number of elements)
Definition: array.hpp:973
ReifyMode mode(void) const
Return reification mode.
Definition: reify.hpp:60
DomInt(Gecode::SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:288
DomIntRange(Gecode::SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:195
DomDom _domdom_cmpl1(SRT_CMPL, 1)
DomRange _domrange_sup1(SRT_SUP, 1)
DomInt _domint_disj2(SRT_DISJ, 2)
DomRange _domrange_le1(SRT_LE, 1)
DomIntRange _domintrange_gr2(SRT_GR, 2)
DomDom _domdom_le2(SRT_LE, 2)
Test for equality with an integer range
Definition: dom.cpp:190
DomDom _domdom_sub2(SRT_SUB, 2)
CardRange _cr2(2)
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition: dom.cpp:44
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
DomInt _domint_lq1(SRT_LQ, 1)
DomRange _domrange_disj2(SRT_DISJ, 2)
Integer variable array.
Definition: int.hh:742
DomDom _domdom_gr1(SRT_GR, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:199
DomIntRange _domintrange_gr1(SRT_GR, 1)
Superset ( )
Definition: set.hh:649
Complement.
Definition: set.hh:651
DomInt _domint_gr1(SRT_GR, 1)
const unsigned int card
Maximum cardinality of an integer set.
Definition: set.hh:105
const int max
Largest allowed integer in integer set.
Definition: set.hh:101
DomDom _domdom_sup2(SRT_SUP, 2)
Computation spaces.
Definition: core.hpp:1668
DomRange _domrange_cmpl2(SRT_CMPL, 2)
CardRange _cr1(1)
DomIntRange _domintrange_sup2(SRT_SUP, 2)
DomDom _domdom_lq1(SRT_LQ, 1)
Gecode::IntArgs i(4, 1, 2, 3, 4)
DomInt _domint_eq2(SRT_EQ, 2)
DomDom _domdom_disj1(SRT_DISJ, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:107
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
DomDom _domdom_nq2(SRT_NQ, 2)
DomDom _domdom_disj2(SRT_DISJ, 2)
DomDom(Gecode::SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:384
DomIntRange _domintrange_cmpl1(SRT_CMPL, 1)
DomRange(SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:103
DomIntRange _domintrange_eq1(SRT_EQ, 1)
DomRange _domrange_gq2(SRT_GQ, 2)
Range iterator for computing intersection (binary)
DomRange _domrange_eq1(SRT_EQ, 1)
Less or equal ( )
Definition: set.hh:652
DomIntRange _domintrange_gq1(SRT_GQ, 1)
DomRange _domrange_nq2(SRT_NQ, 2)
DomDom _domdom_cmpl2(SRT_CMPL, 2)
DomRange _domrange_gr1(SRT_GR, 1)
DomIntRange _domintrange_lq2(SRT_LQ, 2)
A complement iterator spezialized for the BndSet limits.
Definition: var-imp.hpp:296
DomDom _domdom_sup1(SRT_SUP, 1)
DomIntRange _domintrange_disj2(SRT_DISJ, 2)
DomRange _domrange_le2(SRT_LE, 2)
DomRange _domrange_disj1(SRT_DISJ, 1)
unsigned int size(I &i)
Size of all ranges of range iterator i.
Reification specification.
Definition: int.hh:855
Create c
Definition: dom.cpp:145
Subset ( )
Definition: set.hh:648
DomRange _domrange_sup2(SRT_SUP, 2)
Gecode::IntSet lub
The common superset for all domains.
Definition: set.hh:158
DomIntRange _domintrange_cmpl2(SRT_CMPL, 2)
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
Integer sets.
Definition: int.hh:174
DomRange _domrange_nq1(SRT_NQ, 1)
Less ( )
Definition: set.hh:653
DomDom _domdom_nq1(SRT_NQ, 1)
DomIntRange _domintrange_nq1(SRT_NQ, 1)
DomRange _domrange_sub2(SRT_SUB, 2)
DomRange _domrange_gq1(SRT_GQ, 1)
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:171
DomInt _domint_cmpl2(SRT_CMPL, 2)
DomDom _domdom_eq1(SRT_EQ, 1)
Range iterator for computing union (binary)
DomDom _domdom_lq2(SRT_LQ, 2)
DomIntRange _domintrange_le2(SRT_LE, 2)
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:264
LinIntExpr cardinality(const SetExpr &e)
Cardinality of set expression.
Definition: set-expr.cpp:818
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:769
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
Definition: set-expr.cpp:699
General test support.
Definition: afc.cpp:43
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:352
DomInt _domint_sup1(SRT_SUP, 1)
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
DomIntRange _domintrange_gq2(SRT_GQ, 2)
Greater or equal ( )
Definition: set.hh:654
DomInt _domint_sub1(SRT_SUB, 1)
DomRange _domrange_gr2(SRT_GR, 2)
DomInt _domint_gr2(SRT_GR, 2)
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
DomRange _domrange_lq2(SRT_LQ, 2)
DomInt _domint_nq2(SRT_NQ, 2)
Base class for tests with set constraints
Definition: set.hh:277
DomRange _domrange_lq1(SRT_LQ, 1)
Generate all set assignments.
Definition: set.hh:146
DomDom _domdom_gr2(SRT_GR, 2)
DomInt _domint_le2(SRT_LE, 2)
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:164
DomRange _domrange_cmpl1(SRT_CMPL, 1)
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:257
DomDom _domdom_le1(SRT_LE, 1)
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:47
Test for equality with an integer
Definition: dom.cpp:283
BoolVar var(void) const
Return Boolean control variable.
Definition: reify.hpp:52
Range iterator producing subsets of an IntSet.
Definition: set.hh:102
Greater ( )
Definition: set.hh:655
Equality ( )
Definition: set.hh:646
Disjoint ( )
Definition: set.hh:650
Test for equality with a range
Definition: dom.cpp:97
Post propagator for SetVar x
Definition: set.hh:769
DomRange _domrange_sub1(SRT_SUB, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:292
DomIntRange _domintrange_le1(SRT_LE, 1)
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:445
Set variable array
Definition: set.hh:572
Test for equality with a domain
Definition: dom.cpp:378
DomInt _domint_lq2(SRT_LQ, 2)
Disequality ( )
Definition: set.hh:647
Gecode toplevel namespace
Implication for reification.
Definition: int.hh:841
DomRange _domrange_eq2(SRT_EQ, 2)
int size(void) const
Return arity.
Definition: set.hh:177
Range iterator for computing set difference.
Definition: ranges-diff.hpp:47
int min(void) const
Return smallest value of range.
DomDom _domdom_gq1(SRT_GQ, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:388
DomInt _domint_disj1(SRT_DISJ, 1)
#define GECODE_NEVER
Assert that this command is never executed.
Definition: macros.hpp:60
DomInt _domint_sub2(SRT_SUB, 2)
DomInt _domint_nq1(SRT_NQ, 1)
DomIntRange _domintrange_sup1(SRT_SUP, 1)
DomInt _domint_cmpl1(SRT_CMPL, 1)
DomIntRange _domintrange_sub2(SRT_SUB, 2)
Equivalence for reification (default)
Definition: int.hh:834
DomIntRange _domintrange_nq2(SRT_NQ, 2)
CardRange(int n)
Create and register test.
Definition: dom.cpp:462
DomInt _domint_sup2(SRT_SUP, 2)
DomIntRange _domintrange_disj1(SRT_DISJ, 1)