Generated on Sat Jun 2 2018 07:17:44 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  * This file is part of Gecode, the generic constraint
10  * development environment:
11  * http://www.gecode.org
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining
14  * a copy of this software and associated documentation files (the
15  * "Software"), to deal in the Software without restriction, including
16  * without limitation the rights to use, copy, modify, merge, publish,
17  * distribute, sublicense, and/or sell copies of the Software, and to
18  * permit persons to whom the Software is furnished to do so, subject to
19  * the following conditions:
20  *
21  * The above copyright notice and this permission notice shall be
22  * included in all copies or substantial portions of the Software.
23  *
24  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
25  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
26  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
27  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
28  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
29  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
30  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31  *
32  */
33 
34 #include <gecode/minimodel.hh>
35 
36 #include "test/set.hh"
37 
38 using namespace Gecode;
39 
40 namespace Test { namespace Set {
41 
43  namespace Dom {
44 
50 
51  static const int d1r[4][2] = {
52  {-4,-3},{-1,-1},{1,1},{3,5}
53  };
54  static IntSet d1(d1r,4);
55 
56  static const int d1cr[5][2] = {
58  {-2,-2},{0,0},{2,2},
60  };
61  static IntSet d1c(d1cr,5);
62 
63  static IntSet ds_33(-3,3);
64 
65  static const int d2r[2][2] = {
67  };
68  static IntSet ds_33c(d2r,2);
69 
70  namespace {
71  static int minSymDiff(const SetAssignment& x, int i, const IntSet& is) {
73  CountableSetRanges xr00(x.lub, x[i]);
74  IntSetRanges xr10(is);
75  DiffA a(xr00,xr10);
77  CountableSetRanges xr01(x.lub, x[i]);
78  IntSetRanges xr11(is);
79  DiffB b(xr11,xr01);
81  return u() ? u.min() : Gecode::Set::Limits::max+1;
82  }
83  template<class I>
84  static bool in(int i, I& c, bool eq=false) {
85  if (eq && i==Gecode::Set::Limits::max+1)
86  return true;
88  return Iter::Ranges::subset(s,c);
89  }
90  }
91 
93  class DomRange : public SetTest {
94  private:
96  IntSet is;
97  public:
99  DomRange(SetRelType srt0, int n) :
100  SetTest("Dom::Range::"+str(srt0)+"::"+str(n),n,ds_33,(n == 1)),
101  srt(srt0), is(srt == Gecode::SRT_CMPL ? ds_33c: ds_33) {}
103  virtual bool solution(const SetAssignment& x) const {
104  for (int i=x.size(); i--; ) {
105  CountableSetRanges xr(x.lub, x[i]);
106  IntSetRanges dr(is);
107  switch (srt) {
108  case SRT_EQ:
109  if (!Iter::Ranges::equal(xr, dr))
110  return false;
111  break;
112  case SRT_LQ:
113  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
114  return false;
115  break;
116  case SRT_LE:
117  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
118  return false;
119  break;
120  case SRT_GQ:
121  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
122  return false;
123  break;
124  case SRT_GR:
125  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
126  return false;
127  break;
128  case SRT_NQ:
129  if (Iter::Ranges::equal(xr, dr))
130  return false;
131  break;
132  case SRT_SUB:
133  if (!Iter::Ranges::subset(xr, dr))
134  return false;
135  break;
136  case SRT_SUP:
137  if (!Iter::Ranges::subset(dr, xr))
138  return false;
139  break;
140  case SRT_DISJ:
141  {
143  inter(xr, dr);
144  if (inter())
145  return false;
146  }
147  break;
148  case SRT_CMPL:
149  {
151  if (!Iter::Ranges::equal(xr,drc))
152  return false;
153  }
154  break;
155  }
156  }
157  return true;
158  }
160  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
161  if (x.size() == 1)
162  Gecode::dom(home, x[0], srt, is);
163  else
164  Gecode::dom(home, x, srt, is);
165  }
167  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
168  assert(x.size() == 1);
169  if (Base::rand(2) != 0) {
170  Gecode::dom(home, x[0], srt, is, r);
171  } else {
172  switch (r.mode()) {
173  case Gecode::RM_EQV:
174  Gecode::rel(home, Gecode::dom(x[0], srt, is) == r.var()); break;
175  case Gecode::RM_IMP:
176  Gecode::rel(home, Gecode::dom(x[0], srt, is) << r.var()); break;
177  case Gecode::RM_PMI:
178  Gecode::rel(home, Gecode::dom(x[0], srt, is) >> r.var()); break;
179  default: GECODE_NEVER;
180  }
181  }
182  }
183  };
184 
186  class DomIntRange : public SetTest {
187  private:
188  Gecode::SetRelType srt;
189  public:
192  : SetTest("Dom::IntRange::"+str(srt0)+"::"+str(n),1,ds_33,n==1),
193  srt(srt0) {}
195  virtual bool solution(const SetAssignment& x) const {
196  for (int i=x.size(); i--; ) {
197  CountableSetRanges xr(x.lub, x[i]);
198  IntSet is(-3,-1);
199  IntSetRanges dr(is);
200  switch (srt) {
201  case SRT_EQ:
202  if (!Iter::Ranges::equal(xr, dr))
203  return false;
204  break;
205  case SRT_LQ:
206  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
207  return false;
208  break;
209  case SRT_LE:
210  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
211  return false;
212  break;
213  case SRT_GQ:
214  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
215  return false;
216  break;
217  case SRT_GR:
218  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
219  return false;
220  break;
221  case SRT_NQ:
222  if (!(!Iter::Ranges::equal(xr, dr)))
223  return false;
224  break;
225  case SRT_SUB:
226  if (!(Iter::Ranges::subset(xr, dr)))
227  return false;
228  break;
229  case SRT_SUP:
230  if (!(Iter::Ranges::subset(dr, xr)))
231  return false;
232  break;
233  case SRT_DISJ:
234  {
236  inter(xr, dr);
237  if (inter())
238  return false;
239  }
240  break;
241  case SRT_CMPL:
242  {
244  if (!Iter::Ranges::equal(xr,drc))
245  return false;
246  }
247  break;
248  }
249  }
250  return true;
251  }
253  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
254  if (x.size() == 1)
255  Gecode::dom(home, x[0], srt, -3, -1);
256  else
257  Gecode::dom(home, x, srt, -3, -1);
258  }
260  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
261  assert(x.size() == 1);
262  if (Base::rand(2) != 0) {
263  Gecode::dom(home, x[0], srt, -3, -1, r);
264  } else {
265  switch (r.mode()) {
266  case Gecode::RM_EQV:
267  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) == r.var()); break;
268  case Gecode::RM_IMP:
269  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) << r.var()); break;
270  case Gecode::RM_PMI:
271  Gecode::rel(home, Gecode::dom(x[0], srt, -3, -1) >> r.var()); break;
272  default: GECODE_NEVER;
273  }
274  }
275  }
276  };
277 
279  class DomInt : public SetTest {
280  private:
281  Gecode::SetRelType srt;
282  public:
285  SetTest("Dom::Int::"+str(srt0)+"::"+str(n),n,ds_33,n==1),
286  srt(srt0) {}
288  virtual bool solution(const SetAssignment& x) const {
289  IntSet is(-3,-3);
290  for (int i=x.size(); i--; ) {
291  CountableSetRanges xr(x.lub, x[i]);
292  IntSetRanges dr(is);
293  switch (srt) {
294  case SRT_EQ:
295  if (!Iter::Ranges::equal(xr, dr))
296  return false;
297  break;
298  case SRT_LQ:
299  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
300  return false;
301  break;
302  case SRT_LE:
303  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
304  return false;
305  break;
306  case SRT_GQ:
307  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
308  return false;
309  break;
310  case SRT_GR:
311  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
312  return false;
313  break;
314  case SRT_NQ:
315  if (Iter::Ranges::equal(xr, dr))
316  return false;
317  break;
318  case SRT_SUB:
319  if (!(Iter::Ranges::subset(xr, dr)))
320  return false;
321  break;
322  case SRT_SUP:
323  if (!(Iter::Ranges::subset(dr, xr)))
324  return false;
325  break;
326  case SRT_DISJ:
327  {
329  inter(xr, dr);
330 
331  if (inter())
332  return false;
333  break;
334  }
335  case SRT_CMPL:
336  {
338 
339  if (!Iter::Ranges::equal(xr,drc))
340  return false;
341  break;
342  }
343  }
344  }
345  return true;
346  }
348  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
349  if (x.size() == 1)
350  Gecode::dom(home, x[0], srt, -3);
351  else
352  Gecode::dom(home, x, srt, -3);
353  }
355  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
356  assert(x.size() == 1);
357  if (Base::rand(2) != 0) {
358  Gecode::dom(home, x[0], srt, -3, r);
359  } else {
360  switch (r.mode()) {
361  case Gecode::RM_EQV:
362  Gecode::rel(home, Gecode::dom(x[0], srt, -3) == r.var()); break;
363  case Gecode::RM_IMP:
364  Gecode::rel(home, Gecode::dom(x[0], srt, -3) << r.var()); break;
365  case Gecode::RM_PMI:
366  Gecode::rel(home, Gecode::dom(x[0], srt, -3) >> r.var()); break;
367  default: GECODE_NEVER;
368  }
369  }
370  }
371  };
372 
374  class DomDom : public SetTest {
375  private:
376  Gecode::SetRelType srt;
377  Gecode::IntSet is;
378  public:
381  SetTest("Dom::Dom::"+str(srt0)+"::"+str(n),n,d1,(n == 1)),
382  srt(srt0), is(srt == Gecode::SRT_CMPL ? d1c: d1) {}
384  virtual bool solution(const SetAssignment& x) const {
385  for (int i=x.size(); i--; ) {
386  CountableSetRanges xr(x.lub, x[i]);
387  IntSetRanges dr(is);
388  switch (srt) {
389  case SRT_EQ:
390  if (!Iter::Ranges::equal(xr, dr))
391  return false;
392  break;
393  case SRT_LQ:
394  if (!((!xr()) || in(minSymDiff(x,i,is),dr,true)))
395  return false;
396  break;
397  case SRT_LE:
398  if (!(xr() ? in(minSymDiff(x,i,is),dr) : dr()))
399  return false;
400  break;
401  case SRT_GQ:
402  if (!((!dr()) || in(minSymDiff(x,i,is),xr,true)))
403  return false;
404  break;
405  case SRT_GR:
406  if (!(dr() ? in(minSymDiff(x,i,is),xr) : xr()))
407  return false;
408  break;
409  case SRT_NQ:
410  if (Iter::Ranges::equal(xr, dr))
411  return false;
412  break;
413  case SRT_SUB:
414  if (!Iter::Ranges::subset(xr, dr))
415  return false;
416  break;
417  case SRT_SUP:
418  if (!Iter::Ranges::subset(dr, xr))
419  return false;
420  break;
421  case SRT_DISJ:
422  {
424  inter(xr, dr);
425  if (inter())
426  return false;
427  }
428  break;
429  case SRT_CMPL:
430  {
432  if (!Iter::Ranges::equal(xr,drc))
433  return false;
434  }
435  break;
436  }
437  }
438  return true;
439  }
441  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
442  if (x.size() == 1)
443  Gecode::dom(home, x[0], srt, is);
444  else
445  Gecode::dom(home, x, srt, is);
446  }
448  virtual void post(Space& home, SetVarArray& x, IntVarArray&, Reify r) {
449  assert(x.size() == 1);
450  Gecode::dom(home, x[0], srt, is, r);
451  }
452  };
453 
455  class CardRange : public SetTest {
456  public:
459  : SetTest("Dom::CardRange::"+str(n),n,d1,false) {}
461  virtual bool solution(const SetAssignment& x) const {
462  for (int i=x.size(); i--; ) {
463  CountableSetRanges xr(x.lub, x[i]);
464  unsigned int card = Iter::Ranges::size(xr);
465  if ((card < 2) || (card > 3))
466  return false;
467  }
468  return true;
469  }
471  virtual void post(Space& home, SetVarArray& x, IntVarArray&) {
472  if (x.size() == 1)
473  Gecode::cardinality(home, x[0], 2, 3);
474  else
475  Gecode::cardinality(home, x, 2, 3);
476  }
477  };
478 
499 
520 
541 
562 
563  CardRange _cr1(1);
564  CardRange _cr2(2);
565 
566 }}}
567 
568 // STATISTICS: test-set
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:355
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:471
Test for cardinality range
Definition: dom.cpp:455
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:461
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:641
virtual void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
Definition: dom.cpp:448
Inverse implication for reification.
Definition: int.hh:844
Range iterator for singleton range.
DomInt _domint_gq2(SRT_GQ, 2)
const int min
Smallest allowed integer in integer set.
Definition: set.hh:99
Range iterator for integer sets.
Definition: int.hh:268
DomInt _domint_eq1(SRT_EQ, 1)
int size(void) const
Return size of array (number of elements)
Definition: array.hpp:969
ReifyMode mode(void) const
Return reification mode.
Definition: reify.hpp:56
DomInt(Gecode::SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:284
DomIntRange(Gecode::SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:191
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:186
DomDom _domdom_sub2(SRT_SUB, 2)
CardRange _cr2(2)
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition: dom.cpp:40
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:738
DomDom _domdom_gr1(SRT_GR, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:195
DomIntRange _domintrange_gr1(SRT_GR, 1)
Superset ( )
Definition: set.hh:645
Complement.
Definition: set.hh:647
DomInt _domint_gr1(SRT_GR, 1)
const unsigned int card
Maximum cardinality of an integer set.
Definition: set.hh:101
const int max
Largest allowed integer in integer set.
Definition: set.hh:97
DomDom _domdom_sup2(SRT_SUP, 2)
Computation spaces.
Definition: core.hpp:1701
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:103
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:234
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:380
DomIntRange _domintrange_cmpl1(SRT_CMPL, 1)
DomRange(SetRelType srt0, int n)
Create and register test.
Definition: dom.cpp:99
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:648
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:292
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:851
Create c
Definition: dom.cpp:141
Subset ( )
Definition: set.hh:644
DomRange _domrange_sup2(SRT_SUP, 2)
Gecode::IntSet lub
The common superset for all domains.
Definition: set.hh:154
DomIntRange _domintrange_cmpl2(SRT_CMPL, 2)
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
Integer sets.
Definition: int.hh:170
DomRange _domrange_nq1(SRT_NQ, 1)
Less ( )
Definition: set.hh:649
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:167
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:260
LinIntExpr cardinality(const SetExpr &e)
Cardinality of set expression.
Definition: set-expr.cpp:814
Post propagator for SetVar SetOpType SetVar SetRelType r
Definition: set.hh:765
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
Definition: set-expr.cpp:695
General test support.
Definition: afc.cpp:39
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:348
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:650
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:273
DomRange _domrange_lq1(SRT_LQ, 1)
Generate all set assignments.
Definition: set.hh:142
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:160
DomRange _domrange_cmpl1(SRT_CMPL, 1)
virtual void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
Definition: dom.cpp:253
DomDom _domdom_le1(SRT_LE, 1)
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:43
Test for equality with an integer
Definition: dom.cpp:279
BoolVar var(void) const
Return Boolean control variable.
Definition: reify.hpp:48
Range iterator producing subsets of an IntSet.
Definition: set.hh:98
Greater ( )
Definition: set.hh:651
Equality ( )
Definition: set.hh:642
Disjoint ( )
Definition: set.hh:646
Test for equality with a range
Definition: dom.cpp:93
Post propagator for SetVar x
Definition: set.hh:765
DomRange _domrange_sub1(SRT_SUB, 1)
virtual bool solution(const SetAssignment &x) const
Test whether x is solution
Definition: dom.cpp:288
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:441
Set variable array
Definition: set.hh:568
Test for equality with a domain
Definition: dom.cpp:374
DomInt _domint_lq2(SRT_LQ, 2)
Disequality ( )
Definition: set.hh:643
Gecode toplevel namespace
Implication for reification.
Definition: int.hh:837
DomRange _domrange_eq2(SRT_EQ, 2)
int size(void) const
Return arity.
Definition: set.hh:173
Range iterator for computing set difference.
Definition: ranges-diff.hpp:43
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:384
DomInt _domint_disj1(SRT_DISJ, 1)
#define GECODE_NEVER
Assert that this command is never executed.
Definition: macros.hpp:56
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:830
DomIntRange _domintrange_nq2(SRT_NQ, 2)
CardRange(int n)
Create and register test.
Definition: dom.cpp:458
DomInt _domint_sup2(SRT_SUP, 2)
DomIntRange _domintrange_disj1(SRT_DISJ, 1)