Generated on Sat Feb 7 2015 02:01:19 for Gecode by doxygen 1.8.9.1
int.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  * Contributing authors:
8  * Stefano Gualandi <stefano.gualandi@gmail.com>
9  * Mikael Lagerkvist <lagerkvist@gecode.org>
10  * David Rijsman <David.Rijsman@quintiq.com>
11  *
12  * Copyright:
13  * Stefano Gualandi, 2013
14  * Mikael Lagerkvist, 2006
15  * David Rijsman, 2009
16  * Christian Schulte, 2002
17  * Guido Tack, 2004
18  *
19  * Last modified:
20  * $Date: 2015-01-16 14:10:48 +0100 (Fri, 16 Jan 2015) $ by $Author: schulte $
21  * $Revision: 14362 $
22  *
23  * This file is part of Gecode, the generic constraint
24  * development environment:
25  * http://www.gecode.org
26  *
27  * Permission is hereby granted, free of charge, to any person obtaining
28  * a copy of this software and associated documentation files (the
29  * "Software"), to deal in the Software without restriction, including
30  * without limitation the rights to use, copy, modify, merge, publish,
31  * distribute, sublicense, and/or sell copies of the Software, and to
32  * permit persons to whom the Software is furnished to do so, subject to
33  * the following conditions:
34  *
35  * The above copyright notice and this permission notice shall be
36  * included in all copies or substantial portions of the Software.
37  *
38  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
39  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
40  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
41  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
42  * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
43  * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
44  * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45  *
46  */
47 
48 #ifndef __GECODE_INT_HH__
49 #define __GECODE_INT_HH__
50 
51 #include <climits>
52 #include <cfloat>
53 #include <iostream>
54 
55 #include <vector>
56 
57 #include <gecode/kernel.hh>
58 #include <gecode/iter.hh>
59 
60 /*
61  * Configure linking
62  *
63  */
64 #if !defined(GECODE_STATIC_LIBS) && \
65  (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
66 
67 #ifdef GECODE_BUILD_INT
68 #define GECODE_INT_EXPORT __declspec( dllexport )
69 #else
70 #define GECODE_INT_EXPORT __declspec( dllimport )
71 #endif
72 
73 #else
74 
75 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
76 #define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
77 #else
78 #define GECODE_INT_EXPORT
79 #endif
80 
81 #endif
82 
83 // Configure auto-linking
84 #ifndef GECODE_BUILD_INT
85 #define GECODE_LIBRARY_NAME "Int"
87 #endif
88 
100 #include <gecode/int/exception.hpp>
101 
102 namespace Gecode { namespace Int {
103 
111  namespace Limits {
113  const int max = INT_MAX - 1;
115  const int min = -max;
117  const int infinity = max + 1;
119  const long long int llmax = LLONG_MAX - 1;
121  const long long int llmin = -llmax;
123  const long long int llinfinity = llmax + 1;
125  bool valid(int n);
127  bool valid(long long int n);
129  void check(int n, const char* l);
131  void check(long long int n, const char* l);
133  void positive(int n, const char* l);
135  void positive(long long int n, const char* l);
137  void nonnegative(int n, const char* l);
139  void nonnegative(long long int n, const char* l);
141  bool overflow_add(int n, int m);
143  bool overflow_add(long long int n, long long int m);
145  bool overflow_sub(int n, int m);
147  bool overflow_sub(long long int n, long long int m);
149  bool overflow_mul(int n, int m);
151  bool overflow_mul(long long int n, long long int m);
152  }
153 
154 }}
155 
156 #include <gecode/int/limits.hpp>
157 
158 namespace Gecode {
159 
160  class IntSetRanges;
161 
162  template<class I> class IntSetInit;
163 
171  class IntSet : public SharedHandle {
172  friend class IntSetRanges;
173  template<class I> friend class IntSetInit;
174  private:
176  class Range {
177  public:
178  int min, max;
179  };
180  class IntSetObject : public SharedHandle::Object {
181  public:
183  unsigned int size;
185  int n;
187  Range* r;
189  GECODE_INT_EXPORT static IntSetObject* allocate(int m);
191  GECODE_INT_EXPORT SharedHandle::Object* copy(void) const;
193  GECODE_INT_EXPORT bool in(int n) const;
195  GECODE_INT_EXPORT virtual ~IntSetObject(void);
196  };
198  class MinInc;
200  GECODE_INT_EXPORT void normalize(Range* r, int n);
202  GECODE_INT_EXPORT void init(int n, int m);
204  GECODE_INT_EXPORT void init(const int r[], int n);
206  GECODE_INT_EXPORT void init(const int r[][2], int n);
207  public:
209 
210  IntSet(void);
216  IntSet(int n, int m);
218  IntSet(const int r[], int n);
224  IntSet(const int r[][2], int n);
226  template<class I>
227  explicit IntSet(I& i);
229  template<class I>
230  explicit IntSet(const I& i);
232 
234 
235  int ranges(void) const;
238  int min(int i) const;
240  int max(int i) const;
242  unsigned int width(int i) const;
244 
246 
247  bool in(int n) const;
250  unsigned int size(void) const;
252  unsigned int width(void) const;
254  int min(void) const;
256  int max(void) const;
258 
260 
261  GECODE_INT_EXPORT static const IntSet empty;
264  };
265 
271  class IntSetRanges {
272  private:
274  const IntSet::Range* i;
276  const IntSet::Range* e;
277  public:
279 
280  IntSetRanges(void);
283  IntSetRanges(const IntSet& s);
285  void init(const IntSet& s);
287 
289 
290  bool operator ()(void) const;
293  void operator ++(void);
295 
297 
298  int min(void) const;
301  int max(void) const;
303  unsigned int width(void) const;
305  };
306 
312  class IntSetValues : public Iter::Ranges::ToValues<IntSetRanges> {
313  public:
315 
316  IntSetValues(void);
319  IntSetValues(const IntSet& s);
321  void init(const IntSet& s);
323  };
324 
329  template<class Char, class Traits>
330  std::basic_ostream<Char,Traits>&
331  operator <<(std::basic_ostream<Char,Traits>& os, const IntSet& s);
332 
333 }
334 
335 #include <gecode/int/int-set-1.hpp>
336 
337 #include <gecode/int/var-imp.hpp>
338 
339 namespace Gecode {
340 
341  namespace Int {
342  class IntView;
343  }
344 
350  class IntVar : public VarImpVar<Int::IntVarImp> {
351  friend class IntVarArray;
352  friend class IntVarArgs;
353  private:
361  void _init(Space& home, int min, int max);
368  void _init(Space& home, const IntSet& d);
369  public:
371 
372  IntVar(void);
375  IntVar(const IntVar& y);
377  IntVar(const Int::IntView& y);
389  GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
401  GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
403 
405 
406  int min(void) const;
409  int max(void) const;
411  int med(void) const;
419  int val(void) const;
420 
422  unsigned int size(void) const;
424  unsigned int width(void) const;
426  unsigned int regret_min(void) const;
428  unsigned int regret_max(void) const;
430 
432 
433  bool range(void) const;
436  bool in(int n) const;
438  };
439 
444  template<class Char, class Traits>
445  std::basic_ostream<Char,Traits>&
446  operator <<(std::basic_ostream<Char,Traits>& os, const IntVar& x);
447 
453  public:
455 
456  IntVarRanges(void);
459  IntVarRanges(const IntVar& x);
461  void init(const IntVar& x);
463  };
464 
469  class IntVarValues : public Iter::Ranges::ToValues<IntVarRanges> {
470  public:
472 
473  IntVarValues(void);
476  IntVarValues(const IntVar& x);
478  void init(const IntVar& x);
480  };
481 
482  namespace Int {
483  class BoolView;
484  }
485 
491  class BoolVar : public VarImpVar<Int::BoolVarImp> {
492  friend class BoolVarArray;
493  friend class BoolVarArgs;
494  private:
502  void _init(Space& home, int min, int max);
503  public:
505 
506  BoolVar(void);
509  BoolVar(const BoolVar& y);
511  BoolVar(const Int::BoolView& y);
523  GECODE_INT_EXPORT BoolVar(Space& home, int min, int max);
525 
527 
528  int min(void) const;
531  int max(void) const;
533  int med(void) const;
541  int val(void) const;
542 
544  unsigned int size(void) const;
546  unsigned int width(void) const;
548  unsigned int regret_min(void) const;
550  unsigned int regret_max(void) const;
552 
554 
555  bool range(void) const;
558  bool in(int n) const;
560 
562 
563  bool zero(void) const;
566  bool one(void) const;
568  bool none(void) const;
570  };
571 
576  template<class Char, class Traits>
577  std::basic_ostream<Char,Traits>&
578  operator <<(std::basic_ostream<Char,Traits>& os, const BoolVar& x);
579 
580 }
581 
582 
583 #include <gecode/int/view.hpp>
584 #include <gecode/int/propagator.hpp>
585 
586 namespace Gecode {
587 
597  typedef ArgArray<IntSet> IntSetArgs;
599 
600 }
601 
603 
604 namespace Gecode {
605 
607  class IntArgs : public PrimArgArray<int> {
608  public:
610 
611  IntArgs(void);
614  explicit IntArgs(int n);
616  IntArgs(const SharedArray<int>& x);
618  IntArgs(const std::vector<int>& x);
620  template<class InputIterator>
621  IntArgs(InputIterator first, InputIterator last);
624  IntArgs(int n, int e0, ...);
626  IntArgs(int n, const int* e);
628  IntArgs(const PrimArgArray<int>& a);
629 
631  static IntArgs create(int n, int start, int inc=1);
633  };
634 
636  class IntVarArgs : public VarArgArray<IntVar> {
637  public:
639 
640  IntVarArgs(void) {}
643  explicit IntVarArgs(int n) : VarArgArray<IntVar>(n) {}
649  IntVarArgs(const std::vector<IntVar>& a) : VarArgArray<IntVar>(a) {}
651  template<class InputIterator>
652  IntVarArgs(InputIterator first, InputIterator last)
653  : VarArgArray<IntVar>(first,last) {}
666  IntVarArgs(Space& home, int n, int min, int max);
679  IntVarArgs(Space& home, int n, const IntSet& s);
681  };
690  class BoolVarArgs : public VarArgArray<BoolVar> {
691  public:
693 
694  BoolVarArgs(void) {}
697  explicit BoolVarArgs(int n) : VarArgArray<BoolVar>(n) {}
702  : VarArgArray<BoolVar>(a) {}
704  BoolVarArgs(const std::vector<BoolVar>& a) : VarArgArray<BoolVar>(a) {}
706  template<class InputIterator>
707  BoolVarArgs(InputIterator first, InputIterator last)
708  : VarArgArray<BoolVar>(first,last) {}
721  BoolVarArgs(Space& home, int n, int min, int max);
723  };
725 
741  class IntVarArray : public VarArray<IntVar> {
742  public:
744 
745  IntVarArray(void);
748  IntVarArray(Space& home, int n);
750  IntVarArray(const IntVarArray& a);
752  IntVarArray(Space& home, const IntVarArgs& a);
765  IntVarArray(Space& home, int n, int min, int max);
778  IntVarArray(Space& home, int n, const IntSet& s);
780  };
781 
786  class BoolVarArray : public VarArray<BoolVar> {
787  public:
789 
790  BoolVarArray(void);
793  BoolVarArray(Space& home, int n);
795  BoolVarArray(const BoolVarArray& a);
797  BoolVarArray(Space& home, const BoolVarArgs& a);
810  BoolVarArray(Space& home, int n, int min, int max);
812  };
813 
814 }
815 
816 #include <gecode/int/int-set-2.hpp>
817 
818 #include <gecode/int/array.hpp>
819 
820 namespace Gecode {
821 
826  enum ReifyMode {
848  };
849 
854  class Reify {
855  protected:
860  public:
862  Reify(void);
864  Reify(BoolVar x, ReifyMode rm=RM_EQV);
866  BoolVar var(void) const;
868  ReifyMode mode(void) const;
870  void var(BoolVar x);
872  void mode(ReifyMode rm);
873  };
874 
879  Reify eqv(BoolVar x);
880 
885  Reify imp(BoolVar x);
886 
891  Reify pmi(BoolVar x);
892 
893 }
894 
895 #include <gecode/int/reify.hpp>
896 
897 namespace Gecode {
898 
903  enum IntRelType {
910  };
911 
916  enum BoolOpType {
922  };
923 
937  enum IntConLevel {
942  };
943 
949  enum TaskType {
950  TT_FIXP, //< Task with fixed processing time
951  TT_FIXS, //< Task with fixed start time
952  TT_FIXE //< Task with fixed end time
953  };
954 
961 
963  template<>
965  public:
966  typedef TaskTypeArgs StorageType;
968  typedef TaskTypeArgs ArgsType;
969  };
970 
971 
979  GECODE_INT_EXPORT void
981  dom(Home home, IntVar x, int n,
982  IntConLevel icl=ICL_DEF);
984  GECODE_INT_EXPORT void
985  dom(Home home, const IntVarArgs& x, int n,
986  IntConLevel icl=ICL_DEF);
987 
989  GECODE_INT_EXPORT void
990  dom(Home home, IntVar x, int l, int m,
991  IntConLevel icl=ICL_DEF);
993  GECODE_INT_EXPORT void
994  dom(Home home, const IntVarArgs& x, int l, int m,
995  IntConLevel icl=ICL_DEF);
996 
998  GECODE_INT_EXPORT void
999  dom(Home home, IntVar x, const IntSet& s,
1000  IntConLevel icl=ICL_DEF);
1002  GECODE_INT_EXPORT void
1003  dom(Home home, const IntVarArgs& x, const IntSet& s,
1004  IntConLevel icl=ICL_DEF);
1005 
1007  GECODE_INT_EXPORT void
1008  dom(Home home, IntVar x, int n, Reify r,
1009  IntConLevel icl=ICL_DEF);
1011  GECODE_INT_EXPORT void
1012  dom(Home home, IntVar x, int l, int m, Reify r,
1013  IntConLevel icl=ICL_DEF);
1015  GECODE_INT_EXPORT void
1016  dom(Home home, IntVar x, const IntSet& s, Reify r,
1017  IntConLevel icl=ICL_DEF);
1018 
1020  GECODE_INT_EXPORT void
1021  dom(Home home, IntVar x, IntVar d,
1022  IntConLevel icl=ICL_DEF);
1024  GECODE_INT_EXPORT void
1025  dom(Home home, BoolVar x, BoolVar d,
1026  IntConLevel icl=ICL_DEF);
1028  GECODE_INT_EXPORT void
1029  dom(Home home, const IntVarArgs& x, const IntVarArgs& d,
1030  IntConLevel icl=ICL_DEF);
1032  GECODE_INT_EXPORT void
1033  dom(Home home, const BoolVarArgs& x, const BoolVarArgs& d,
1034  IntConLevel icl=ICL_DEF);
1036 
1037 
1048  GECODE_INT_EXPORT void
1049  rel(Home home, IntVar x0, IntRelType irt, IntVar x1,
1050  IntConLevel icl=ICL_DEF);
1057  GECODE_INT_EXPORT void
1058  rel(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
1059  IntConLevel icl=ICL_DEF);
1063  GECODE_INT_EXPORT void
1064  rel(Home home, IntVar x, IntRelType irt, int c,
1065  IntConLevel icl=ICL_DEF);
1069  GECODE_INT_EXPORT void
1070  rel(Home home, const IntVarArgs& x, IntRelType irt, int c,
1071  IntConLevel icl=ICL_DEF);
1078  GECODE_INT_EXPORT void
1079  rel(Home home, IntVar x0, IntRelType irt, IntVar x1, Reify r,
1080  IntConLevel icl=ICL_DEF);
1087  GECODE_INT_EXPORT void
1088  rel(Home home, IntVar x, IntRelType irt, int c, Reify r,
1089  IntConLevel icl=ICL_DEF);
1104  GECODE_INT_EXPORT void
1105  rel(Home home, const IntVarArgs& x, IntRelType irt,
1106  IntConLevel icl=ICL_DEF);
1121  GECODE_INT_EXPORT void
1122  rel(Home home, const IntVarArgs& x, IntRelType irt, const IntVarArgs& y,
1123  IntConLevel icl=ICL_DEF);
1124 
1132  GECODE_INT_EXPORT void
1133  rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1,
1134  IntConLevel icl=ICL_DEF);
1138  GECODE_INT_EXPORT void
1139  rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1, Reify r,
1140  IntConLevel icl=ICL_DEF);
1144  GECODE_INT_EXPORT void
1145  rel(Home home, const BoolVarArgs& x, IntRelType irt, BoolVar y,
1146  IntConLevel icl=ICL_DEF);
1154  GECODE_INT_EXPORT void
1155  rel(Home home, BoolVar x, IntRelType irt, int n,
1156  IntConLevel icl=ICL_DEF);
1164  GECODE_INT_EXPORT void
1165  rel(Home home, BoolVar x, IntRelType irt, int n, Reify r,
1166  IntConLevel icl=ICL_DEF);
1174  GECODE_INT_EXPORT void
1175  rel(Home home, const BoolVarArgs& x, IntRelType irt, int n,
1176  IntConLevel icl=ICL_DEF);
1186  GECODE_INT_EXPORT void
1187  rel(Home home, const BoolVarArgs& x, IntRelType irt, const BoolVarArgs& y,
1188  IntConLevel icl=ICL_DEF);
1199  GECODE_INT_EXPORT void
1200  rel(Home home, const BoolVarArgs& x, IntRelType irt,
1201  IntConLevel icl=ICL_DEF);
1207  GECODE_INT_EXPORT void
1208  rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2,
1209  IntConLevel icl=ICL_DEF);
1218  GECODE_INT_EXPORT void
1219  rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n,
1220  IntConLevel icl=ICL_DEF);
1230  GECODE_INT_EXPORT void
1231  rel(Home home, BoolOpType o, const BoolVarArgs& x, BoolVar y,
1232  IntConLevel icl=ICL_DEF);
1245  GECODE_INT_EXPORT void
1246  rel(Home home, BoolOpType o, const BoolVarArgs& x, int n,
1247  IntConLevel icl=ICL_DEF);
1258  GECODE_INT_EXPORT void
1259  clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1260  BoolVar z, IntConLevel icl=ICL_DEF);
1274  GECODE_INT_EXPORT void
1275  clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1276  int n, IntConLevel icl=ICL_DEF);
1283  GECODE_INT_EXPORT void
1284  ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z,
1285  IntConLevel icl=ICL_DEF);
1286 
1287 
1299  GECODE_INT_EXPORT void
1300  precede(Home home, const IntVarArgs& x, int s, int t,
1309  GECODE_INT_EXPORT void
1310  precede(Home home, const IntVarArgs& x, const IntArgs& c,
1312 
1313 
1319  GECODE_INT_EXPORT void
1321  member(Home home, const IntVarArgs& x, IntVar y,
1322  IntConLevel icl=ICL_DEF);
1324  GECODE_INT_EXPORT void
1325  member(Home home, const BoolVarArgs& x, BoolVar y,
1326  IntConLevel icl=ICL_DEF);
1328  GECODE_INT_EXPORT void
1329  member(Home home, const IntVarArgs& x, IntVar y, Reify r,
1330  IntConLevel icl=ICL_DEF);
1332  GECODE_INT_EXPORT void
1333  member(Home home, const BoolVarArgs& x, BoolVar y, Reify r,
1334  IntConLevel icl=ICL_DEF);
1336 
1337 
1351  GECODE_INT_EXPORT void
1352  element(Home home, IntSharedArray n, IntVar x0, IntVar x1,
1353  IntConLevel icl=ICL_DEF);
1359  GECODE_INT_EXPORT void
1360  element(Home home, IntSharedArray n, IntVar x0, BoolVar x1,
1361  IntConLevel icl=ICL_DEF);
1367  GECODE_INT_EXPORT void
1368  element(Home home, IntSharedArray n, IntVar x0, int x1,
1369  IntConLevel icl=ICL_DEF);
1375  GECODE_INT_EXPORT void
1376  element(Home home, const IntVarArgs& x, IntVar y0, IntVar y1,
1377  IntConLevel icl=ICL_DEF);
1383  GECODE_INT_EXPORT void
1384  element(Home home, const IntVarArgs& x, IntVar y0, int y1,
1385  IntConLevel icl=ICL_DEF);
1387  GECODE_INT_EXPORT void
1388  element(Home home, const BoolVarArgs& x, IntVar y0, BoolVar y1,
1389  IntConLevel icl=ICL_DEF);
1391  GECODE_INT_EXPORT void
1392  element(Home home, const BoolVarArgs& x, IntVar y0, int y1,
1393  IntConLevel icl=ICL_DEF);
1394 
1407  GECODE_INT_EXPORT void
1408  element(Home home, IntSharedArray a,
1409  IntVar x, int w, IntVar y, int h, IntVar z,
1410  IntConLevel icl=ICL_DEF);
1423  GECODE_INT_EXPORT void
1424  element(Home home, IntSharedArray a,
1425  IntVar x, int w, IntVar y, int h, BoolVar z,
1426  IntConLevel icl=ICL_DEF);
1442  GECODE_INT_EXPORT void
1443  element(Home home, const IntVarArgs& a,
1444  IntVar x, int w, IntVar y, int h, IntVar z,
1445  IntConLevel icl=ICL_DEF);
1458  GECODE_INT_EXPORT void
1459  element(Home home, const BoolVarArgs& a,
1460  IntVar x, int w, IntVar y, int h, BoolVar z,
1461  IntConLevel icl=ICL_DEF);
1463 
1464 
1479  GECODE_INT_EXPORT void
1480  distinct(Home home, const IntVarArgs& x,
1481  IntConLevel icl=ICL_DEF);
1494  GECODE_INT_EXPORT void
1495  distinct(Home home, const IntArgs& n, const IntVarArgs& x,
1496  IntConLevel icl=ICL_DEF);
1498 
1499 
1517  GECODE_INT_EXPORT void
1518  channel(Home home, const IntVarArgs& x, const IntVarArgs& y,
1519  IntConLevel icl=ICL_DEF);
1520 
1534  GECODE_INT_EXPORT void
1535  channel(Home home, const IntVarArgs& x, int xoff,
1536  const IntVarArgs& y, int yoff,
1537  IntConLevel icl=ICL_DEF);
1538 
1540  GECODE_INT_EXPORT void
1541  channel(Home home, BoolVar x0, IntVar x1,
1542  IntConLevel icl=ICL_DEF);
1544  forceinline void
1545  channel(Home home, IntVar x0, BoolVar x1,
1546  IntConLevel icl=ICL_DEF) {
1547  channel(home,x1,x0,icl);
1548  }
1554  GECODE_INT_EXPORT void
1555  channel(Home home, const BoolVarArgs& x, IntVar y, int o=0,
1556  IntConLevel icl=ICL_DEF);
1558 
1559 
1576  GECODE_INT_EXPORT void
1577  sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1578  IntConLevel icl=ICL_DEF);
1579 
1591  GECODE_INT_EXPORT void
1592  sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1593  const IntVarArgs& z,
1594  IntConLevel icl=ICL_DEF);
1596 
1597 
1616  GECODE_INT_EXPORT void
1617  count(Home home, const IntVarArgs& x, int n, IntRelType irt, int m,
1618  IntConLevel icl=ICL_DEF);
1623  GECODE_INT_EXPORT void
1624  count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, int m,
1625  IntConLevel icl=ICL_DEF);
1633  GECODE_INT_EXPORT void
1634  count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, int m,
1635  IntConLevel icl=ICL_DEF);
1643  GECODE_INT_EXPORT void
1644  count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, int m,
1645  IntConLevel icl=ICL_DEF);
1650  GECODE_INT_EXPORT void
1651  count(Home home, const IntVarArgs& x, int n, IntRelType irt, IntVar z,
1652  IntConLevel icl=ICL_DEF);
1657  GECODE_INT_EXPORT void
1658  count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, IntVar z,
1659  IntConLevel icl=ICL_DEF);
1667  GECODE_INT_EXPORT void
1668  count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, IntVar z,
1669  IntConLevel icl=ICL_DEF);
1677  GECODE_INT_EXPORT void
1678  count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, IntVar z,
1679  IntConLevel icl=ICL_DEF);
1680 
1694  GECODE_INT_EXPORT void
1695  count(Home home, const IntVarArgs& x, const IntVarArgs& c,
1696  IntConLevel icl=ICL_DEF);
1697 
1711  GECODE_INT_EXPORT void
1712  count(Home home, const IntVarArgs& x, const IntSetArgs& c,
1713  IntConLevel icl=ICL_DEF);
1714 
1731  GECODE_INT_EXPORT void
1732  count(Home home, const IntVarArgs& x,
1733  const IntVarArgs& c, const IntArgs& v,
1734  IntConLevel icl=ICL_DEF);
1735 
1752  GECODE_INT_EXPORT void
1753  count(Home home, const IntVarArgs& x,
1754  const IntSetArgs& c, const IntArgs& v,
1755  IntConLevel icl=ICL_DEF);
1756 
1773  GECODE_INT_EXPORT void
1774  count(Home home, const IntVarArgs& x,
1775  const IntSet& c, const IntArgs& v,
1776  IntConLevel icl=ICL_DEF);
1777 
1779 
1794  GECODE_INT_EXPORT void
1795  nvalues(Home home, const IntVarArgs& x, IntRelType irt, int y,
1796  IntConLevel icl=ICL_DEF);
1800  GECODE_INT_EXPORT void
1801  nvalues(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
1802  IntConLevel icl=ICL_DEF);
1806  GECODE_INT_EXPORT void
1807  nvalues(Home home, const BoolVarArgs& x, IntRelType irt, int y,
1808  IntConLevel icl=ICL_DEF);
1812  GECODE_INT_EXPORT void
1813  nvalues(Home home, const BoolVarArgs& x, IntRelType irt, IntVar y,
1814  IntConLevel icl=ICL_DEF);
1816 
1837  GECODE_INT_EXPORT void
1838  sequence(Home home, const IntVarArgs& x, const IntSet& s,
1839  int q, int l, int u, IntConLevel icl=ICL_DEF);
1840 
1855  GECODE_INT_EXPORT void
1856  sequence(Home home, const BoolVarArgs& x, const IntSet& s,
1857  int q, int l, int u, IntConLevel icl=ICL_DEF);
1858 
1860 
1873 
1881  class DFA : public SharedHandle {
1882  private:
1884  class DFAI;
1885  public:
1887  class Transition {
1888  public:
1889  int i_state;
1890  int symbol;
1891  int o_state;
1892  Transition();
1895  Transition(int i_state0, int symbol0, int o_state0);
1896  };
1898  class Transitions {
1899  private:
1901  const Transition* c_trans;
1903  const Transition* e_trans;
1904  public:
1906  Transitions(const DFA& d);
1908  Transitions(const DFA& d, int n);
1910  bool operator ()(void) const;
1912  void operator ++(void);
1914  int i_state(void) const;
1916  int symbol(void) const;
1918  int o_state(void) const;
1919  };
1921  class Symbols {
1922  private:
1924  const Transition* c_trans;
1926  const Transition* e_trans;
1927  public:
1929  Symbols(const DFA& d);
1931  bool operator ()(void) const;
1933  void operator ++(void);
1935  int val(void) const;
1936  };
1937  public:
1938  friend class Transitions;
1940  DFA(void);
1953  DFA(int s, Transition t[], int f[], bool minimize=true);
1955  DFA(const DFA& d);
1957  int n_states(void) const;
1959  int n_transitions(void) const;
1961  unsigned int n_symbols(void) const;
1963  unsigned int max_degree(void) const;
1965  int final_fst(void) const;
1967  int final_lst(void) const;
1969  int symbol_min(void) const;
1971  int symbol_max(void) const;
1972  };
1973 
1974 
1986  };
1987 
1998  GECODE_INT_EXPORT void
1999  extensional(Home home, const IntVarArgs& x, DFA d,
2000  IntConLevel icl=ICL_DEF);
2001 
2012  GECODE_INT_EXPORT void
2013  extensional(Home home, const BoolVarArgs& x, DFA d,
2014  IntConLevel icl=ICL_DEF);
2015 
2022  class TupleSet : public SharedHandle {
2023  public:
2028  typedef int* Tuple;
2029 
2035  : public SharedHandle::Object {
2036  public:
2038  int arity;
2040  int size;
2042  Tuple** tuples;
2044  Tuple* tuple_data;
2046  int* data;
2048  int excess;
2050  int min, max;
2052  unsigned int domsize;
2054  Tuple** last;
2056  Tuple* nullpointer;
2057 
2059  template<class T>
2060  void add(T t);
2062  GECODE_INT_EXPORT void finalize(void);
2064  GECODE_INT_EXPORT void resize(void);
2066  bool finalized(void) const;
2068  TupleSetI(void);
2070  GECODE_INT_EXPORT virtual ~TupleSetI(void);
2072  GECODE_INT_EXPORT virtual SharedHandle::Object* copy(void) const;
2073  };
2074 
2076  TupleSetI* implementation(void);
2077 
2079  TupleSet(void);
2081  TupleSet(const TupleSet& d);
2082 
2084  void add(const IntArgs& tuple);
2086  void finalize(void);
2088  bool finalized(void) const;
2090  int arity(void) const;
2092  int tuples(void) const;
2094  Tuple operator [](int i) const;
2096  int min(void) const;
2098  int max(void) const;
2099  };
2100 
2119  GECODE_INT_EXPORT void
2120  extensional(Home home, const IntVarArgs& x, const TupleSet& t,
2122 
2133  GECODE_INT_EXPORT void
2134  extensional(Home home, const BoolVarArgs& x, const TupleSet& t,
2137 
2138 }
2139 
2142 
2143 namespace Gecode {
2144 
2156  GECODE_INT_EXPORT void
2157  min(Home home, IntVar x0, IntVar x1, IntVar x2,
2158  IntConLevel icl=ICL_DEF);
2166  GECODE_INT_EXPORT void
2167  min(Home home, const IntVarArgs& x, IntVar y,
2168  IntConLevel icl=ICL_DEF);
2174  GECODE_INT_EXPORT void
2175  max(Home home, IntVar x0, IntVar x1, IntVar x2,
2176  IntConLevel icl=ICL_DEF);
2184  GECODE_INT_EXPORT void
2185  max(Home home, const IntVarArgs& x, IntVar y,
2186  IntConLevel icl=ICL_DEF);
2187 
2197  GECODE_INT_EXPORT void
2198  argmin(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
2199  IntConLevel icl=ICL_DEF);
2209  GECODE_INT_EXPORT void
2210  argmax(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
2211  IntConLevel icl=ICL_DEF);
2212 
2218  GECODE_INT_EXPORT void
2219  abs(Home home, IntVar x0, IntVar x1,
2220  IntConLevel icl=ICL_DEF);
2221 
2227  GECODE_INT_EXPORT void
2228  mult(Home home, IntVar x0, IntVar x1, IntVar x2,
2229  IntConLevel icl=ICL_DEF);
2230 
2235  GECODE_INT_EXPORT void
2236  divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
2237  IntConLevel icl=ICL_DEF);
2238 
2243  GECODE_INT_EXPORT void
2244  div(Home home, IntVar x0, IntVar x1, IntVar x2,
2245  IntConLevel icl=ICL_DEF);
2246 
2251  GECODE_INT_EXPORT void
2252  mod(Home home, IntVar x0, IntVar x1, IntVar x2,
2253  IntConLevel icl=ICL_DEF);
2254 
2260  GECODE_INT_EXPORT void
2261  sqr(Home home, IntVar x0, IntVar x1,
2262  IntConLevel icl=ICL_DEF);
2263 
2269  GECODE_INT_EXPORT void
2270  sqrt(Home home, IntVar x0, IntVar x1,
2271  IntConLevel icl=ICL_DEF);
2272 
2281  GECODE_INT_EXPORT void
2282  pow(Home home, IntVar x0, int n, IntVar x1,
2283  IntConLevel icl=ICL_DEF);
2284 
2293  GECODE_INT_EXPORT void
2294  nroot(Home home, IntVar x0, int n, IntVar x1,
2295  IntConLevel icl=ICL_DEF);
2296 
2298 
2330  GECODE_INT_EXPORT void
2331  linear(Home home, const IntVarArgs& x,
2332  IntRelType irt, int c,
2333  IntConLevel icl=ICL_DEF);
2337  GECODE_INT_EXPORT void
2338  linear(Home home, const IntVarArgs& x,
2339  IntRelType irt, IntVar y,
2340  IntConLevel icl=ICL_DEF);
2344  GECODE_INT_EXPORT void
2345  linear(Home home, const IntVarArgs& x,
2346  IntRelType irt, int c, Reify r,
2347  IntConLevel icl=ICL_DEF);
2351  GECODE_INT_EXPORT void
2352  linear(Home home, const IntVarArgs& x,
2353  IntRelType irt, IntVar y, Reify r,
2354  IntConLevel icl=ICL_DEF);
2361  GECODE_INT_EXPORT void
2362  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2363  IntRelType irt, int c,
2364  IntConLevel icl=ICL_DEF);
2371  GECODE_INT_EXPORT void
2372  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2373  IntRelType irt, IntVar y,
2374  IntConLevel icl=ICL_DEF);
2381  GECODE_INT_EXPORT void
2382  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2383  IntRelType irt, int c, Reify r,
2384  IntConLevel icl=ICL_DEF);
2391  GECODE_INT_EXPORT void
2392  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2393  IntRelType irt, IntVar y, Reify r,
2394  IntConLevel icl=ICL_DEF);
2395 
2396 
2424  GECODE_INT_EXPORT void
2425  linear(Home home, const BoolVarArgs& x,
2426  IntRelType irt, int c,
2427  IntConLevel icl=ICL_DEF);
2431  GECODE_INT_EXPORT void
2432  linear(Home home, const BoolVarArgs& x,
2433  IntRelType irt, int c, Reify r,
2434  IntConLevel icl=ICL_DEF);
2438  GECODE_INT_EXPORT void
2439  linear(Home home, const BoolVarArgs& x,
2440  IntRelType irt, IntVar y,
2441  IntConLevel icl=ICL_DEF);
2445  GECODE_INT_EXPORT void
2446  linear(Home home, const BoolVarArgs& x,
2447  IntRelType irt, IntVar y, Reify r,
2448  IntConLevel icl=ICL_DEF);
2455  GECODE_INT_EXPORT void
2456  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2457  IntRelType irt, int c,
2458  IntConLevel icl=ICL_DEF);
2465  GECODE_INT_EXPORT void
2466  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2467  IntRelType irt, int c, Reify r,
2468  IntConLevel icl=ICL_DEF);
2475  GECODE_INT_EXPORT void
2476  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2477  IntRelType irt, IntVar y,
2478  IntConLevel icl=ICL_DEF);
2485  GECODE_INT_EXPORT void
2486  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2487  IntRelType irt, IntVar y, Reify r,
2488  IntConLevel icl=ICL_DEF);
2489 
2490 
2517  GECODE_INT_EXPORT void
2518  binpacking(Home home,
2519  const IntVarArgs& l,
2520  const IntVarArgs& b, const IntArgs& s,
2521  IntConLevel icl=ICL_DEF);
2522  /* \brief Post propagator for multi-dimensional bin packing
2523  *
2524  * In the following \a n refers to the number of items and \a m
2525  * refers to the number of bins.
2526  *
2527  * The multi-dimensional bin-packing constraint enforces that
2528  * all items are packed into bins
2529  * \f$b_i\in\{0,\ldots,m-1\}\f$ for \f$0\leq i<n\f$
2530  * and that the load of each bin corresponds to the items
2531  * packed into it for each dimension \f$l_{j\cdot
2532  * d + k} = \sum_{\{i\in\{0,\ldots,n-1\}|
2533  * b_{j\cdot d+k}=i}\}s_{i\cdot d+k}\f$
2534  * for \f$0\leq j<m\f$, \f$0\leq k<d\f$
2535  * Furthermore, the load variables must satisfy the capacity
2536  * constraints \f$l_{j\cdot d + k} \leq
2537  * c_k\f$ for \f$0\leq j<m\f$, \f$0\leq k<d\f$.
2538  *
2539  * The constraint is implemented by the decomposition
2540  * introduced in: Stefano Gualandi and Michele Lombardi. A
2541  * simple and effective decomposition for the multidimensional
2542  * binpacking constraint. CP 2013, pages 356--364.
2543  *
2544  * Posting the constraint returns a maximal set containing conflicting
2545  * items that require pairwise different bins.
2546  *
2547  * Note that posting the constraint has exponential complexity in the
2548  * number of items due to the Bron-Kerbosch algorithm used for finding
2549  * the maximal conflict item sets.
2550  *
2551  * Throws the following exceptions:
2552  * - Of type Int::ArgumentSizeMismatch if any of the following properties
2553  * is violated: \f$|b|=n\f$, \f$|l|=m\cdot d\f$, \f$|s|=n\cdot d\f$,
2554  * and \f$|c|=d\f$.
2555  * - Of type Int::ArgumentSame if \a l and \a b share unassigned variables.
2556  * - Of type Int::OutOfLimits if \a s or \a c contains a negative number.
2557  *
2558  * \ingroup TaskModelIntBinPacking
2559  */
2560  GECODE_INT_EXPORT IntSet
2561  binpacking(Home home, int d,
2562  const IntVarArgs& l, const IntVarArgs& b,
2563  const IntArgs& s, const IntArgs& c,
2564  IntConLevel icl=ICL_DEF);
2565 
2566 
2585  GECODE_INT_EXPORT void
2586  nooverlap(Home home,
2587  const IntVarArgs& x, const IntArgs& w,
2588  const IntVarArgs& y, const IntArgs& h,
2589  IntConLevel icl=ICL_DEF);
2603  GECODE_INT_EXPORT void
2604  nooverlap(Home home,
2605  const IntVarArgs& x, const IntArgs& w,
2606  const IntVarArgs& y, const IntArgs& h,
2607  const BoolVarArgs& o,
2608  IntConLevel icl=ICL_DEF);
2625  GECODE_INT_EXPORT void
2626  nooverlap(Home home,
2627  const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2628  const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2629  IntConLevel icl=ICL_DEF);
2647  GECODE_INT_EXPORT void
2648  nooverlap(Home home,
2649  const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2650  const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2651  const BoolVarArgs& o,
2652  IntConLevel icl=ICL_DEF);
2653 
2654 
2660 
2703  GECODE_INT_EXPORT void
2704  cumulatives(Home home, const IntVarArgs& m,
2705  const IntVarArgs& s, const IntVarArgs& p,
2706  const IntVarArgs& e, const IntVarArgs& u,
2707  const IntArgs& c, bool at_most,
2708  IntConLevel icl=ICL_DEF);
2713  GECODE_INT_EXPORT void
2714  cumulatives(Home home, const IntArgs& m,
2715  const IntVarArgs& s, const IntVarArgs& p,
2716  const IntVarArgs& e, const IntVarArgs& u,
2717  const IntArgs& c, bool at_most,
2718  IntConLevel icl=ICL_DEF);
2723  GECODE_INT_EXPORT void
2724  cumulatives(Home home, const IntVarArgs& m,
2725  const IntVarArgs& s, const IntArgs& p,
2726  const IntVarArgs& e, const IntVarArgs& u,
2727  const IntArgs& c, bool at_most,
2728  IntConLevel icl=ICL_DEF);
2733  GECODE_INT_EXPORT void
2734  cumulatives(Home home, const IntArgs& m,
2735  const IntVarArgs& s, const IntArgs& p,
2736  const IntVarArgs& e, const IntVarArgs& u,
2737  const IntArgs& c, bool at_most,
2738  IntConLevel icl=ICL_DEF);
2743  GECODE_INT_EXPORT void
2744  cumulatives(Home home, const IntVarArgs& m,
2745  const IntVarArgs& s, const IntVarArgs& p,
2746  const IntVarArgs& e, const IntArgs& u,
2747  const IntArgs& c, bool at_most,
2748  IntConLevel icl=ICL_DEF);
2753  GECODE_INT_EXPORT void
2754  cumulatives(Home home, const IntArgs& m,
2755  const IntVarArgs& s, const IntVarArgs& p,
2756  const IntVarArgs& e, const IntArgs& u,
2757  const IntArgs& c, bool at_most,
2758  IntConLevel icl=ICL_DEF);
2763  GECODE_INT_EXPORT void
2764  cumulatives(Home home, const IntVarArgs& m,
2765  const IntVarArgs& s, const IntArgs& p,
2766  const IntVarArgs& e, const IntArgs& u,
2767  const IntArgs& c, bool at_most,
2768  IntConLevel icl=ICL_DEF);
2773  GECODE_INT_EXPORT void
2774  cumulatives(Home home, const IntArgs& m,
2775  const IntVarArgs& s, const IntArgs& p,
2776  const IntVarArgs& e, const IntArgs& u,
2777  const IntArgs& c, bool at_most,
2778  IntConLevel icl=ICL_DEF);
2779 
2798  GECODE_INT_EXPORT void
2799  unary(Home home, const IntVarArgs& s, const IntArgs& p,
2800  IntConLevel icl=ICL_DEF);
2801 
2822  GECODE_INT_EXPORT void
2823  unary(Home home, const IntVarArgs& s, const IntArgs& p,
2824  const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2825 
2854  GECODE_INT_EXPORT void
2855  unary(Home home, const TaskTypeArgs& t,
2856  const IntVarArgs& flex, const IntArgs& fix, IntConLevel icl=ICL_DEF);
2857 
2888  GECODE_INT_EXPORT void
2889  unary(Home home, const TaskTypeArgs& t,
2890  const IntVarArgs& flex, const IntArgs& fix,
2891  const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2892 
2912  GECODE_INT_EXPORT void
2913  unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
2914  const IntVarArgs& e, IntConLevel icl=ICL_DEF);
2915 
2937  GECODE_INT_EXPORT void
2938  unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
2939  const IntVarArgs& e, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
2940 
2975  GECODE_INT_EXPORT void
2976  cumulative(Home home, int c, const TaskTypeArgs& t,
2977  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2978  IntConLevel icl=ICL_DEF);
2979 
2980 
2985  GECODE_INT_EXPORT void
2986  cumulative(Home home, IntVar c, const TaskTypeArgs& t,
2987  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
2988  IntConLevel icl=ICL_DEF);
2989 
3026  GECODE_INT_EXPORT void
3027  cumulative(Home home, int c, const TaskTypeArgs& t,
3028  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3029  const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
3030 
3034  GECODE_INT_EXPORT void
3035  cumulative(Home home, IntVar c, const TaskTypeArgs& t,
3036  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3037  const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
3038 
3063  GECODE_INT_EXPORT void
3064  cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
3065  const IntArgs& u, IntConLevel icl=ICL_DEF);
3066 
3070  GECODE_INT_EXPORT void
3071  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
3072  const IntArgs& u, IntConLevel icl=ICL_DEF);
3073 
3100  GECODE_INT_EXPORT void
3101  cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
3102  const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
3103 
3107  GECODE_INT_EXPORT void
3108  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
3109  const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
3110 
3139  GECODE_INT_EXPORT void
3140  cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
3141  const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
3142 
3146  GECODE_INT_EXPORT void
3147  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
3148  const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
3149 
3180  GECODE_INT_EXPORT void
3181  cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
3182  const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
3183  IntConLevel icl=ICL_DEF);
3184 
3188  GECODE_INT_EXPORT void
3189  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
3190  const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
3191  IntConLevel icl=ICL_DEF);
3193 
3194 
3214  GECODE_INT_EXPORT void
3215  circuit(Home home, const IntVarArgs& x,
3216  IntConLevel icl=ICL_DEF);
3232  GECODE_INT_EXPORT void
3233  circuit(Home home, int offset, const IntVarArgs& x,
3234  IntConLevel icl=ICL_DEF);
3256  GECODE_INT_EXPORT void
3257  circuit(Home home,
3258  const IntArgs& c,
3259  const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3260  IntConLevel icl=ICL_DEF);
3283  GECODE_INT_EXPORT void
3284  circuit(Home home,
3285  const IntArgs& c, int offset,
3286  const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3287  IntConLevel icl=ICL_DEF);
3306  GECODE_INT_EXPORT void
3307  circuit(Home home,
3308  const IntArgs& c,
3309  const IntVarArgs& x, IntVar z,
3310  IntConLevel icl=ICL_DEF);
3331  GECODE_INT_EXPORT void
3332  circuit(Home home,
3333  const IntArgs& c, int offset,
3334  const IntVarArgs& x, IntVar z,
3335  IntConLevel icl=ICL_DEF);
3351  GECODE_INT_EXPORT void
3352  path(Home home, const IntVarArgs& x, IntVar s, IntVar e,
3353  IntConLevel icl=ICL_DEF);
3371  GECODE_INT_EXPORT void
3372  path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e,
3373  IntConLevel icl=ICL_DEF);
3396  GECODE_INT_EXPORT void
3397  path(Home home,
3398  const IntArgs& c,
3399  const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3400  IntConLevel icl=ICL_DEF);
3425  GECODE_INT_EXPORT void
3426  path(Home home,
3427  const IntArgs& c, int offset,
3428  const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3429  IntConLevel icl=ICL_DEF);
3450  GECODE_INT_EXPORT void
3451  path(Home home,
3452  const IntArgs& c,
3453  const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3454  IntConLevel icl=ICL_DEF);
3477  GECODE_INT_EXPORT void
3478  path(Home home,
3479  const IntArgs& c, int offset,
3480  const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3481  IntConLevel icl=ICL_DEF);
3483 
3484 
3485 
3494  GECODE_INT_EXPORT void
3496  wait(Home home, IntVar x, void (*c)(Space& home),
3497  IntConLevel icl=ICL_DEF);
3499  GECODE_INT_EXPORT void
3500  wait(Home home, BoolVar x, void (*c)(Space& home),
3501  IntConLevel icl=ICL_DEF);
3503  GECODE_INT_EXPORT void
3504  wait(Home home, const IntVarArgs& x, void (*c)(Space& home),
3505  IntConLevel icl=ICL_DEF);
3507  GECODE_INT_EXPORT void
3508  wait(Home home, const BoolVarArgs& x, void (*c)(Space& home),
3509  IntConLevel icl=ICL_DEF);
3511  GECODE_INT_EXPORT void
3512  when(Home home, BoolVar x,
3513  void (*t)(Space& home), void (*e)(Space& home)= NULL,
3514  IntConLevel icl=ICL_DEF);
3516 
3517 
3542  GECODE_INT_EXPORT void
3543  unshare(Home home, IntVarArgs& x,
3544  IntConLevel icl=ICL_DEF);
3546  GECODE_INT_EXPORT void
3547  unshare(Home home, BoolVarArgs& x,
3548  IntConLevel icl=ICL_DEF);
3550 
3551 }
3552 
3553 namespace Gecode {
3554 
3568  typedef bool (*IntBranchFilter)(const Space& home, IntVar x, int i);
3577  typedef bool (*BoolBranchFilter)(const Space& home, BoolVar x, int i);
3578 
3588  typedef double (*IntBranchMerit)(const Space& home, IntVar x, int i);
3598  typedef double (*BoolBranchMerit)(const Space& home, BoolVar x, int i);
3599 
3610  typedef int (*IntBranchVal)(const Space& home, IntVar x, int i);
3621  typedef int (*BoolBranchVal)(const Space& home, BoolVar x, int i);
3622 
3634  typedef void (*IntBranchCommit)(Space& home, unsigned int a,
3635  IntVar x, int i, int n);
3647  typedef void (*BoolBranchCommit)(Space& home, unsigned int a,
3648  BoolVar x, int i, int n);
3649 }
3650 
3652 
3653 namespace Gecode {
3654 
3660  class IntAFC : public AFC {
3661  public:
3669  IntAFC(void);
3671  IntAFC(const IntAFC& a);
3673  IntAFC& operator =(const IntAFC& a);
3675  IntAFC(Home home, const IntVarArgs& x, double d=1.0);
3677  IntAFC(Home home, const BoolVarArgs& x, double d=1.0);
3685  void init(Home, const IntVarArgs& x, double d=1.0);
3693  void init(Home, const BoolVarArgs& x, double d=1.0);
3694  };
3695 
3696 }
3697 
3698 #include <gecode/int/branch/afc.hpp>
3699 
3700 namespace Gecode {
3701 
3707  class IntActivity : public Activity {
3708  public:
3716  IntActivity(void);
3718  IntActivity(const IntActivity& a);
3720  IntActivity& operator =(const IntActivity& a);
3729  IntActivity(Home home, const IntVarArgs& x, double d=1.0,
3730  IntBranchMerit bm=NULL);
3739  IntActivity(Home home, const BoolVarArgs& x, double d=1.0,
3740  BoolBranchMerit bm=NULL);
3752  GECODE_INT_EXPORT void
3753  init(Home home, const IntVarArgs& x, double d=1.0,
3754  IntBranchMerit bm=NULL);
3766  GECODE_INT_EXPORT void
3767  init(Home home, const BoolVarArgs& x, double d=1.0,
3768  BoolBranchMerit bm=NULL);
3769  };
3770 
3771 }
3772 
3774 
3775 namespace Gecode {
3776 
3778  typedef void (*IntVarValPrint)(const Space &home, const BrancherHandle& bh,
3779  unsigned int a,
3780  IntVar x, int i, const int& n,
3781  std::ostream& o);
3782 
3784  typedef void (*BoolVarValPrint)(const Space &home, const BrancherHandle& bh,
3785  unsigned int a,
3786  BoolVar x, int i, const int& n,
3787  std::ostream& o);
3788 
3789 }
3790 
3791 namespace Gecode {
3792 
3798  class IntVarBranch : public VarBranch {
3799  public:
3801  enum Select {
3802  SEL_NONE = 0,
3824 
3848  };
3849  protected:
3852  public:
3854  IntVarBranch(void);
3856  IntVarBranch(Rnd r);
3860  IntVarBranch(Select s, double d, BranchTbl t);
3868  Select select(void) const;
3870  void expand(Home home, const IntVarArgs& x);
3872  void expand(Home home, const BoolVarArgs& x);
3873  };
3874 
3880  IntVarBranch INT_VAR_NONE(void);
3897  IntVarBranch INT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=NULL);
3901  IntVarBranch INT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=NULL);
3905  IntVarBranch INT_VAR_ACTIVITY_MIN(double d=1.0, BranchTbl tbl=NULL);
3909  IntVarBranch INT_VAR_ACTIVITY_MAX(double d=1.0, BranchTbl tbl=NULL);
3929  IntVarBranch INT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=NULL);
3933  IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=NULL);
3969 
3970 }
3971 
3972 #include <gecode/int/branch/var.hpp>
3973 
3974 namespace Gecode {
3975 
3981  class IntValBranch : public ValBranch {
3982  public:
3984  enum Select {
4000  };
4001  protected:
4006  public:
4010  IntValBranch(Rnd r);
4016  Select select(void) const;
4018  IntSharedArray values(void) const;
4019  };
4020 
4026  IntValBranch INT_VAL_MIN(void);
4029  IntValBranch INT_VAL_MED(void);
4031  IntValBranch INT_VAL_MAX(void);
4069 
4070 }
4071 
4072 #include <gecode/int/branch/val.hpp>
4073 
4074 namespace Gecode {
4075 
4081  class IntAssign : public ValBranch {
4082  public:
4084  enum Select {
4090  };
4091  protected:
4094  public:
4096  IntAssign(Select s = SEL_MIN);
4098  IntAssign(Rnd r);
4102  Select select(void) const;
4103  };
4104 
4110  IntAssign INT_ASSIGN_MIN(void);
4113  IntAssign INT_ASSIGN_MED(void);
4115  IntAssign INT_ASSIGN_MAX(void);
4133 
4134 }
4135 
4137 
4138 namespace Gecode {
4144  GECODE_INT_EXPORT BrancherHandle
4145  branch(Home home, const IntVarArgs& x,
4146  IntVarBranch vars, IntValBranch vals,
4147  IntBranchFilter bf=NULL,
4148  IntVarValPrint vvp=NULL);
4154  GECODE_INT_EXPORT BrancherHandle
4155  branch(Home home, const IntVarArgs& x,
4156  TieBreak<IntVarBranch> vars, IntValBranch vals,
4157  IntBranchFilter bf=NULL,
4158  IntVarValPrint vvp=NULL);
4164  GECODE_INT_EXPORT BrancherHandle
4165  branch(Home home, IntVar x, IntValBranch vals,
4166  IntVarValPrint vvp=NULL);
4172  GECODE_INT_EXPORT BrancherHandle
4173  branch(Home home, const BoolVarArgs& x,
4174  IntVarBranch vars, IntValBranch vals,
4175  BoolBranchFilter bf=NULL,
4176  BoolVarValPrint vvp=NULL);
4182  GECODE_INT_EXPORT BrancherHandle
4183  branch(Home home, const BoolVarArgs& x,
4184  TieBreak<IntVarBranch> vars, IntValBranch vals,
4185  BoolBranchFilter bf=NULL,
4186  BoolVarValPrint vvp=NULL);
4192  GECODE_INT_EXPORT BrancherHandle
4193  branch(Home home, BoolVar x, IntValBranch vals,
4194  BoolVarValPrint vvp=NULL);
4195 
4201  GECODE_INT_EXPORT BrancherHandle
4202  assign(Home home, const IntVarArgs& x, IntAssign vals,
4203  IntBranchFilter ibf=NULL,
4204  IntVarValPrint vvp=NULL);
4210  GECODE_INT_EXPORT BrancherHandle
4211  assign(Home home, IntVar x, IntAssign vals,
4212  IntVarValPrint vvp=NULL);
4218  GECODE_INT_EXPORT BrancherHandle
4219  assign(Home home, const BoolVarArgs& x, IntAssign vals,
4220  BoolBranchFilter bbf=NULL,
4221  BoolVarValPrint vvp=NULL);
4227  GECODE_INT_EXPORT BrancherHandle
4228  assign(Home home, BoolVar x, IntAssign vals,
4229  BoolVarValPrint vvp=NULL);
4230 
4231 }
4232 
4233 namespace Gecode {
4234 
4238  template<class Char, class Traits>
4239  std::basic_ostream<Char,Traits>&
4240  operator <<(std::basic_ostream<Char,Traits>& os, const DFA& d);
4241 
4245  template<class Char, class Traits>
4246  std::basic_ostream<Char,Traits>&
4247  operator <<(std::basic_ostream<Char,Traits>& os, const TupleSet& ts);
4248 
4249 }
4250 
4251 // LDSB-related declarations.
4252 namespace Gecode {
4253 
4254  namespace Int { namespace LDSB {
4255  class SymmetryObject;
4256  }}
4257 
4264  public:
4268  void increment(void);
4270  void decrement(void);
4271  public:
4273  SymmetryHandle(void);
4277  SymmetryHandle(const SymmetryHandle& h);
4279  const SymmetryHandle& operator=(const SymmetryHandle& h);
4281  ~SymmetryHandle(void);
4282  };
4283  class Symmetries;
4285  template<>
4287  public:
4291  };
4292 
4299  class Symmetries : public ArgArray<SymmetryHandle> {};
4301  // If this is instead a typedef, strange things happen with the
4302  // overloading of the "branch" function.
4303 
4305  GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const IntVarArgs& x);
4307  GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const BoolVarArgs& x);
4309  GECODE_INT_EXPORT SymmetryHandle VariableSymmetry(const IntVarArgs& x,
4310  const IntArgs& indices);
4312  GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(const IntArgs& v);
4314  GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(const IntSet& v);
4316  GECODE_INT_EXPORT SymmetryHandle ValueSymmetry(IntVar vars);
4323  SymmetryHandle VariableSequenceSymmetry(const IntVarArgs& x, int ss);
4330  SymmetryHandle VariableSequenceSymmetry(const BoolVarArgs& x, int ss);
4337  SymmetryHandle ValueSequenceSymmetry(const IntArgs& v, int ss);
4338 
4340  GECODE_INT_EXPORT SymmetryHandle values_reflect(int lower, int upper);
4342  GECODE_INT_EXPORT SymmetryHandle values_reflect(IntVar x);
4344 
4356  GECODE_INT_EXPORT BrancherHandle
4357  branch(Home home, const IntVarArgs& x,
4358  IntVarBranch vars, IntValBranch vals,
4359  const Symmetries& syms,
4360  IntBranchFilter bf=NULL, IntVarValPrint vvp=NULL);
4372  GECODE_INT_EXPORT BrancherHandle
4373  branch(Home home, const IntVarArgs& x,
4374  TieBreak<IntVarBranch> vars, IntValBranch vals,
4375  const Symmetries& syms,
4376  IntBranchFilter bf=NULL, IntVarValPrint vvp=NULL);
4388  GECODE_INT_EXPORT BrancherHandle
4389  branch(Home home, const BoolVarArgs& x,
4390  IntVarBranch vars, IntValBranch vals,
4391  const Symmetries& syms,
4392  BoolBranchFilter bf=NULL, BoolVarValPrint vvp=NULL);
4404  GECODE_INT_EXPORT BrancherHandle
4405  branch(Home home, const BoolVarArgs& x,
4406  TieBreak<IntVarBranch> vars, IntValBranch vals,
4407  const Symmetries& syms,
4408  BoolBranchFilter bf=NULL, BoolVarValPrint vvp=NULL);
4409 }
4410 
4411 #endif
4412 
4413 // IFDEF: GECODE_HAS_INT_VARS
4414 // STATISTICS: int-post
4415 
Value iterator for integer variables.
Definition: int.hh:469
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl)
Select variable with smallest degree divided by domain size.
Definition: var.hpp:222
static IntArgs create(int n, int start, int inc=1)
Allocate array with n elements such that for all .
Definition: array.hpp:72
IntVar(void)
Default constructor.
Definition: int.hpp:51
With smallest max-regret.
Definition: int.hh:3841
Transitions(const DFA &d)
Initialize to all transitions of DFA d.
Definition: dfa.hpp:173
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: int.hpp:70
IntValBranch INT_VAL_RANGE_MIN(void)
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Definition: val.hpp:98
With lowest activity.
Definition: int.hh:3810
IntVarArgs(const VarArray< IntVar > &a)
Initialize from variable array a (copy elements)
Definition: int.hh:647
Select smallest value.
Definition: int.hh:4085
void cumulative(Home home, Cap c, const TaskTypeArgs &t, const IntVarArgs &s, const IntArgs &p, const IntArgs &u, IntConLevel icl)
Definition: cumulative.cpp:48
int symbol
symbol
Definition: int.hh:1890
IntValBranch(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition: val.hpp:41
Variables as interfaces to variable implementations.
Definition: var.hpp:51
NodeType t
Type of node.
Definition: bool-expr.cpp:234
IntVarBranch INT_VAR_NONE(void)
Select first unassigned variable.
Definition: var.hpp:108
bool(* BoolBranchFilter)(const Space &home, BoolVar x, int i)
Branch filter function type for Boolean variables.
Definition: int.hh:3577
IntVarArray(void)
Default constructor (array of size 0)
Definition: array.hpp:80
IntAFC(void)
Construct as not yet initialized.
Definition: afc.hpp:41
IntVarBranch INT_VAR_MERIT_MAX(IntBranchMerit bm, BranchTbl tbl)
Select variable with highest merit according to branch merit function bm.
Definition: var.hpp:130
Select s
Which variable to select.
Definition: int.hh:3851
IntConLevel
Consistency levels for integer propagators.
Definition: int.hh:937
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:96
Select all values starting from smallest.
Definition: int.hh:3994
The shared handle.
Definition: core.hpp:79
int min(void) const
Minimum domain element.
Definition: tuple-set.hpp:155
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatNum c)
Post propagator for .
Definition: linear.cpp:45
void finalize(void)
Finalize tuple set.
Definition: tuple-set.hpp:111
With largest min-regret.
Definition: int.hh:3835
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
TaskType
Type of task for scheduling constraints.
Definition: int.hh:949
int med(void) const
Return median of domain (greatest element not greater than the median)
Definition: bool.hpp:71
Inverse implication for reification.
Definition: int.hh:847
ReifyMode mode(void) const
Return reification mode.
Definition: reify.hpp:60
BoolVarArray(void)
Default constructor (array of size 0)
Definition: array.hpp:96
With smallest degree divided by domain size.
Definition: int.hh:3818
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntConLevel icl)
Post propagator for .
Definition: arithmetic.cpp:213
int max(void) const
Return maximum of domain.
Definition: int.hpp:74
Range iterator for integer sets.
Definition: int.hh:271
BoolVarArgs(const VarArray< BoolVar > &a)
Initialize from variable array a (copy elements)
Definition: int.hh:701
Iterator for DFA symbols.
Definition: int.hh:1921
int final_fst(void) const
Return the number of the first final state.
Definition: dfa.hpp:129
IntSetValues(void)
Default constructor.
Definition: int-set-1.hpp:220
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition: arithmetic.cpp:218
BoolVar var(void) const
Return Boolean control variable.
Definition: reify.hpp:52
int o_state(void) const
Return out-state of current transition.
Definition: dfa.hpp:219
Reify(void)
Default constructor without proper initialization.
Definition: reify.hpp:46
bool in(int n) const
Return whether n is included in the set.
Definition: int-set-1.hpp:140
Select values greater than mean of smallest and largest value.
Definition: int.hh:3990
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl)
Select variable with largest degree divided by domain size.
Definition: var.hpp:227
int final_lst(void) const
Return the number of the last final state.
Definition: dfa.hpp:135
void operator++(void)
Move iterator to next range (if possible)
Definition: int-set-1.hpp:194
Argument array for primtive types.
Definition: array.hpp:640
int min(void) const
Return minimum of entire set.
Definition: int-set-1.hpp:149
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Definition: int.hh:3991
BoolOpType
Operation types for Booleans.
Definition: int.hh:916
bool zero(void) const
Test whether domain is zero.
Definition: bool.hpp:107
Which values to select for branching first.
Definition: int.hh:3981
int arity(void) const
Arity of tuple set.
Definition: tuple-set.hpp:134
BoolVarArgs(const BoolVarArgs &a)
Initialize from variable argument array a (copy elements)
Definition: int.hh:699
Symbols(const DFA &d)
Initialize to symbols of DFA d.
Definition: dfa.hpp:229
int(* BoolBranchVal)(const Space &home, BoolVar x, int i)
Branch value function type for Boolean variables.
Definition: int.hh:3621
Which variable to select for branching.
Definition: int.hh:3798
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:57
int excess
Excess storage.
Definition: int.hh:2048
Value propagation or consistency (naive)
Definition: int.hh:938
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl)
Select variable with largest max-regret.
Definition: var.hpp:287
void abs(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition: arithmetic.cpp:49
IntAssign INT_ASSIGN_MED(void)
Select greatest value not greater than the median.
Definition: assign.hpp:64
Handle for brancher.
Definition: core.hpp:1157
Less or equal ( )
Definition: int.hh:906
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
Definition: arithmetic.cpp:126
Make a default decision.
Definition: int.hh:1983
Select all values starting from largest.
Definition: int.hh:3995
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
Definition: arithmetic.cpp:117
void init(const IntSet &s)
Initialize with values for s.
Definition: int-set-1.hpp:229
bool normalize(Term< View > *t, int &n, Term< View > *&t_p, int &n_p, Term< View > *&t_n, int &n_n, int &g)
Normalize linear integer constraints.
Definition: post.hpp:119
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: bool.hpp:85
Conjunction.
Definition: int.hh:917
With smallest min-regret.
Definition: int.hh:3829
Select select(void) const
Return selection strategy.
Definition: assign.hpp:53
bool operator()(void) const
Test whether iterator still at a symbol.
Definition: dfa.hpp:240
IntAssign(Select s=SEL_MIN)
Initialize with selection strategy s.
Definition: assign.hpp:41
void operator++(void)
Move iterator to next transition.
Definition: dfa.hpp:204
int * Tuple
Type of a tuple.
Definition: int.hh:2028
BoolVarArgs(const std::vector< BoolVar > &a)
Initialize from vector a.
Definition: int.hh:704
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition: dom.cpp:44
Collection of symmetries.
Definition: int.hh:4300
IntVarBranch INT_VAR_SIZE_MIN(BranchTbl tbl)
Select variable with smallest domain size.
Definition: var.hpp:212
IntVarBranch INT_VAR_MIN_MIN(BranchTbl tbl)
Select variable with smallest min.
Definition: var.hpp:192
IntVarBranch INT_VAR_REGRET_MAX_MIN(BranchTbl tbl)
Select variable with smallest max-regret.
Definition: var.hpp:282
Implementation of a symmetry at the modelling level.
Definition: ldsb.hh:110
Select value according to user-defined functions.
Definition: int.hh:3993
IntValBranch INT_VAL_RANGE_MAX(void)
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Definition: val.hpp:103
void nonnegative(int n, const char *l)
Check whether n is in range and nonnegative, otherwise throw out of limits with information l...
Definition: limits.hpp:72
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: int.hpp:88
IntVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
Definition: int.hh:652
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition: int-set-1.hpp:198
Implication.
Definition: int.hh:919
Select values not greater than mean of smallest and largest value.
Definition: int.hh:3989
Integer variable array.
Definition: int.hh:741
Select select(void) const
Return selection strategy.
Definition: val.hpp:57
bool range(void) const
Test whether domain is a range.
Definition: bool.hpp:98
void(* BoolVarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int a, BoolVar x, int i, const int &n, std::ostream &o)
Function type for printing branching alternatives for Boolean variables.
Definition: int.hh:3784
IntVarArgs(const std::vector< IntVar > &a)
Initialize from vector a.
Definition: int.hh:649
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntConLevel icl)
Post propagator such that x forms a Hamiltonian path.
Definition: circuit.cpp:128
IntVarBranch INT_VAR_ACTIVITY_MAX(double d, BranchTbl tbl)
Select variable with highest activity with decay factor d.
Definition: var.hpp:182
Select s
Which value to select.
Definition: int.hh:4005
Greater ( )
Definition: int.hh:909
bool(* IntBranchFilter)(const Space &home, IntVar x, int i)
Branch filter function type for integer variables.
Definition: int.hh:3568
ArgArray< IntSet > IntSetArgs
Passing set arguments.
Definition: int.hh:598
const int max
Largest allowed integer value.
Definition: int.hh:113
With smallest min.
Definition: int.hh:3812
unsigned int width(void) const
Return width of set (distance between maximum and minimum)
Definition: int-set-1.hpp:167
Computation spaces.
Definition: core.hpp:1362
int tuples(void) const
Number of tuples.
Definition: tuple-set.hpp:141
Greater or equal ( )
Definition: int.hh:908
Select select(void) const
Return selection strategy.
Definition: var.hpp:69
Select s
Which value to select.
Definition: int.hh:4093
void init(const IntSet &s)
Initialize with ranges for set s.
Definition: int-set-1.hpp:181
With highest merit.
Definition: int.hh:3805
int i_state
input state
Definition: int.hh:1889
Exclusive or.
Definition: int.hh:921
const int min
Smallest allowed integer value.
Definition: int.hh:115
double(* IntBranchMerit)(const Space &home, IntVar x, int i)
Branch merit function type for integer variables.
Definition: int.hh:3588
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl)
Select variable with largest min-regret.
Definition: var.hpp:277
IntVarArgs(int n)
Allocate array with n elements.
Definition: int.hh:643
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntConLevel)
Post propagator for .
Definition: arithmetic.cpp:140
IntVarBranch(void)
Initialize with strategy SEL_NONE.
Definition: var.hpp:41
int(* IntBranchVal)(const Space &home, IntVar x, int i)
Branch value function type for integer variables.
Definition: int.hh:3610
int val(void) const
Return assigned value.
Definition: bool.hpp:61
Range iterator for integer variables
Definition: int.hh:452
IntAssign INT_ASSIGN_MIN(void)
Select smallest value.
Definition: assign.hpp:59
IntValBranch INT_VAL_RND(Rnd r)
Select random value.
Definition: val.hpp:83
Gecode::IntSet d(v, 7)
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
Definition: limits.hpp:111
With largest max.
Definition: int.hh:3815
With largest accumulated failure count.
Definition: int.hh:3809
Select
Which value selection.
Definition: int.hh:3984
Reify imp(BoolVar x)
Use implication for reification.
Definition: reify.hpp:77
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntConLevel)
Post propagator for .
Definition: sequence.cpp:51
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntConLevel)
Post propagator for .
Definition: arithmetic.cpp:114
Gecode::FloatVal c(-8, 8)
void when(Home home, BoolVar x, void(*t)(Space &home), void(*e)(Space &home), IntConLevel)
Execute t (then) when x is assigned one, and e (else) otherwise.
Definition: exec.cpp:74
Select value nearest to a given value, use smaller one in case of ties.
Definition: int.hh:3996
SymmetryHandle VariableSymmetry(const IntVarArgs &vars)
Variables in x are interchangeable.
Definition: ldsb.cpp:66
With highest activity.
Definition: int.hh:3811
Deterministic finite automaton (DFA)
Definition: int.hh:1881
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
Select greatest value not greater than the median.
Definition: int.hh:4086
IntVarBranch INT_VAR_AFC_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count with decay factor d.
Definition: var.hpp:162
Gecode::IntArgs i(4, 1, 2, 3, 4)
Class for AFC (accumulated failure count) management.
Definition: afc.hpp:44
unsigned int n_symbols(void) const
Return the number of symbols.
Definition: dfa.hpp:111
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
Equality ( )
Definition: int.hh:904
BoolVar(void)
Default constructor.
Definition: bool.hpp:52
Select
Which variable selection.
Definition: int.hh:3801
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
Definition: var.hpp:147
Argument array for non-primitive types.
Definition: array.hpp:727
IntVarArgs(void)
Allocate empty array.
Definition: int.hh:641
const long long int llmin
Smallest allowed long long integer value.
Definition: int.hh:121
IntArgs(void)
Allocate empty array.
Definition: array.hpp:46
IntVarBranch INT_VAR_ACTIVITY_MIN(double d, BranchTbl tbl)
Select variable with lowest activity with decay factor d.
Definition: var.hpp:172
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: int.hpp:92
Tuple ** last
Initial last structure.
Definition: int.hh:2054
Prefer speed over memory consumption.
Definition: int.hh:1984
A reference-counted pointer to a SymmetryObject.
Definition: int.hh:4263
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
Definition: assign.hpp:74
IntRelType
Relation types for integers.
Definition: int.hh:903
IntVarValues(void)
Default constructor.
Definition: int.hpp:128
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
int ranges(void) const
Return number of ranges of the specification.
Definition: int-set-1.hpp:134
With smallest max.
Definition: int.hh:3814
SymmetryHandle ValueSequenceSymmetry(const IntArgs &vs, int ss)
Value sequences in v of size ss are interchangeable.
Definition: ldsb.cpp:106
int i_state(void) const
Return in-state of current transition.
Definition: dfa.hpp:209
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition: arithmetic.cpp:103
With smallest accumulated failure count.
Definition: int.hh:3808
void(* IntBranchCommit)(Space &home, unsigned int a, IntVar x, int i, int n)
Branch commit function type for integer variables.
Definition: int.hh:3634
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
Definition: assign.hpp:69
unsigned int size(void) const
Return size (cardinality) of domain.
Definition: int.hpp:84
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, int n, IntConLevel)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
Definition: bool.cpp:824
void(* BoolBranchCommit)(Space &home, unsigned int a, BoolVar x, int i, int n)
Branch commit function type for Boolean variables.
Definition: int.hh:3647
bool one(void) const
Test whether domain is one.
Definition: bool.hpp:111
Recording AFC information for integer and Boolean variables.
Definition: int.hh:3660
With largest degree.
Definition: int.hh:3807
With smallest degree.
Definition: int.hh:3806
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Definition: val.hpp:68
Specification of a DFA transition.
Definition: int.hh:1887
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition: arithmetic.cpp:110
With largest domain size.
Definition: int.hh:3817
Value iterator from range iterator.
Select smallest value.
Definition: int.hh:3985
unsigned int max_degree(void) const
Return maximal degree (in-degree and out-degree) of any state.
Definition: dfa.hpp:123
Reification specification.
Definition: int.hh:854
SymmetryHandle ValueSymmetry(const IntArgs &vs)
Values in v are interchangeable.
Definition: ldsb.cpp:85
IntValBranch INT_VAL_SPLIT_MAX(void)
Select values greater than mean of smallest and largest value.
Definition: val.hpp:93
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl)
Select variable with largest max.
Definition: var.hpp:207
void unshare(Home home, IntVarArgs &x, IntConLevel icl)
Replace multiple variable occurences in x by fresh variables.
Definition: unshare.cpp:133
unsigned int domsize
Domain size.
Definition: int.hh:2052
Range iterator for ranges of integer variable implementation.
Definition: var-imp.hpp:387
IntVarBranch INT_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking)
Definition: var.hpp:113
IntVarBranch INT_VAR_AFC_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count with decay factor d.
Definition: var.hpp:152
IntVarBranch INT_VAR_ACTIVITY_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest activity divided by domain size with decay factor d. ...
Definition: var.hpp:262
IntSharedArray values(void) const
Return shared array of values.
Definition: val.hpp:62
int min(void) const
Return smallest value of range.
Definition: int-set-1.hpp:203
Tuple ** tuples
Tuples index.
Definition: int.hh:2042
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
Definition: limits.hpp:83
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl)
Select variable with largest min.
Definition: var.hpp:197
Tuple operator[](int i) const
Get tuple i.
Definition: tuple-set.hpp:148
void precede(Home home, const IntVarArgs &x, int s, int t, IntConLevel)
Post propagator that s precedes t in x.
Definition: precede.cpp:47
void init(const IntVar &x)
Initialize with ranges for integer variable x.
Definition: int.hpp:117
int min
Minimum and maximum in domain-values.
Definition: int.hh:2050
Integer set initialization.
Definition: int-set-1.hpp:57
int max(void) const
Return maximum of domain.
Definition: bool.hpp:75
bool in(int n) const
Test whether n is contained in domain.
Definition: bool.hpp:102
Select largest value.
Definition: int.hh:3987
Less ( )
Definition: int.hh:907
void(* VoidFunction)(void)
Base type for any function pointer.
Definition: cast.hpp:45
Integer sets.
Definition: int.hh:171
int o_state
output state Default constructor
Definition: int.hh:1891
Select
Which value selection.
Definition: int.hh:4084
Tuple * nullpointer
Pointer to NULL-pointer.
Definition: int.hh:2056
With smallest domain size.
Definition: int.hh:3816
void cumulatives(Home home, const IntVarArgs &m, const IntVarArgs &s, const IntVarArgs &p, const IntVarArgs &e, const IntVarArgs &u, const IntArgs &c, bool at_most, IntConLevel cl)
Post propagators for the cumulatives constraint.
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntConLevel)
Post domain consistent propagator for .
Definition: element.cpp:43
Data stored for a Table.
Definition: int.hh:2034
Select value near to a given value, decrement values first.
Definition: int.hh:3999
IntActivity(void)
Construct as not yet initialized.
Definition: activity.hpp:41
ExtensionalPropKind
Extensional propagation kind.
Definition: int.hh:1982
Reify eqv(BoolVar x)
Use equivalence for reification.
Definition: reify.hpp:73
int n
Number of variables (size)
Definition: array.hpp:89
Disjunction.
Definition: int.hh:918
IntVarArgs(const IntVarArgs &a)
Initialize from variable argument array a (copy elements)
Definition: int.hh:645
IntValBranch INT_VAL_NEAR_MIN(IntSharedArray n)
Try value nearest to a given value for a variable, in case of ties use the smaller value...
Definition: val.hpp:130
bool operator()(void) const
Test whether iterator still at a transition.
Definition: dfa.hpp:199
int * data
Tuples data.
Definition: int.hh:2046
Recording activities for integer and Boolean variables.
Definition: int.hh:3707
Passing integer variables.
Definition: int.hh:636
unsigned int size(void) const
Return size (cardinality) of set.
Definition: int-set-1.hpp:161
With largest degree divided by domain size.
Definition: int.hh:3819
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
Definition: int.hh:1345
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntConLevel)
Post propagator for .
Definition: arithmetic.cpp:180
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, const IntVarArgs &z, IntConLevel)
Post propagator that y is x sorted in increasing order.
Definition: sorted.cpp:43
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
With largest max-regret.
Definition: int.hh:3847
Passing integer arguments.
Definition: int.hh:607
BoolVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
Definition: int.hh:707
Passing Boolean variables.
Definition: int.hh:690
static const IntSet empty
Empty set.
Definition: int.hh:262
double(* BoolBranchMerit)(const Space &home, BoolVar x, int i)
Branch merit function type for Boolean variables.
Definition: int.hh:3598
Tuple * tuple_data
Tuple index data.
Definition: int.hh:2044
int max(void) const
Maximum domain element.
Definition: tuple-set.hpp:162
IntVarBranch INT_VAR_AFC_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest accumulated failure count divided by domain size with decay factor d...
Definition: var.hpp:232
IntSet(void)
Initialize as empty set.
Definition: int-set-1.hpp:47
Boolean variable array.
Definition: int.hh:786
Select random value.
Definition: int.hh:4088
Select value nearest to a given value, use larger one in case of ties.
Definition: int.hh:3997
Boolean integer variables.
Definition: int.hh:491
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
Definition: int-set-1.hpp:211
union Gecode::@518::NNF::@57 u
Union depending on nodetype t.
const int v[7]
Definition: distinct.cpp:207
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:75
Class represeting a set of tuples.
Definition: int.hh:2022
BrancherHandle bh
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
TupleSet(void)
Construct empty tuple set.
Definition: tuple-set.hpp:83
void extensional(Home home, const IntVarArgs &x, DFA dfa, IntConLevel)
Post domain consistent propagator for extensional constraint described by a DFA.
Definition: extensional.cpp:45
IntValBranch INT_VAL_MAX(void)
Select largest value.
Definition: val.hpp:78
Integer view for integer variables.
Definition: view.hpp:129
const int infinity
Infinity for integers.
Definition: int.hh:117
bool finalized(void) const
Is tuple set finalized.
Definition: tuple-set.hpp:127
void init(const IntVar &x)
Initialize with values x.
Definition: int.hpp:137
BoolVarArgs(int n)
Allocate array with n elements.
Definition: int.hh:697
Value branching information.
Definition: branch-val.hpp:44
int n_transitions(void) const
Return the number of transitions.
Definition: dfa.hpp:117
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:135
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Definition: bool.hpp:93
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
Definition: val.hpp:120
Random (uniform, for tie breaking)
Definition: int.hh:3803
Variable branching information.
Definition: branch-var.hpp:55
IntAssign INT_ASSIGN(IntBranchVal v, IntBranchCommit c)
Select value as defined by the value function v and commit function c.
Definition: assign.hpp:79
BrancherHandle assign(Home home, const FloatVarArgs &x, FloatAssign fa, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with value selection vals.
Definition: branch.cpp:113
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Definition: limits.hpp:97
void expand(Home home, const IntVarArgs &x)
Expand decay factor into AFC or activity.
Definition: var.hpp:74
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
int max(void) const
Return largest value of range.
Definition: int-set-1.hpp:207
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntConLevel)
Post propagator for .
Definition: count.cpp:44
IntActivity & operator=(const IntActivity &a)
Assignment operator.
Definition: activity.hpp:48
First unassigned.
Definition: int.hh:3802
DFA(void)
Initialize for DFA accepting the empty word.
Definition: dfa.hpp:97
With largest activity divided by domain size.
Definition: int.hh:3823
Select largest value.
Definition: int.hh:4087
IntValBranch INT_VALUES_MAX(void)
Try all values starting from largest.
Definition: val.hpp:125
IntSharedArray n
Array of values for near strategies.
Definition: int.hh:4003
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
Definition: var.hpp:118
Select random value.
Definition: int.hh:3988
Select value according to user-defined functions.
Definition: int.hh:4089
Integer variables.
Definition: int.hh:350
int symbol(void) const
Return symbol of current transition.
Definition: dfa.hpp:214
With largest min.
Definition: int.hh:3813
void(* IntVarValPrint)(const Space &home, const BrancherHandle &bh, unsigned int a, IntVar x, int i, const int &n, std::ostream &o)
Function type for printing branching alternatives for integer variables.
Definition: int.hh:3778
Which values to select for assignment.
Definition: int.hh:4081
int val(void) const
Return current symbol.
Definition: dfa.hpp:253
#define forceinline
Definition: config.hpp:132
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:47
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
Definition: ldsb.cpp:110
IntVarBranch INT_VAR_AFC_SIZE_MAX(double d, BranchTbl tbl)
Select variable with largest accumulated failure count divided by domain size with decay factor d...
Definition: var.hpp:242
The default consistency for a constraint.
Definition: int.hh:941
IntValBranch INT_VAL_NEAR_MAX(IntSharedArray n)
Try value nearest to a given value for a variable, in case of ties use the larger value...
Definition: val.hpp:135
bool valid(int n)
Return whether n is in range.
Definition: limits.hpp:41
Value iterator for integer sets.
Definition: int.hh:312
int val(void) const
Return assigned value.
Definition: int.hpp:60
Equivalence.
Definition: int.hh:920
IntValBranch INT_VAL_MED(void)
Select greatest value not greater than the median.
Definition: val.hpp:73
Data stored for a DFA.
Definition: dfa.hpp:46
IntVarBranch INT_VAR_ACTIVITY_SIZE_MIN(double d, BranchTbl tbl)
Select variable with smallest activity divided by domain size with decay factor d.
Definition: var.hpp:252
Iterator for DFA transitions (sorted by symbols)
Definition: int.hh:1898
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
Definition: int.hh:4266
PrimArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
Definition: int.hh:960
int n_states(void) const
Return the number of states.
Definition: dfa.hpp:105
void distinct(Home home, const IntVarArgs &x, IntConLevel icl)
Post propagator for for all .
Definition: distinct.cpp:47
The shared object.
Definition: core.hpp:88
void operator++(void)
Move iterator to next symbol.
Definition: dfa.hpp:245
int n
Number of elements.
Definition: array.hpp:524
BoolVarArgs(void)
Allocate empty array.
Definition: int.hh:695
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &vars, int ss)
Variable sequences in x of size ss are interchangeable.
Definition: ldsb.cpp:94
IntVarRanges(void)
Default constructor.
Definition: int.hpp:110
IntAFC & operator=(const IntAFC &a)
Assignment operator.
Definition: afc.hpp:48
const long long int llmax
Largest allowed long long integer value.
Definition: int.hh:119
Select value near to a given value, increment values first.
Definition: int.hh:3998
IntValBranch INT_VAL_NEAR_INC(IntSharedArray n)
Try value larger than a given value for a variable first.
Definition: val.hpp:140
Traits of arrays in Gecode.
Definition: array.hpp:68
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntConLevel)
Post propagator for bin packing.
Definition: bin-packing.cpp:45
Bounds propagation or consistency.
Definition: int.hh:939
IntValBranch INT_VAL_SPLIT_MIN(void)
Select values not greater than mean of smallest and largest value.
Definition: val.hpp:88
int size
Number of Tuples.
Definition: int.hh:2040
Prefer little memory over speed.
Definition: int.hh:1985
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntConLevel)
Post propagator for rectangle packing.
Definition: no-overlap.cpp:55
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
Argument array for variables.
Definition: array.hpp:53
bool none(void) const
Test whether domain is neither zero nor one.
Definition: bool.hpp:115
IntVarBranch INT_VAR_MAX_MIN(BranchTbl tbl)
Select variable with smallest max.
Definition: var.hpp:202
void wait(Home home, FloatVar x, void(*c)(Space &home))
Execute c when x becomes assigned.
Definition: exec.cpp:44
int min(void) const
Return minimum of domain.
Definition: int.hpp:66
Implication for reification.
Definition: int.hh:840
IntValBranch INT_VAL(IntBranchVal v, IntBranchCommit c)
Select value as defined by the value function v and commit function c Uses a commit function as defau...
Definition: val.hpp:108
#define GECODE_VTABLE_EXPORT
Definition: support.hh:76
Disequality ( )
Definition: int.hh:905
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Definition: int.hh:3992
BoolVar x
The Boolean control variable.
Definition: int.hh:857
int min(void) const
Return minimum of domain.
Definition: bool.hpp:67
bool in(int n) const
Test whether n is contained in domain.
Definition: int.hpp:101
BrancherHandle branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf, FloatVarValPrint vvp)
Branch over x with variable selection vars and value selection vals.
Definition: branch.cpp:43
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: int.hpp:80
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Definition: bool.hpp:81
Random number generator.
Definition: rnd.hpp:46
With largest accumulated failure count divided by domain size.
Definition: int.hh:3821
Class for activity management.
Definition: activity.hpp:44
#define GECODE_INT_EXPORT
Definition: int.hh:78
int symbol_min(void) const
Return smallest symbol in DFA.
Definition: dfa.hpp:141
const long long int llinfinity
Infinity for long long integers.
Definition: int.hh:123
int max(void) const
Return maximum of entire set.
Definition: int-set-1.hpp:155
void add(const IntArgs &tuple)
Add tuple to tuple set.
Definition: tuple-set.hpp:98
IntSetRanges(void)
Default constructor.
Definition: int-set-1.hpp:178
int symbol_max(void) const
Return largest symbol in DFA.
Definition: dfa.hpp:148
void circuit(Home home, int offset, const IntVarArgs &x, IntConLevel icl)
Post propagator such that x forms a circuit.
Definition: circuit.cpp:45
void check(int n, const char *l)
Check whether n is in range, otherwise throw out of limits with information l.
Definition: limits.hpp:50
Home class for posting propagators
Definition: core.hpp:717
With smallest activity divided by domain size.
Definition: int.hh:3822
double tbl(const Gecode::Space &, double w, double b)
Test function for tie-break limit function.
Definition: branch.cpp:65
bool range(void) const
Test whether domain is a range.
Definition: int.hpp:97
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Definition: bool.hpp:89
ReifyMode
Mode for reification.
Definition: int.hh:826
void init(Home, const IntVarArgs &x, double d=1.0)
Initialize for integer variables x with decay factor d.
Definition: afc.hpp:63
With smallest accumulated failure count divided by domain size.
Definition: int.hh:3820
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntConLevel)
Post propagator for .
Definition: nvalues.cpp:44
ReifyMode rm
The reification mode.
Definition: int.hh:859
void positive(int n, const char *l)
Check whether n is in range and strictly positive, otherwise throw out of limits with information l...
Definition: limits.hpp:61
Select greatest value not greater than the median.
Definition: int.hh:3986
void member(Home home, const IntVarArgs &x, IntVar y, IntConLevel)
Post domain consistent propagator for .
Definition: member.cpp:43
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
IntValBranch INT_VAL_NEAR_DEC(IntSharedArray n)
Try value smaller than a given value for a variable first.
Definition: val.hpp:145
Domain propagation or consistency.
Definition: int.hh:940
TupleSetI * implementation(void)
Get implementation.
Definition: tuple-set.hpp:91
void init(Home home, const IntVarArgs &x, double d=1.0, IntBranchMerit bm=NULL)
Initialize for integer variables x with decay factor d.
Definition: activity.cpp:55
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl)
Select variable with largest domain size.
Definition: var.hpp:217
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntConLevel icl)
Post propagators for scheduling tasks on unary resources.
Definition: unary.cpp:48
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl)
Select variable with smallest min-regret.
Definition: var.hpp:272
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
Definition: var.hpp:142
int * a
Element array.
Definition: array.hpp:528
Equivalence for reification (default)
Definition: int.hh:833
Reify pmi(BoolVar x)
Use reverse implication for reification.
Definition: reify.hpp:81
Boolean view for Boolean variables.
Definition: view.hpp:1315
Rnd r
Random number generator.
Definition: branch-val.hpp:47
double(* BranchTbl)(const Space &home, double w, double b)
Tie-break limit function.
Definition: branch-var.hpp:49