Generated on Thu Mar 16 2017 03:24:17 for Gecode by doxygen 1.8.13
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: 2016-10-25 12:52:26 +0200 (Tue, 25 Oct 2016) $ by $Author: schulte $
21  * $Revision: 15233 $
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/search.hh>
59 #include <gecode/iter.hh>
60 
61 /*
62  * Configure linking
63  *
64  */
65 #if !defined(GECODE_STATIC_LIBS) && \
66  (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
67 
68 #ifdef GECODE_BUILD_INT
69 #define GECODE_INT_EXPORT __declspec( dllexport )
70 #else
71 #define GECODE_INT_EXPORT __declspec( dllimport )
72 #endif
73 
74 #else
75 
76 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
77 #define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
78 #else
79 #define GECODE_INT_EXPORT
80 #endif
81 
82 #endif
83 
84 // Configure auto-linking
85 #ifndef GECODE_BUILD_INT
86 #define GECODE_LIBRARY_NAME "Int"
88 #endif
89 
101 #include <gecode/int/exception.hpp>
102 
103 namespace Gecode { namespace Int {
104 
112  namespace Limits {
114  const int max = INT_MAX - 1;
116  const int min = -max;
118  const int infinity = max + 1;
120  const long long int llmax = LLONG_MAX - 1;
122  const long long int llmin = -llmax;
124  const long long int llinfinity = llmax + 1;
126  bool valid(int n);
128  bool valid(long long int n);
130  void check(int n, const char* l);
132  void check(long long int n, const char* l);
134  void positive(int n, const char* l);
136  void positive(long long int n, const char* l);
138  void nonnegative(int n, const char* l);
140  void nonnegative(long long int n, const char* l);
142  bool overflow_add(int n, int m);
144  bool overflow_add(long long int n, long long int m);
146  bool overflow_sub(int n, int m);
148  bool overflow_sub(long long int n, long long int m);
150  bool overflow_mul(int n, int m);
152  bool overflow_mul(long long int n, long long int m);
153  }
154 
155 }}
156 
157 #include <gecode/int/limits.hpp>
158 
159 namespace Gecode {
160 
161  class IntSetRanges;
162 
163  template<class I> class IntSetInit;
164 
172  class IntSet : public SharedHandle {
173  friend class IntSetRanges;
174  template<class I> friend class IntSetInit;
175  private:
177  class Range {
178  public:
179  int min, max;
180  };
181  class IntSetObject : public SharedHandle::Object {
182  public:
184  unsigned int size;
186  int n;
188  Range* r;
190  GECODE_INT_EXPORT static IntSetObject* allocate(int m);
192  GECODE_INT_EXPORT SharedHandle::Object* copy(void) const;
194  GECODE_INT_EXPORT bool in(int n) const;
196  GECODE_INT_EXPORT virtual ~IntSetObject(void);
197  };
199  class MinInc;
201  GECODE_INT_EXPORT void normalize(Range* r, int n);
203  GECODE_INT_EXPORT void init(int n, int m);
205  GECODE_INT_EXPORT void init(const int r[], int n);
207  GECODE_INT_EXPORT void init(const int r[][2], int n);
208  public:
210 
211  IntSet(void);
217  IntSet(int n, int m);
219  IntSet(const int r[], int n);
225  IntSet(const int r[][2], int n);
227  template<class I>
228  explicit IntSet(I& i);
230  template<class I>
231  explicit IntSet(const I& i);
233 
235 
236  int ranges(void) const;
239  int min(int i) const;
241  int max(int i) const;
243  unsigned int width(int i) const;
245 
247 
248  bool in(int n) const;
251  unsigned int size(void) const;
253  unsigned int width(void) const;
255  int min(void) const;
257  int max(void) const;
259 
261 
262  GECODE_INT_EXPORT static const IntSet empty;
265  };
266 
272  class IntSetRanges {
273  private:
275  const IntSet::Range* i;
277  const IntSet::Range* e;
278  public:
280 
281  IntSetRanges(void);
284  IntSetRanges(const IntSet& s);
286  void init(const IntSet& s);
288 
290 
291  bool operator ()(void) const;
294  void operator ++(void);
296 
298 
299  int min(void) const;
302  int max(void) const;
304  unsigned int width(void) const;
306  };
307 
313  class IntSetValues : public Iter::Ranges::ToValues<IntSetRanges> {
314  public:
316 
317  IntSetValues(void);
320  IntSetValues(const IntSet& s);
322  void init(const IntSet& s);
324  };
325 
330  template<class Char, class Traits>
331  std::basic_ostream<Char,Traits>&
332  operator <<(std::basic_ostream<Char,Traits>& os, const IntSet& s);
333 
334 }
335 
336 #include <gecode/int/int-set-1.hpp>
337 
338 #include <gecode/int/var-imp.hpp>
339 
340 namespace Gecode {
341 
342  namespace Int {
343  class IntView;
344  }
345 
351  class IntVar : public VarImpVar<Int::IntVarImp> {
352  friend class IntVarArray;
353  friend class IntVarArgs;
354  private:
362  void _init(Space& home, int min, int max);
369  void _init(Space& home, const IntSet& d);
370  public:
372 
373  IntVar(void);
376  IntVar(const IntVar& y);
378  IntVar(const Int::IntView& y);
390  GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
402  GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
404 
406 
407  int min(void) const;
410  int max(void) const;
412  int med(void) const;
420  int val(void) const;
421 
423  unsigned int size(void) const;
425  unsigned int width(void) const;
427  unsigned int regret_min(void) const;
429  unsigned int regret_max(void) const;
431 
433 
434  bool range(void) const;
437  bool in(int n) const;
439  };
440 
445  template<class Char, class Traits>
446  std::basic_ostream<Char,Traits>&
447  operator <<(std::basic_ostream<Char,Traits>& os, const IntVar& x);
448 
454  public:
456 
457  IntVarRanges(void);
460  IntVarRanges(const IntVar& x);
462  void init(const IntVar& x);
464  };
465 
470  class IntVarValues : public Iter::Ranges::ToValues<IntVarRanges> {
471  public:
473 
474  IntVarValues(void);
477  IntVarValues(const IntVar& x);
479  void init(const IntVar& x);
481  };
482 
483  namespace Int {
484  class BoolView;
485  }
486 
492  class BoolVar : public VarImpVar<Int::BoolVarImp> {
493  friend class BoolVarArray;
494  friend class BoolVarArgs;
495  private:
503  void _init(Space& home, int min, int max);
504  public:
506 
507  BoolVar(void);
510  BoolVar(const BoolVar& y);
512  BoolVar(const Int::BoolView& y);
524  GECODE_INT_EXPORT BoolVar(Space& home, int min, int max);
526 
528 
529  int min(void) const;
532  int max(void) const;
534  int med(void) const;
542  int val(void) const;
543 
545  unsigned int size(void) const;
547  unsigned int width(void) const;
549  unsigned int regret_min(void) const;
551  unsigned int regret_max(void) const;
553 
555 
556  bool range(void) const;
559  bool in(int n) const;
561 
563 
564  bool zero(void) const;
567  bool one(void) const;
569  bool none(void) const;
571  };
572 
577  template<class Char, class Traits>
578  std::basic_ostream<Char,Traits>&
579  operator <<(std::basic_ostream<Char,Traits>& os, const BoolVar& x);
580 
581 }
582 
583 
584 #include <gecode/int/view.hpp>
585 #include <gecode/int/propagator.hpp>
586 
587 namespace Gecode {
588 
600 
601 }
602 
604 
605 namespace Gecode {
606 
608  class IntArgs : public PrimArgArray<int> {
609  public:
611 
612  IntArgs(void);
615  explicit IntArgs(int n);
617  IntArgs(const SharedArray<int>& x);
619  IntArgs(const std::vector<int>& x);
621  template<class InputIterator>
622  IntArgs(InputIterator first, InputIterator last);
625  IntArgs(int n, int e0, ...);
627  IntArgs(int n, const int* e);
629  IntArgs(const PrimArgArray<int>& a);
630 
632  static IntArgs create(int n, int start, int inc=1);
634  };
635 
637  class IntVarArgs : public VarArgArray<IntVar> {
638  public:
640 
641  IntVarArgs(void) {}
644  explicit IntVarArgs(int n) : VarArgArray<IntVar>(n) {}
650  IntVarArgs(const std::vector<IntVar>& a) : VarArgArray<IntVar>(a) {}
652  template<class InputIterator>
653  IntVarArgs(InputIterator first, InputIterator last)
654  : VarArgArray<IntVar>(first,last) {}
667  IntVarArgs(Space& home, int n, int min, int max);
680  IntVarArgs(Space& home, int n, const IntSet& s);
682  };
691  class BoolVarArgs : public VarArgArray<BoolVar> {
692  public:
694 
695  BoolVarArgs(void) {}
698  explicit BoolVarArgs(int n) : VarArgArray<BoolVar>(n) {}
703  : VarArgArray<BoolVar>(a) {}
705  BoolVarArgs(const std::vector<BoolVar>& a) : VarArgArray<BoolVar>(a) {}
707  template<class InputIterator>
708  BoolVarArgs(InputIterator first, InputIterator last)
709  : VarArgArray<BoolVar>(first,last) {}
722  BoolVarArgs(Space& home, int n, int min, int max);
724  };
726 
742  class IntVarArray : public VarArray<IntVar> {
743  public:
745 
746  IntVarArray(void);
749  IntVarArray(Space& home, int n);
751  IntVarArray(const IntVarArray& a);
753  IntVarArray(Space& home, const IntVarArgs& a);
766  IntVarArray(Space& home, int n, int min, int max);
779  IntVarArray(Space& home, int n, const IntSet& s);
781  };
782 
787  class BoolVarArray : public VarArray<BoolVar> {
788  public:
790 
791  BoolVarArray(void);
794  BoolVarArray(Space& home, int n);
796  BoolVarArray(const BoolVarArray& a);
798  BoolVarArray(Space& home, const BoolVarArgs& a);
811  BoolVarArray(Space& home, int n, int min, int max);
813  };
814 
815 }
816 
817 #include <gecode/int/int-set-2.hpp>
818 
819 #include <gecode/int/array.hpp>
820 
821 namespace Gecode {
822 
827  enum ReifyMode {
849  };
850 
855  class Reify {
856  protected:
861  public:
863  Reify(void);
865  Reify(BoolVar x, ReifyMode rm=RM_EQV);
867  BoolVar var(void) const;
869  ReifyMode mode(void) const;
871  void var(BoolVar x);
873  void mode(ReifyMode rm);
874  };
875 
880  Reify eqv(BoolVar x);
881 
886  Reify imp(BoolVar x);
887 
892  Reify pmi(BoolVar x);
893 
894 }
895 
896 #include <gecode/int/reify.hpp>
897 
898 namespace Gecode {
899 
904  enum IntRelType {
911  };
912 
917  enum BoolOpType {
923  };
924 
943  IPL_DEF = 0,
944  IPL_VAL = 1,
945  IPL_BND = 2,
946  IPL_DOM = 3,
947  IPL_SPEED = 4,
950  IPL_BASIC = 16,
954  };
955 
958 
961 
964 
965 }
966 
967 #include <gecode/int/ipl.hpp>
968 
969 namespace Gecode {
970 
976  enum TaskType {
977  TT_FIXP, //< Task with fixed processing time
978  TT_FIXS, //< Task with fixed start time
979  TT_FIXE //< Task with fixed end time
980  };
981 
988 
990  template<>
992  public:
993  typedef TaskTypeArgs StorageType;
995  typedef TaskTypeArgs ArgsType;
996  };
997 
998 
1006  GECODE_INT_EXPORT void
1008  dom(Home home, IntVar x, int n,
1009  IntPropLevel ipl=IPL_DEF);
1011  GECODE_INT_EXPORT void
1012  dom(Home home, const IntVarArgs& x, int n,
1013  IntPropLevel ipl=IPL_DEF);
1014 
1016  GECODE_INT_EXPORT void
1017  dom(Home home, IntVar x, int l, int m,
1018  IntPropLevel ipl=IPL_DEF);
1020  GECODE_INT_EXPORT void
1021  dom(Home home, const IntVarArgs& x, int l, int m,
1022  IntPropLevel ipl=IPL_DEF);
1023 
1025  GECODE_INT_EXPORT void
1026  dom(Home home, IntVar x, const IntSet& s,
1027  IntPropLevel ipl=IPL_DEF);
1029  GECODE_INT_EXPORT void
1030  dom(Home home, const IntVarArgs& x, const IntSet& s,
1031  IntPropLevel ipl=IPL_DEF);
1032 
1034  GECODE_INT_EXPORT void
1035  dom(Home home, IntVar x, int n, Reify r,
1036  IntPropLevel ipl=IPL_DEF);
1038  GECODE_INT_EXPORT void
1039  dom(Home home, IntVar x, int l, int m, Reify r,
1040  IntPropLevel ipl=IPL_DEF);
1042  GECODE_INT_EXPORT void
1043  dom(Home home, IntVar x, const IntSet& s, Reify r,
1044  IntPropLevel ipl=IPL_DEF);
1045 
1047  GECODE_INT_EXPORT void
1048  dom(Home home, IntVar x, IntVar d,
1049  IntPropLevel ipl=IPL_DEF);
1051  GECODE_INT_EXPORT void
1052  dom(Home home, BoolVar x, BoolVar d,
1053  IntPropLevel ipl=IPL_DEF);
1055  GECODE_INT_EXPORT void
1056  dom(Home home, const IntVarArgs& x, const IntVarArgs& d,
1057  IntPropLevel ipl=IPL_DEF);
1059  GECODE_INT_EXPORT void
1060  dom(Home home, const BoolVarArgs& x, const BoolVarArgs& d,
1061  IntPropLevel ipl=IPL_DEF);
1063 
1064 
1075  GECODE_INT_EXPORT void
1076  rel(Home home, IntVar x0, IntRelType irt, IntVar x1,
1077  IntPropLevel ipl=IPL_DEF);
1084  GECODE_INT_EXPORT void
1085  rel(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
1086  IntPropLevel ipl=IPL_DEF);
1090  GECODE_INT_EXPORT void
1091  rel(Home home, IntVar x, IntRelType irt, int c,
1092  IntPropLevel ipl=IPL_DEF);
1096  GECODE_INT_EXPORT void
1097  rel(Home home, const IntVarArgs& x, IntRelType irt, int c,
1098  IntPropLevel ipl=IPL_DEF);
1105  GECODE_INT_EXPORT void
1106  rel(Home home, IntVar x0, IntRelType irt, IntVar x1, Reify r,
1107  IntPropLevel ipl=IPL_DEF);
1114  GECODE_INT_EXPORT void
1115  rel(Home home, IntVar x, IntRelType irt, int c, Reify r,
1116  IntPropLevel ipl=IPL_DEF);
1131  GECODE_INT_EXPORT void
1132  rel(Home home, const IntVarArgs& x, IntRelType irt,
1133  IntPropLevel ipl=IPL_DEF);
1148  GECODE_INT_EXPORT void
1149  rel(Home home, const IntVarArgs& x, IntRelType irt, const IntVarArgs& y,
1150  IntPropLevel ipl=IPL_DEF);
1151 
1159  GECODE_INT_EXPORT void
1160  rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1,
1161  IntPropLevel ipl=IPL_DEF);
1165  GECODE_INT_EXPORT void
1166  rel(Home home, BoolVar x0, IntRelType irt, BoolVar x1, Reify r,
1167  IntPropLevel ipl=IPL_DEF);
1171  GECODE_INT_EXPORT void
1172  rel(Home home, const BoolVarArgs& x, IntRelType irt, BoolVar y,
1173  IntPropLevel ipl=IPL_DEF);
1181  GECODE_INT_EXPORT void
1182  rel(Home home, BoolVar x, IntRelType irt, int n,
1183  IntPropLevel ipl=IPL_DEF);
1191  GECODE_INT_EXPORT void
1192  rel(Home home, BoolVar x, IntRelType irt, int n, Reify r,
1193  IntPropLevel ipl=IPL_DEF);
1201  GECODE_INT_EXPORT void
1202  rel(Home home, const BoolVarArgs& x, IntRelType irt, int n,
1203  IntPropLevel ipl=IPL_DEF);
1216  GECODE_INT_EXPORT void
1217  rel(Home home, const BoolVarArgs& x, IntRelType irt, const BoolVarArgs& y,
1218  IntPropLevel ipl=IPL_DEF);
1229  GECODE_INT_EXPORT void
1230  rel(Home home, const BoolVarArgs& x, IntRelType irt,
1231  IntPropLevel ipl=IPL_DEF);
1237  GECODE_INT_EXPORT void
1238  rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2,
1239  IntPropLevel ipl=IPL_DEF);
1248  GECODE_INT_EXPORT void
1249  rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n,
1250  IntPropLevel ipl=IPL_DEF);
1260  GECODE_INT_EXPORT void
1261  rel(Home home, BoolOpType o, const BoolVarArgs& x, BoolVar y,
1262  IntPropLevel ipl=IPL_DEF);
1275  GECODE_INT_EXPORT void
1276  rel(Home home, BoolOpType o, const BoolVarArgs& x, int n,
1277  IntPropLevel ipl=IPL_DEF);
1288  GECODE_INT_EXPORT void
1289  clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1290  BoolVar z, IntPropLevel ipl=IPL_DEF);
1304  GECODE_INT_EXPORT void
1305  clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
1306  int n, IntPropLevel ipl=IPL_DEF);
1313  GECODE_INT_EXPORT void
1314  ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z,
1315  IntPropLevel ipl=IPL_DEF);
1316 
1317 
1329  GECODE_INT_EXPORT void
1330  precede(Home home, const IntVarArgs& x, int s, int t,
1339  GECODE_INT_EXPORT void
1340  precede(Home home, const IntVarArgs& x, const IntArgs& c,
1342 
1343 
1349  GECODE_INT_EXPORT void
1351  member(Home home, const IntVarArgs& x, IntVar y,
1352  IntPropLevel ipl=IPL_DEF);
1354  GECODE_INT_EXPORT void
1355  member(Home home, const BoolVarArgs& x, BoolVar y,
1356  IntPropLevel ipl=IPL_DEF);
1358  GECODE_INT_EXPORT void
1359  member(Home home, const IntVarArgs& x, IntVar y, Reify r,
1360  IntPropLevel ipl=IPL_DEF);
1362  GECODE_INT_EXPORT void
1363  member(Home home, const BoolVarArgs& x, BoolVar y, Reify r,
1364  IntPropLevel ipl=IPL_DEF);
1366 
1367 
1381  GECODE_INT_EXPORT void
1382  element(Home home, IntSharedArray n, IntVar x0, IntVar x1,
1383  IntPropLevel ipl=IPL_DEF);
1389  GECODE_INT_EXPORT void
1390  element(Home home, IntSharedArray n, IntVar x0, BoolVar x1,
1391  IntPropLevel ipl=IPL_DEF);
1397  GECODE_INT_EXPORT void
1398  element(Home home, IntSharedArray n, IntVar x0, int x1,
1399  IntPropLevel ipl=IPL_DEF);
1405  GECODE_INT_EXPORT void
1406  element(Home home, const IntVarArgs& x, IntVar y0, IntVar y1,
1407  IntPropLevel ipl=IPL_DEF);
1413  GECODE_INT_EXPORT void
1414  element(Home home, const IntVarArgs& x, IntVar y0, int y1,
1415  IntPropLevel ipl=IPL_DEF);
1417  GECODE_INT_EXPORT void
1418  element(Home home, const BoolVarArgs& x, IntVar y0, BoolVar y1,
1419  IntPropLevel ipl=IPL_DEF);
1421  GECODE_INT_EXPORT void
1422  element(Home home, const BoolVarArgs& x, IntVar y0, int y1,
1423  IntPropLevel ipl=IPL_DEF);
1424 
1437  GECODE_INT_EXPORT void
1438  element(Home home, IntSharedArray a,
1439  IntVar x, int w, IntVar y, int h, IntVar z,
1440  IntPropLevel ipl=IPL_DEF);
1453  GECODE_INT_EXPORT void
1454  element(Home home, IntSharedArray a,
1455  IntVar x, int w, IntVar y, int h, BoolVar z,
1456  IntPropLevel ipl=IPL_DEF);
1472  GECODE_INT_EXPORT void
1473  element(Home home, const IntVarArgs& a,
1474  IntVar x, int w, IntVar y, int h, IntVar z,
1475  IntPropLevel ipl=IPL_DEF);
1488  GECODE_INT_EXPORT void
1489  element(Home home, const BoolVarArgs& a,
1490  IntVar x, int w, IntVar y, int h, BoolVar z,
1491  IntPropLevel ipl=IPL_DEF);
1493 
1494 
1509  GECODE_INT_EXPORT void
1510  distinct(Home home, const IntVarArgs& x,
1511  IntPropLevel ipl=IPL_DEF);
1524  GECODE_INT_EXPORT void
1525  distinct(Home home, const IntArgs& n, const IntVarArgs& x,
1526  IntPropLevel ipl=IPL_DEF);
1541  GECODE_INT_EXPORT void
1542  distinct(Home home, const BoolVarArgs& b, const IntVarArgs& x,
1543  IntPropLevel ipl=IPL_DEF);
1556  GECODE_INT_EXPORT void
1557  distinct(Home home, const IntVarArgs& x, int c,
1558  IntPropLevel ipl=IPL_DEF);
1560 
1561 
1579  GECODE_INT_EXPORT void
1580  channel(Home home, const IntVarArgs& x, const IntVarArgs& y,
1581  IntPropLevel ipl=IPL_DEF);
1582 
1596  GECODE_INT_EXPORT void
1597  channel(Home home, const IntVarArgs& x, int xoff,
1598  const IntVarArgs& y, int yoff,
1599  IntPropLevel ipl=IPL_DEF);
1600 
1602  GECODE_INT_EXPORT void
1603  channel(Home home, BoolVar x0, IntVar x1,
1604  IntPropLevel ipl=IPL_DEF);
1606  forceinline void
1607  channel(Home home, IntVar x0, BoolVar x1,
1608  IntPropLevel ipl=IPL_DEF) {
1609  channel(home,x1,x0,ipl);
1610  }
1616  GECODE_INT_EXPORT void
1617  channel(Home home, const BoolVarArgs& x, IntVar y, int o=0,
1618  IntPropLevel ipl=IPL_DEF);
1620 
1621 
1638  GECODE_INT_EXPORT void
1639  sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1640  IntPropLevel ipl=IPL_DEF);
1641 
1653  GECODE_INT_EXPORT void
1654  sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
1655  const IntVarArgs& z,
1656  IntPropLevel ipl=IPL_DEF);
1658 
1659 
1678  GECODE_INT_EXPORT void
1679  count(Home home, const IntVarArgs& x, int n, IntRelType irt, int m,
1680  IntPropLevel ipl=IPL_DEF);
1685  GECODE_INT_EXPORT void
1686  count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, int m,
1687  IntPropLevel ipl=IPL_DEF);
1695  GECODE_INT_EXPORT void
1696  count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, int m,
1697  IntPropLevel ipl=IPL_DEF);
1705  GECODE_INT_EXPORT void
1706  count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, int m,
1707  IntPropLevel ipl=IPL_DEF);
1712  GECODE_INT_EXPORT void
1713  count(Home home, const IntVarArgs& x, int n, IntRelType irt, IntVar z,
1714  IntPropLevel ipl=IPL_DEF);
1719  GECODE_INT_EXPORT void
1720  count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType irt, IntVar z,
1721  IntPropLevel ipl=IPL_DEF);
1729  GECODE_INT_EXPORT void
1730  count(Home home, const IntVarArgs& x, IntVar y, IntRelType irt, IntVar z,
1731  IntPropLevel ipl=IPL_DEF);
1739  GECODE_INT_EXPORT void
1740  count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType irt, IntVar z,
1741  IntPropLevel ipl=IPL_DEF);
1742 
1756  GECODE_INT_EXPORT void
1757  count(Home home, const IntVarArgs& x, const IntVarArgs& c,
1758  IntPropLevel ipl=IPL_DEF);
1759 
1773  GECODE_INT_EXPORT void
1774  count(Home home, const IntVarArgs& x, const IntSetArgs& c,
1775  IntPropLevel ipl=IPL_DEF);
1776 
1793  GECODE_INT_EXPORT void
1794  count(Home home, const IntVarArgs& x,
1795  const IntVarArgs& c, const IntArgs& v,
1796  IntPropLevel ipl=IPL_DEF);
1797 
1814  GECODE_INT_EXPORT void
1815  count(Home home, const IntVarArgs& x,
1816  const IntSetArgs& c, const IntArgs& v,
1817  IntPropLevel ipl=IPL_DEF);
1818 
1835  GECODE_INT_EXPORT void
1836  count(Home home, const IntVarArgs& x,
1837  const IntSet& c, const IntArgs& v,
1838  IntPropLevel ipl=IPL_DEF);
1839 
1841 
1856  GECODE_INT_EXPORT void
1857  nvalues(Home home, const IntVarArgs& x, IntRelType irt, int y,
1858  IntPropLevel ipl=IPL_DEF);
1862  GECODE_INT_EXPORT void
1863  nvalues(Home home, const IntVarArgs& x, IntRelType irt, IntVar y,
1864  IntPropLevel ipl=IPL_DEF);
1868  GECODE_INT_EXPORT void
1869  nvalues(Home home, const BoolVarArgs& x, IntRelType irt, int y,
1870  IntPropLevel ipl=IPL_DEF);
1874  GECODE_INT_EXPORT void
1875  nvalues(Home home, const BoolVarArgs& x, IntRelType irt, IntVar y,
1876  IntPropLevel ipl=IPL_DEF);
1878 
1899  GECODE_INT_EXPORT void
1900  sequence(Home home, const IntVarArgs& x, const IntSet& s,
1901  int q, int l, int u, IntPropLevel ipl=IPL_DEF);
1902 
1917  GECODE_INT_EXPORT void
1918  sequence(Home home, const BoolVarArgs& x, const IntSet& s,
1919  int q, int l, int u, IntPropLevel ipl=IPL_DEF);
1920 
1922 
1935 
1943  class DFA : public SharedHandle {
1944  private:
1946  class DFAI;
1947  public:
1949  class Transition {
1950  public:
1951  int i_state;
1952  int symbol;
1953  int o_state;
1954  Transition();
1957  Transition(int i_state0, int symbol0, int o_state0);
1958  };
1960  class Transitions {
1961  private:
1963  const Transition* c_trans;
1965  const Transition* e_trans;
1966  public:
1968  Transitions(const DFA& d);
1970  Transitions(const DFA& d, int n);
1972  bool operator ()(void) const;
1974  void operator ++(void);
1976  int i_state(void) const;
1978  int symbol(void) const;
1980  int o_state(void) const;
1981  };
1983  class Symbols {
1984  private:
1986  const Transition* c_trans;
1988  const Transition* e_trans;
1989  public:
1991  Symbols(const DFA& d);
1993  bool operator ()(void) const;
1995  void operator ++(void);
1997  int val(void) const;
1998  };
1999  public:
2000  friend class Transitions;
2002  DFA(void);
2015  DFA(int s, Transition t[], int f[], bool minimize=true);
2017  DFA(const DFA& d);
2019  int n_states(void) const;
2021  int n_transitions(void) const;
2023  unsigned int n_symbols(void) const;
2025  unsigned int max_degree(void) const;
2027  int final_fst(void) const;
2029  int final_lst(void) const;
2031  int symbol_min(void) const;
2033  int symbol_max(void) const;
2034  };
2035 
2046  GECODE_INT_EXPORT void
2047  extensional(Home home, const IntVarArgs& x, DFA d,
2048  IntPropLevel ipl=IPL_DEF);
2049 
2060  GECODE_INT_EXPORT void
2061  extensional(Home home, const BoolVarArgs& x, DFA d,
2062  IntPropLevel ipl=IPL_DEF);
2063 
2070  class TupleSet : public SharedHandle {
2071  public:
2076  typedef int* Tuple;
2077 
2083  : public SharedHandle::Object {
2084  public:
2086  int arity;
2088  int size;
2090  Tuple** tuples;
2092  Tuple* tuple_data;
2094  int* data;
2096  int excess;
2098  int min, max;
2100  unsigned int domsize;
2102  Tuple** last;
2104  Tuple* nullpointer;
2105 
2107  template<class T>
2108  void add(T t);
2110  GECODE_INT_EXPORT void finalize(void);
2112  GECODE_INT_EXPORT void resize(void);
2114  bool finalized(void) const;
2116  TupleSetI(void);
2118  GECODE_INT_EXPORT virtual ~TupleSetI(void);
2120  GECODE_INT_EXPORT virtual SharedHandle::Object* copy(void) const;
2121  };
2122 
2124  TupleSetI* implementation(void);
2125 
2127  TupleSet(void);
2129  TupleSet(const TupleSet& d);
2130 
2132  void add(const IntArgs& tuple);
2134  void finalize(void);
2136  bool finalized(void) const;
2138  int arity(void) const;
2140  int tuples(void) const;
2142  Tuple operator [](int i) const;
2144  int min(void) const;
2146  int max(void) const;
2147  };
2148 
2169  GECODE_INT_EXPORT void
2170  extensional(Home home, const IntVarArgs& x, const TupleSet& t,
2171  IntPropLevel ipl=IPL_DEF);
2172 
2185  GECODE_INT_EXPORT void
2186  extensional(Home home, const BoolVarArgs& x, const TupleSet& t,
2187  IntPropLevel ipl=IPL_DEF);
2189 
2190 }
2191 
2194 
2195 namespace Gecode {
2196 
2208  GECODE_INT_EXPORT void
2209  min(Home home, IntVar x0, IntVar x1, IntVar x2,
2210  IntPropLevel ipl=IPL_DEF);
2218  GECODE_INT_EXPORT void
2219  min(Home home, const IntVarArgs& x, IntVar y,
2220  IntPropLevel ipl=IPL_DEF);
2226  GECODE_INT_EXPORT void
2227  max(Home home, IntVar x0, IntVar x1, IntVar x2,
2228  IntPropLevel ipl=IPL_DEF);
2236  GECODE_INT_EXPORT void
2237  max(Home home, const IntVarArgs& x, IntVar y,
2238  IntPropLevel ipl=IPL_DEF);
2239 
2249  GECODE_INT_EXPORT void
2250  argmin(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
2251  IntPropLevel ipl=IPL_DEF);
2261  GECODE_INT_EXPORT void
2262  argmin(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak=true,
2263  IntPropLevel ipl=IPL_DEF);
2273  GECODE_INT_EXPORT void
2274  argmax(Home home, const IntVarArgs& x, IntVar y, bool tiebreak=true,
2275  IntPropLevel ipl=IPL_DEF);
2285  GECODE_INT_EXPORT void
2286  argmax(Home home, const IntVarArgs& x, int o, IntVar y, bool tiebreak=true,
2287  IntPropLevel ipl=IPL_DEF);
2288 
2294  GECODE_INT_EXPORT void
2295  abs(Home home, IntVar x0, IntVar x1,
2296  IntPropLevel ipl=IPL_DEF);
2297 
2303  GECODE_INT_EXPORT void
2304  mult(Home home, IntVar x0, IntVar x1, IntVar x2,
2305  IntPropLevel ipl=IPL_DEF);
2306 
2311  GECODE_INT_EXPORT void
2312  divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
2313  IntPropLevel ipl=IPL_DEF);
2314 
2319  GECODE_INT_EXPORT void
2320  div(Home home, IntVar x0, IntVar x1, IntVar x2,
2321  IntPropLevel ipl=IPL_DEF);
2322 
2327  GECODE_INT_EXPORT void
2328  mod(Home home, IntVar x0, IntVar x1, IntVar x2,
2329  IntPropLevel ipl=IPL_DEF);
2330 
2336  GECODE_INT_EXPORT void
2337  sqr(Home home, IntVar x0, IntVar x1,
2338  IntPropLevel ipl=IPL_DEF);
2339 
2345  GECODE_INT_EXPORT void
2346  sqrt(Home home, IntVar x0, IntVar x1,
2347  IntPropLevel ipl=IPL_DEF);
2348 
2357  GECODE_INT_EXPORT void
2358  pow(Home home, IntVar x0, int n, IntVar x1,
2359  IntPropLevel ipl=IPL_DEF);
2360 
2369  GECODE_INT_EXPORT void
2370  nroot(Home home, IntVar x0, int n, IntVar x1,
2371  IntPropLevel ipl=IPL_DEF);
2372 
2374 
2406  GECODE_INT_EXPORT void
2407  linear(Home home, const IntVarArgs& x,
2408  IntRelType irt, int c,
2409  IntPropLevel ipl=IPL_DEF);
2413  GECODE_INT_EXPORT void
2414  linear(Home home, const IntVarArgs& x,
2415  IntRelType irt, IntVar y,
2416  IntPropLevel ipl=IPL_DEF);
2420  GECODE_INT_EXPORT void
2421  linear(Home home, const IntVarArgs& x,
2422  IntRelType irt, int c, Reify r,
2423  IntPropLevel ipl=IPL_DEF);
2427  GECODE_INT_EXPORT void
2428  linear(Home home, const IntVarArgs& x,
2429  IntRelType irt, IntVar y, Reify r,
2430  IntPropLevel ipl=IPL_DEF);
2437  GECODE_INT_EXPORT void
2438  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2439  IntRelType irt, int c,
2440  IntPropLevel ipl=IPL_DEF);
2447  GECODE_INT_EXPORT void
2448  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2449  IntRelType irt, IntVar y,
2450  IntPropLevel ipl=IPL_DEF);
2457  GECODE_INT_EXPORT void
2458  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2459  IntRelType irt, int c, Reify r,
2460  IntPropLevel ipl=IPL_DEF);
2467  GECODE_INT_EXPORT void
2468  linear(Home home, const IntArgs& a, const IntVarArgs& x,
2469  IntRelType irt, IntVar y, Reify r,
2470  IntPropLevel ipl=IPL_DEF);
2471 
2472 
2500  GECODE_INT_EXPORT void
2501  linear(Home home, const BoolVarArgs& x,
2502  IntRelType irt, int c,
2503  IntPropLevel ipl=IPL_DEF);
2507  GECODE_INT_EXPORT void
2508  linear(Home home, const BoolVarArgs& x,
2509  IntRelType irt, int c, Reify r,
2510  IntPropLevel ipl=IPL_DEF);
2514  GECODE_INT_EXPORT void
2515  linear(Home home, const BoolVarArgs& x,
2516  IntRelType irt, IntVar y,
2517  IntPropLevel ipl=IPL_DEF);
2521  GECODE_INT_EXPORT void
2522  linear(Home home, const BoolVarArgs& x,
2523  IntRelType irt, IntVar y, Reify r,
2524  IntPropLevel ipl=IPL_DEF);
2531  GECODE_INT_EXPORT void
2532  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2533  IntRelType irt, int c,
2534  IntPropLevel ipl=IPL_DEF);
2541  GECODE_INT_EXPORT void
2542  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2543  IntRelType irt, int c, Reify r,
2544  IntPropLevel ipl=IPL_DEF);
2551  GECODE_INT_EXPORT void
2552  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2553  IntRelType irt, IntVar y,
2554  IntPropLevel ipl=IPL_DEF);
2561  GECODE_INT_EXPORT void
2562  linear(Home home, const IntArgs& a, const BoolVarArgs& x,
2563  IntRelType irt, IntVar y, Reify r,
2564  IntPropLevel ipl=IPL_DEF);
2565 
2566 
2593  GECODE_INT_EXPORT void
2594  binpacking(Home home,
2595  const IntVarArgs& l,
2596  const IntVarArgs& b, const IntArgs& s,
2597  IntPropLevel ipl=IPL_DEF);
2598  /* \brief Post propagator for multi-dimensional bin packing
2599  *
2600  * In the following \a n refers to the number of items and \a m
2601  * refers to the number of bins.
2602  *
2603  * The multi-dimensional bin-packing constraint enforces that
2604  * all items are packed into bins
2605  * \f$b_i\in\{0,\ldots,m-1\}\f$ for \f$0\leq i<n\f$
2606  * and that the load of each bin corresponds to the items
2607  * packed into it for each dimension \f$l_{j\cdot
2608  * d + k} = \sum_{\{i\in\{0,\ldots,n-1\}|
2609  * b_{j\cdot d+k}=i}\}s_{i\cdot d+k}\f$
2610  * for \f$0\leq j<m\f$, \f$0\leq k<d\f$
2611  * Furthermore, the load variables must satisfy the capacity
2612  * constraints \f$l_{j\cdot d + k} \leq
2613  * c_k\f$ for \f$0\leq j<m\f$, \f$0\leq k<d\f$.
2614  *
2615  * The constraint is implemented by the decomposition
2616  * introduced in: Stefano Gualandi and Michele Lombardi. A
2617  * simple and effective decomposition for the multidimensional
2618  * binpacking constraint. CP 2013, pages 356--364.
2619  *
2620  * Posting the constraint returns a maximal set containing conflicting
2621  * items that require pairwise different bins.
2622  *
2623  * Note that posting the constraint has exponential complexity in the
2624  * number of items due to the Bron-Kerbosch algorithm used for finding
2625  * the maximal conflict item sets.
2626  *
2627  * Throws the following exceptions:
2628  * - Of type Int::ArgumentSizeMismatch if any of the following properties
2629  * is violated: \f$|b|=n\f$, \f$|l|=m\cdot d\f$, \f$|s|=n\cdot d\f$,
2630  * and \f$|c|=d\f$.
2631  * - Of type Int::ArgumentSame if \a l and \a b share unassigned variables.
2632  * - Of type Int::OutOfLimits if \a s or \a c contains a negative number.
2633  *
2634  * \ingroup TaskModelIntBinPacking
2635  */
2637  binpacking(Home home, int d,
2638  const IntVarArgs& l, const IntVarArgs& b,
2639  const IntArgs& s, const IntArgs& c,
2640  IntPropLevel ipl=IPL_DEF);
2641 
2642 
2661  GECODE_INT_EXPORT void
2662  nooverlap(Home home,
2663  const IntVarArgs& x, const IntArgs& w,
2664  const IntVarArgs& y, const IntArgs& h,
2665  IntPropLevel ipl=IPL_DEF);
2679  GECODE_INT_EXPORT void
2680  nooverlap(Home home,
2681  const IntVarArgs& x, const IntArgs& w,
2682  const IntVarArgs& y, const IntArgs& h,
2683  const BoolVarArgs& o,
2684  IntPropLevel ipl=IPL_DEF);
2701  GECODE_INT_EXPORT void
2702  nooverlap(Home home,
2703  const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2704  const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2705  IntPropLevel ipl=IPL_DEF);
2723  GECODE_INT_EXPORT void
2724  nooverlap(Home home,
2725  const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
2726  const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
2727  const BoolVarArgs& o,
2728  IntPropLevel ipl=IPL_DEF);
2729 
2730 
2736 
2779  GECODE_INT_EXPORT void
2780  cumulatives(Home home, const IntVarArgs& m,
2781  const IntVarArgs& s, const IntVarArgs& p,
2782  const IntVarArgs& e, const IntVarArgs& u,
2783  const IntArgs& c, bool at_most,
2784  IntPropLevel ipl=IPL_DEF);
2789  GECODE_INT_EXPORT void
2790  cumulatives(Home home, const IntArgs& m,
2791  const IntVarArgs& s, const IntVarArgs& p,
2792  const IntVarArgs& e, const IntVarArgs& u,
2793  const IntArgs& c, bool at_most,
2794  IntPropLevel ipl=IPL_DEF);
2799  GECODE_INT_EXPORT void
2800  cumulatives(Home home, const IntVarArgs& m,
2801  const IntVarArgs& s, const IntArgs& p,
2802  const IntVarArgs& e, const IntVarArgs& u,
2803  const IntArgs& c, bool at_most,
2804  IntPropLevel ipl=IPL_DEF);
2809  GECODE_INT_EXPORT void
2810  cumulatives(Home home, const IntArgs& m,
2811  const IntVarArgs& s, const IntArgs& p,
2812  const IntVarArgs& e, const IntVarArgs& u,
2813  const IntArgs& c, bool at_most,
2814  IntPropLevel ipl=IPL_DEF);
2819  GECODE_INT_EXPORT void
2820  cumulatives(Home home, const IntVarArgs& m,
2821  const IntVarArgs& s, const IntVarArgs& p,
2822  const IntVarArgs& e, const IntArgs& u,
2823  const IntArgs& c, bool at_most,
2824  IntPropLevel ipl=IPL_DEF);
2829  GECODE_INT_EXPORT void
2830  cumulatives(Home home, const IntArgs& m,
2831  const IntVarArgs& s, const IntVarArgs& p,
2832  const IntVarArgs& e, const IntArgs& u,
2833  const IntArgs& c, bool at_most,
2834  IntPropLevel ipl=IPL_DEF);
2839  GECODE_INT_EXPORT void
2840  cumulatives(Home home, const IntVarArgs& m,
2841  const IntVarArgs& s, const IntArgs& p,
2842  const IntVarArgs& e, const IntArgs& u,
2843  const IntArgs& c, bool at_most,
2844  IntPropLevel ipl=IPL_DEF);
2849  GECODE_INT_EXPORT void
2850  cumulatives(Home home, const IntArgs& m,
2851  const IntVarArgs& s, const IntArgs& p,
2852  const IntVarArgs& e, const IntArgs& u,
2853  const IntArgs& c, bool at_most,
2854  IntPropLevel ipl=IPL_DEF);
2855 
2882  GECODE_INT_EXPORT void
2883  unary(Home home, const IntVarArgs& s, const IntArgs& p,
2884  IntPropLevel ipl=IPL_DEF);
2885 
2914  GECODE_INT_EXPORT void
2915  unary(Home home, const IntVarArgs& s, const IntArgs& p,
2916  const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
2917 
2954  GECODE_INT_EXPORT void
2955  unary(Home home, const TaskTypeArgs& t,
2956  const IntVarArgs& flex, const IntArgs& fix, IntPropLevel ipl=IPL_DEF);
2957 
2996  GECODE_INT_EXPORT void
2997  unary(Home home, const TaskTypeArgs& t,
2998  const IntVarArgs& flex, const IntArgs& fix,
2999  const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3000 
3027  GECODE_INT_EXPORT void
3028  unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
3029  const IntVarArgs& e, IntPropLevel ipl=IPL_DEF);
3030 
3059  GECODE_INT_EXPORT void
3060  unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
3061  const IntVarArgs& e, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3062 
3063 
3064 
3107  GECODE_INT_EXPORT void
3108  cumulative(Home home, int c, const TaskTypeArgs& t,
3109  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3110  IntPropLevel ipl=IPL_DEF);
3111 
3112 
3117  GECODE_INT_EXPORT void
3118  cumulative(Home home, IntVar c, const TaskTypeArgs& t,
3119  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3120  IntPropLevel ipl=IPL_DEF);
3121 
3166  GECODE_INT_EXPORT void
3167  cumulative(Home home, int c, const TaskTypeArgs& t,
3168  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3169  const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3170 
3174  GECODE_INT_EXPORT void
3175  cumulative(Home home, IntVar c, const TaskTypeArgs& t,
3176  const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
3177  const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3178 
3211  GECODE_INT_EXPORT void
3212  cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
3213  const IntArgs& u, IntPropLevel ipl=IPL_DEF);
3214 
3218  GECODE_INT_EXPORT void
3219  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
3220  const IntArgs& u, IntPropLevel ipl=IPL_DEF);
3221 
3256  GECODE_INT_EXPORT void
3257  cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
3258  const IntArgs& u, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3259 
3263  GECODE_INT_EXPORT void
3264  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
3265  const IntArgs& u, const BoolVarArgs& m, IntPropLevel ipl=IPL_DEF);
3266 
3303  GECODE_INT_EXPORT void
3304  cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
3305  const IntVarArgs& e, const IntArgs& u, IntPropLevel ipl=IPL_DEF);
3306 
3310  GECODE_INT_EXPORT void
3311  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
3312  const IntVarArgs& e, const IntArgs& u, IntPropLevel ipl=IPL_DEF);
3313 
3352  GECODE_INT_EXPORT void
3353  cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
3354  const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
3355  IntPropLevel ipl=IPL_DEF);
3356 
3360  GECODE_INT_EXPORT void
3361  cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
3362  const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
3363  IntPropLevel ipl=IPL_DEF);
3365 
3366 
3386  GECODE_INT_EXPORT void
3387  circuit(Home home, const IntVarArgs& x,
3388  IntPropLevel ipl=IPL_DEF);
3404  GECODE_INT_EXPORT void
3405  circuit(Home home, int offset, const IntVarArgs& x,
3406  IntPropLevel ipl=IPL_DEF);
3428  GECODE_INT_EXPORT void
3429  circuit(Home home,
3430  const IntArgs& c,
3431  const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3432  IntPropLevel ipl=IPL_DEF);
3455  GECODE_INT_EXPORT void
3456  circuit(Home home,
3457  const IntArgs& c, int offset,
3458  const IntVarArgs& x, const IntVarArgs& y, IntVar z,
3459  IntPropLevel ipl=IPL_DEF);
3478  GECODE_INT_EXPORT void
3479  circuit(Home home,
3480  const IntArgs& c,
3481  const IntVarArgs& x, IntVar z,
3482  IntPropLevel ipl=IPL_DEF);
3503  GECODE_INT_EXPORT void
3504  circuit(Home home,
3505  const IntArgs& c, int offset,
3506  const IntVarArgs& x, IntVar z,
3507  IntPropLevel ipl=IPL_DEF);
3523  GECODE_INT_EXPORT void
3524  path(Home home, const IntVarArgs& x, IntVar s, IntVar e,
3525  IntPropLevel ipl=IPL_DEF);
3543  GECODE_INT_EXPORT void
3544  path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e,
3545  IntPropLevel ipl=IPL_DEF);
3568  GECODE_INT_EXPORT void
3569  path(Home home,
3570  const IntArgs& c,
3571  const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3572  IntPropLevel ipl=IPL_DEF);
3597  GECODE_INT_EXPORT void
3598  path(Home home,
3599  const IntArgs& c, int offset,
3600  const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
3601  IntPropLevel ipl=IPL_DEF);
3622  GECODE_INT_EXPORT void
3623  path(Home home,
3624  const IntArgs& c,
3625  const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3626  IntPropLevel ipl=IPL_DEF);
3649  GECODE_INT_EXPORT void
3650  path(Home home,
3651  const IntArgs& c, int offset,
3652  const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
3653  IntPropLevel ipl=IPL_DEF);
3655 
3656 
3657 
3666  GECODE_INT_EXPORT void
3668  wait(Home home, IntVar x, void (*c)(Space& home),
3669  IntPropLevel ipl=IPL_DEF);
3671  GECODE_INT_EXPORT void
3672  wait(Home home, BoolVar x, void (*c)(Space& home),
3673  IntPropLevel ipl=IPL_DEF);
3675  GECODE_INT_EXPORT void
3676  wait(Home home, const IntVarArgs& x, void (*c)(Space& home),
3677  IntPropLevel ipl=IPL_DEF);
3679  GECODE_INT_EXPORT void
3680  wait(Home home, const BoolVarArgs& x, void (*c)(Space& home),
3681  IntPropLevel ipl=IPL_DEF);
3683  GECODE_INT_EXPORT void
3684  when(Home home, BoolVar x,
3685  void (*t)(Space& home), void (*e)(Space& home)= NULL,
3686  IntPropLevel ipl=IPL_DEF);
3688 
3689 
3714  GECODE_INT_EXPORT void
3715  unshare(Home home, IntVarArgs& x,
3716  IntPropLevel ipl=IPL_DEF);
3718  GECODE_INT_EXPORT void
3719  unshare(Home home, BoolVarArgs& x,
3720  IntPropLevel ipl=IPL_DEF);
3722 
3723 }
3724 
3725 namespace Gecode {
3726 
3740  typedef bool (*IntBranchFilter)(const Space& home, IntVar x, int i);
3749  typedef bool (*BoolBranchFilter)(const Space& home, BoolVar x, int i);
3750 
3760  typedef double (*IntBranchMerit)(const Space& home, IntVar x, int i);
3770  typedef double (*BoolBranchMerit)(const Space& home, BoolVar x, int i);
3771 
3782  typedef int (*IntBranchVal)(const Space& home, IntVar x, int i);
3793  typedef int (*BoolBranchVal)(const Space& home, BoolVar x, int i);
3794 
3806  typedef void (*IntBranchCommit)(Space& home, unsigned int a,
3807  IntVar x, int i, int n);
3819  typedef void (*BoolBranchCommit)(Space& home, unsigned int a,
3820  BoolVar x, int i, int n);
3821 }
3822 
3824 
3825 namespace Gecode {
3826 
3832  class IntAFC : public AFC {
3833  public:
3841  IntAFC(void);
3843  IntAFC(const IntAFC& a);
3845  IntAFC& operator =(const IntAFC& a);
3847  IntAFC(Home home, const IntVarArgs& x, double d=1.0);
3849  IntAFC(Home home, const BoolVarArgs& x, double d=1.0);
3857  void init(Home home, const IntVarArgs& x, double d=1.0);
3865  void init(Home home, const BoolVarArgs& x, double d=1.0);
3866  };
3867 
3868 }
3869 
3870 #include <gecode/int/branch/afc.hpp>
3871 
3872 namespace Gecode {
3873 
3879  class IntActivity : public Activity {
3880  public:
3888  IntActivity(void);
3890  IntActivity(const IntActivity& a);
3892  IntActivity& operator =(const IntActivity& a);
3901  IntActivity(Home home, const IntVarArgs& x, double d=1.0,
3902  IntBranchMerit bm=NULL);
3911  IntActivity(Home home, const BoolVarArgs& x, double d=1.0,
3912  BoolBranchMerit bm=NULL);
3924  GECODE_INT_EXPORT void
3925  init(Home home, const IntVarArgs& x, double d=1.0,
3926  IntBranchMerit bm=NULL);
3938  GECODE_INT_EXPORT void
3939  init(Home home, const BoolVarArgs& x, double d=1.0,
3940  BoolBranchMerit bm=NULL);
3941  };
3942 
3943 }
3944 
3946 
3947 namespace Gecode {
3948 
3950  typedef void (*IntVarValPrint)(const Space &home, const Brancher& b,
3951  unsigned int a,
3952  IntVar x, int i, const int& n,
3953  std::ostream& o);
3954 
3956  typedef void (*BoolVarValPrint)(const Space &home, const Brancher& b,
3957  unsigned int a,
3958  BoolVar x, int i, const int& n,
3959  std::ostream& o);
3960 
3961 }
3962 
3963 namespace Gecode {
3964 
3970  class IntVarBranch : public VarBranch {
3971  public:
3973  enum Select {
3974  SEL_NONE = 0,
3996 
4019  SEL_REGRET_MAX_MAX
4020  };
4021  protected:
4024  public:
4026  IntVarBranch(void);
4028  IntVarBranch(Rnd r);
4032  IntVarBranch(Select s, double d, BranchTbl t);
4040  Select select(void) const;
4042  void expand(Home home, const IntVarArgs& x);
4044  void expand(Home home, const BoolVarArgs& x);
4045  };
4046 
4052  IntVarBranch INT_VAR_NONE(void);
4069  IntVarBranch INT_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=NULL);
4073  IntVarBranch INT_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=NULL);
4077  IntVarBranch INT_VAR_ACTIVITY_MIN(double d=1.0, BranchTbl tbl=NULL);
4081  IntVarBranch INT_VAR_ACTIVITY_MAX(double d=1.0, BranchTbl tbl=NULL);
4101  IntVarBranch INT_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=NULL);
4105  IntVarBranch INT_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=NULL);
4141 
4142 }
4143 
4144 #include <gecode/int/branch/var.hpp>
4145 
4146 namespace Gecode {
4147 
4153  class IntValBranch : public ValBranch {
4154  public:
4156  enum Select {
4171  SEL_NEAR_DEC
4172  };
4173  protected:
4178  public:
4180  IntValBranch(Select s = SEL_MIN);
4182  IntValBranch(Rnd r);
4188  Select select(void) const;
4190  IntSharedArray values(void) const;
4191  };
4192 
4198  IntValBranch INT_VAL_MIN(void);
4201  IntValBranch INT_VAL_MED(void);
4203  IntValBranch INT_VAL_MAX(void);
4241 
4242 }
4243 
4244 #include <gecode/int/branch/val.hpp>
4245 
4246 namespace Gecode {
4247 
4253  class IntAssign : public ValBranch {
4254  public:
4256  enum Select {
4261  SEL_VAL_COMMIT
4262  };
4263  protected:
4266  public:
4268  IntAssign(Select s = SEL_MIN);
4270  IntAssign(Rnd r);
4274  Select select(void) const;
4275  };
4276 
4282  IntAssign INT_ASSIGN_MIN(void);
4285  IntAssign INT_ASSIGN_MED(void);
4287  IntAssign INT_ASSIGN_MAX(void);
4305 
4306 }
4307 
4309 
4310 namespace Gecode {
4316  GECODE_INT_EXPORT void
4317  branch(Home home, const IntVarArgs& x,
4318  IntVarBranch vars, IntValBranch vals,
4319  IntBranchFilter bf=NULL,
4320  IntVarValPrint vvp=NULL);
4326  GECODE_INT_EXPORT void
4327  branch(Home home, const IntVarArgs& x,
4329  IntBranchFilter bf=NULL,
4330  IntVarValPrint vvp=NULL);
4336  GECODE_INT_EXPORT void
4337  branch(Home home, IntVar x, IntValBranch vals,
4338  IntVarValPrint vvp=NULL);
4344  GECODE_INT_EXPORT void
4345  branch(Home home, const BoolVarArgs& x,
4346  IntVarBranch vars, IntValBranch vals,
4347  BoolBranchFilter bf=NULL,
4348  BoolVarValPrint vvp=NULL);
4354  GECODE_INT_EXPORT void
4355  branch(Home home, const BoolVarArgs& x,
4357  BoolBranchFilter bf=NULL,
4358  BoolVarValPrint vvp=NULL);
4364  GECODE_INT_EXPORT void
4365  branch(Home home, BoolVar x, IntValBranch vals,
4366  BoolVarValPrint vvp=NULL);
4367 
4373  GECODE_INT_EXPORT void
4374  assign(Home home, const IntVarArgs& x, IntAssign vals,
4375  IntBranchFilter ibf=NULL,
4376  IntVarValPrint vvp=NULL);
4382  GECODE_INT_EXPORT void
4383  assign(Home home, IntVar x, IntAssign vals,
4384  IntVarValPrint vvp=NULL);
4390  GECODE_INT_EXPORT void
4391  assign(Home home, const BoolVarArgs& x, IntAssign vals,
4392  BoolBranchFilter bbf=NULL,
4393  BoolVarValPrint vvp=NULL);
4399  GECODE_INT_EXPORT void
4400  assign(Home home, BoolVar x, IntAssign vals,
4401  BoolVarValPrint vvp=NULL);
4402 
4403 }
4404 
4405 namespace Gecode {
4406 
4410  template<class Char, class Traits>
4411  std::basic_ostream<Char,Traits>&
4412  operator <<(std::basic_ostream<Char,Traits>& os, const DFA& d);
4413 
4417  template<class Char, class Traits>
4418  std::basic_ostream<Char,Traits>&
4419  operator <<(std::basic_ostream<Char,Traits>& os, const TupleSet& ts);
4420 
4421 }
4422 
4423 // LDSB-related declarations.
4424 namespace Gecode {
4425 
4426  namespace Int { namespace LDSB {
4427  class SymmetryObject;
4428  }}
4429 
4436  public:
4440  void increment(void);
4442  void decrement(void);
4443  public:
4445  SymmetryHandle(void);
4449  SymmetryHandle(const SymmetryHandle& h);
4451  const SymmetryHandle& operator=(const SymmetryHandle& h);
4453  ~SymmetryHandle(void);
4454  };
4455  class Symmetries;
4457  template<>
4459  public:
4463  };
4464 
4471  class Symmetries : public ArgArray<SymmetryHandle> {};
4473  // If this is instead a typedef, strange things happen with the
4474  // overloading of the "branch" function.
4475 
4482  const IntArgs& indices);
4509  SymmetryHandle ValueSequenceSymmetry(const IntArgs& v, int ss);
4510 
4512  GECODE_INT_EXPORT SymmetryHandle values_reflect(int lower, int upper);
4516 
4528  GECODE_INT_EXPORT void
4529  branch(Home home, const IntVarArgs& x,
4530  IntVarBranch vars, IntValBranch vals,
4531  const Symmetries& syms,
4532  IntBranchFilter bf=NULL, IntVarValPrint vvp=NULL);
4544  GECODE_INT_EXPORT void
4545  branch(Home home, const IntVarArgs& x,
4547  const Symmetries& syms,
4548  IntBranchFilter bf=NULL, IntVarValPrint vvp=NULL);
4560  GECODE_INT_EXPORT void
4561  branch(Home home, const BoolVarArgs& x,
4562  IntVarBranch vars, IntValBranch vals,
4563  const Symmetries& syms,
4564  BoolBranchFilter bf=NULL, BoolVarValPrint vvp=NULL);
4576  GECODE_INT_EXPORT void
4577  branch(Home home, const BoolVarArgs& x,
4579  const Symmetries& syms,
4580  BoolBranchFilter bf=NULL, BoolVarValPrint vvp=NULL);
4581 }
4582 
4583 namespace Gecode {
4584 
4585  /*
4586  * \brief Relaxed assignment of variables in \a x from values in \a sx
4587  *
4588  * The variables in \a x are assigned values from the assigned variables
4589  * in the solution \a sx with a relaxation probability \a p. That is,
4590  * if \$fp=0.1\f$ approximately 10% of the variables in \a x will be
4591  * assigned a value from \a sx.
4592  *
4593  * The random numbers are generated from the generator \a r. At least
4594  * one variable will not be assigned: in case the relaxation attempt
4595  * would suggest that all variables should be assigned, a single
4596  * variable will be selected randomly to remain unassigned.
4597  *
4598  * Throws an exception of type Int::ArgumentSizeMismatch, if \a x and
4599  * \a sx are of different size.
4600  *
4601  * Throws an exception of type Int::OutOfLimits, if \a p is not between
4602  * \a 0.0 and \a 1.0.
4603  *
4604  * \ingroup TaskModelInt
4605  */
4606  GECODE_INT_EXPORT void
4607  relax(Home home, const IntVarArgs& x, const IntVarArgs& sx,
4608  Rnd r, double p);
4609 
4610  /*
4611  * \brief Relaxed assignment of variables in \a x from values in \a sx
4612  *
4613  * The variables in \a x are assigned values from the assigned variables
4614  * in the solution \a sx with a relaxation probability \a p. That is,
4615  * if \$fp=0.1\f$ approximately 10% of the variables in \a x will be
4616  * assigned a value from \a sx.
4617  *
4618  * The random numbers are generated from the generator \a r. At least
4619  * one variable will not be assigned: in case the relaxation attempt
4620  * would suggest that all variables should be assigned, a single
4621  * variable will be selected randomly to remain unassigned.
4622  *
4623  * Throws an exception of type Int::ArgumentSizeMismatch, if \a x and
4624  * \a sx are of different size.
4625  *
4626  * Throws an exception of type Int::OutOfLimits, if \a p is not between
4627  * \a 0.0 and \a 1.0.
4628  *
4629  * \ingroup TaskModelInt
4630  */
4631  GECODE_INT_EXPORT void
4632  relax(Home home, const BoolVarArgs& x, const BoolVarArgs& sx,
4633  Rnd r, double p);
4634 
4635 }
4636 
4637 
4640 
4641 namespace Gecode {
4642 
4653  : public Iter::Ranges::Diff<Iter::Ranges::RangeList,
4654  Int::ViewRanges<Int::IntView> > {
4655  protected:
4660  public:
4662 
4666  };
4667 
4673  protected:
4675  int delta;
4676  public:
4678 
4682 
4684  bool operator ()(void) const;
4687  void operator ++(void);
4689 
4691 
4692  int min(void) const;
4695  int max(void) const;
4697  unsigned int width(void) const;
4699  };
4700 
4701 }
4702 
4705 
4706 #include <gecode/int/trace/traits.hpp>
4707 
4708 namespace Gecode {
4709 
4720 
4725  class GECODE_INT_EXPORT StdIntTracer : public IntTracer {
4726  protected:
4728  std::ostream& os;
4729  public:
4731  StdIntTracer(std::ostream& os0 = std::cerr);
4733  virtual void init(const Space& home, const IntTraceRecorder& t);
4735  virtual void prune(const Space& home, const IntTraceRecorder& t,
4736  const ExecInfo& ei, int i, IntTraceDelta& d);
4738  virtual void fix(const Space& home, const IntTraceRecorder& t);
4740  virtual void done(const Space& home, const IntTraceRecorder& t);
4743  };
4744 
4745 
4756 
4761  class GECODE_INT_EXPORT StdBoolTracer : public BoolTracer {
4762  protected:
4764  std::ostream& os;
4765  public:
4767  StdBoolTracer(std::ostream& os0 = std::cerr);
4769  virtual void init(const Space& home, const BoolTraceRecorder& t);
4771  virtual void prune(const Space& home, const BoolTraceRecorder& t,
4772  const ExecInfo& ei, int i, BoolTraceDelta& d);
4774  virtual void fix(const Space& home, const BoolTraceRecorder& t);
4776  virtual void done(const Space& home, const BoolTraceRecorder& t);
4779  };
4780 
4785  GECODE_INT_EXPORT void
4786  trace(Home home, const IntVarArgs& x,
4787  TraceFilter tf,
4788  int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_DONE),
4789  IntTracer& t = StdIntTracer::def);
4794  void
4795  trace(Home home, const IntVarArgs& x,
4796  int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_DONE),
4797  IntTracer& t = StdIntTracer::def);
4798 
4803  GECODE_INT_EXPORT void
4804  trace(Home home, const BoolVarArgs& x,
4805  TraceFilter tf,
4806  int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_DONE),
4807  BoolTracer& t = StdBoolTracer::def);
4812  void
4813  trace(Home home, const BoolVarArgs& x,
4814  int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_DONE),
4815  BoolTracer& t = StdBoolTracer::def);
4816 
4817 }
4818 
4819 #include <gecode/int/trace.hpp>
4820 
4821 #endif
4822 
4823 // IFDEF: GECODE_HAS_INT_VARS
4824 // STATISTICS: int-post
4825 
Value iterator for integer variables.
Definition: int.hh:470
Bounds propagation.
Definition: int.hh:945
With smallest accumulated failure count.
Definition: int.hh:3980
IntVarBranch INT_VAR_DEGREE_SIZE_MIN(BranchTbl tbl)
Select variable with smallest degree divided by domain size.
Definition: var.hpp:222
void mod(Home home, IntVar x0, IntVar x1, IntVar x2, IntPropLevel ipl)
Post propagator for .
Definition: arithmetic.cpp:277
Int::ViewRanges< Int::IntView > rn
Iterator over the new values.
Definition: int.hh:4657
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
IntVarArgs(const VarArray< IntVar > &a)
Initialize from variable array a (copy elements)
Definition: int.hh:648
Duplicate of a Boolean view.
IntPropLevel vbd(IntPropLevel ipl)
Extract value, bounds, or domain propagation from propagation level.
Definition: ipl.hpp:41
TraceRecorder< Int::BoolView > BoolTraceRecorder
TraceRecorder for Boolean variables.
Definition: int.hh:4755
int symbol
symbol
Definition: int.hh:1952
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:3749
Combine variable selection criteria for tie-breaking.
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:4023
void mult(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:96
The shared handle.
Definition: core.hpp:79
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatNum c)
Post propagator for .
Definition: linear.cpp:45
NNF * l
Left subtree.
Definition: bool-expr.cpp:244
TaskType
Type of task for scheduling constraints.
Definition: int.hh:976
Inverse implication for reification.
Definition: int.hh:848
void sorted(Home home, const IntVarArgs &x, const IntVarArgs &y, const IntVarArgs &z, IntPropLevel)
Post propagator that y is x sorted in increasing order.
Definition: sorted.cpp:43
With smallest activity divided by domain size.
Definition: int.hh:3994
With largest min-regret.
Definition: int.hh:4007
Range iterator for integer sets.
Definition: int.hh:272
BoolVarArgs(const VarArray< BoolVar > &a)
Initialize from variable array a (copy elements)
Definition: int.hh:702
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel)
Post propagator for .
Definition: sequence.cpp:51
Iterator for DFA symbols.
Definition: int.hh:1983
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te, FloatTracer &t)
Create a tracer for float variables.
Definition: trace.cpp:43
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Definition: arithmetic.cpp:218
Iter::Ranges::RangeList ro
Iterator over the old values.
Definition: int.hh:4659
void count(Home home, const IntVarArgs &x, int n, IntRelType irt, int m, IntPropLevel)
Post propagator for .
Definition: count.cpp:44
IntVarBranch INT_VAR_DEGREE_SIZE_MAX(BranchTbl tbl)
Select variable with largest degree divided by domain size.
Definition: var.hpp:227
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
Definition: linear.cpp:50
Standard Boolean variable tracer.
Definition: int.hh:4761
Select
Which value selection.
Definition: int.hh:4256
Argument array for primtive types.
Definition: array.hpp:640
BoolOpType
Operation types for Booleans.
Definition: int.hh:917
Which values to select for branching first.
Definition: int.hh:4153
With smallest degree.
Definition: int.hh:3978
BoolVarArgs(const BoolVarArgs &a)
Initialize from variable argument array a (copy elements)
Definition: int.hh:700
int(* BoolBranchVal)(const Space &home, BoolVar x, int i)
Branch value function type for Boolean variables.
Definition: int.hh:3793
Select smallest value.
Definition: int.hh:4157
Which variable to select for branching.
Definition: int.hh:3970
With highest activity.
Definition: int.hh:3983
int excess
Excess storage.
Definition: int.hh:2096
IntVarBranch INT_VAR_REGRET_MAX_MAX(BranchTbl tbl)
Select variable with largest max-regret.
Definition: var.hpp:287
With largest accumulated failure count.
Definition: int.hh:3981
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
Less or equal ( )
Definition: int.hh:907
void nroot(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
Definition: arithmetic.cpp:126
void pow(Home home, FloatVar x0, int n, FloatVar x1)
Post propagator for for $n 0$.
Definition: arithmetic.cpp:117
Select value nearest to a given value, use smaller one in case of ties.
Definition: int.hh:4168
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
Conjunction.
Definition: int.hh:918
Range iterator for range lists
With largest accumulated failure count divided by domain size.
Definition: int.hh:3993
int * Tuple
Type of a tuple.
Definition: int.hh:2076
void member(Home home, const IntVarArgs &x, IntVar y, IntPropLevel)
Post domain consistent propagator for .
Definition: member.cpp:43
BoolVarArgs(const std::vector< BoolVar > &a)
Initialize from vector a.
Definition: int.hh:705
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl)
Post propagator such that x forms a Hamiltonian path.
Definition: circuit.cpp:128
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
Definition: dom.cpp:44
Collection of symmetries.
Definition: int.hh:4472
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
void(* BoolVarValPrint)(const Space &home, const Brancher &b, 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:3956
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
IntVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
Definition: int.hh:653
Implication.
Definition: int.hh:920
Integer variable array.
Definition: int.hh:742
Select the smallest range of the variable domain if it has several ranges, otherwise select values no...
Definition: int.hh:4163
void circuit(Home home, int offset, const IntVarArgs &x, IntPropLevel ipl)
Post propagator such that x forms a circuit.
Definition: circuit.cpp:45
With largest activity divided by domain size.
Definition: int.hh:3995
void argmin(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
Definition: arithmetic.cpp:177
IntVarArgs(const std::vector< IntVar > &a)
Initialize from vector a.
Definition: int.hh:650
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:4177
Greater ( )
Definition: int.hh:910
void binpacking(Home home, const IntVarArgs &l, const IntVarArgs &b, const IntArgs &s, IntPropLevel)
Post propagator for bin packing.
Definition: bin-packing.cpp:45
bool(* IntBranchFilter)(const Space &home, IntVar x, int i)
Branch filter function type for integer variables.
Definition: int.hh:3740
ArgArray< IntSet > IntSetArgs
Passing set arguments.
Definition: int.hh:599
Trace init events.
const int max
Largest allowed integer value.
Definition: int.hh:114
Computation spaces.
Definition: core.hpp:1672
ExecStatus prune(Space &home, ViewArray< VX > &x, ConstIntView)
Definition: rel.hpp:257
Greater or equal ( )
Definition: int.hh:909
Standard integer variable tracer.
Definition: int.hh:4725
Select s
Which value to select.
Definition: int.hh:4265
With smallest min.
Definition: int.hh:3984
int i_state
input state
Definition: int.hh:1951
Exclusive or.
Definition: int.hh:922
const int min
Smallest allowed integer value.
Definition: int.hh:116
double(* IntBranchMerit)(const Space &home, IntVar x, int i)
Branch merit function type for integer variables.
Definition: int.hh:3760
IntVarBranch INT_VAR_REGRET_MIN_MAX(BranchTbl tbl)
Select variable with largest min-regret.
Definition: var.hpp:277
Select smallest value.
Definition: int.hh:4257
IntVarArgs(int n)
Allocate array with n elements.
Definition: int.hh:644
int(* IntBranchVal)(const Space &home, IntVar x, int i)
Branch value function type for integer variables.
Definition: int.hh:3782
Range iterator for integer variables
Definition: int.hh:453
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
Select value nearest to a given value, use larger one in case of ties.
Definition: int.hh:4169
Gecode::IntSet d(v, 7)
bool overflow_mul(int n, int m)
Check whether multiplying n and m would overflow.
Definition: limits.hpp:111
std::string expand(Gecode::IntRelType irt)
Expand relation to abbreviation.
Definition: mm-count.cpp:48
Reify imp(BoolVar x)
Use implication for reification.
Definition: reify.hpp:77
Gecode::FloatVal c(-8, 8)
void 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
Trace prune events.
SymmetryHandle VariableSymmetry(const IntVarArgs &vars)
Variables in x are interchangeable.
Definition: ldsb.cpp:66
Deterministic finite automaton (DFA)
Definition: int.hh:1943
struct Gecode::@554::NNF::@60::@62 a
For atomic nodes.
int p
Number of positive literals for node type.
Definition: bool-expr.cpp:236
With smallest max-regret.
Definition: int.hh:4013
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)
Base-class for branchers.
Definition: core.hpp:1364
Class for AFC (accumulated failure count) management.
Definition: afc.hpp:44
void assign(Home home, const FloatVarArgs &x, FloatAssign fa, FloatBranchFilter bf, FloatVarValPrint vvp)
Assign all x with value selection vals.
Definition: branch.cpp:113
int n
Number of negative literals for node type.
Definition: bool-expr.cpp:238
Equality ( )
Definition: int.hh:905
IntVarBranch INT_VAR_DEGREE_MAX(BranchTbl tbl)
Select variable with largest degree.
Definition: var.hpp:147
void unshare(Home home, IntVarArgs &x, IntPropLevel ipl)
Replace multiple variable occurences in x by fresh variables.
Definition: unshare.cpp:133
const long long int llmin
Smallest allowed long long integer value.
Definition: int.hh:122
Select random value.
Definition: int.hh:4260
Select all values starting from largest.
Definition: int.hh:4167
IntVarBranch INT_VAR_ACTIVITY_MIN(double d, BranchTbl tbl)
Select variable with lowest activity with decay factor d.
Definition: var.hpp:172
Tuple ** last
Initial last structure.
Definition: int.hh:2102
With smallest min-regret.
Definition: int.hh:4001
A reference-counted pointer to a SymmetryObject.
Definition: int.hh:4435
void divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3, IntPropLevel)
Post propagator for .
Definition: arithmetic.cpp:244
void nvalues(Home home, const IntVarArgs &x, IntRelType irt, int y, IntPropLevel)
Post propagator for .
Definition: nvalues.cpp:44
union Gecode::@554::NNF::@60 u
Union depending on nodetype t.
IntAssign INT_ASSIGN_RND(Rnd r)
Select random value.
Definition: assign.hpp:74
TraceRecorder< Int::IntView > IntTraceRecorder
TraceRecorder for integer variables.
Definition: int.hh:4719
IntRelType
Relation types for integers.
Definition: int.hh:904
NNF * r
Right subtree.
Definition: bool-expr.cpp:246
SymmetryHandle ValueSequenceSymmetry(const IntArgs &vs, int ss)
Value sequences in v of size ss are interchangeable.
Definition: ldsb.cpp:106
Propagator for recording trace information.
Select greatest value not greater than the median.
Definition: int.hh:4158
void sqr(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition: arithmetic.cpp:103
void(* IntBranchCommit)(Space &home, unsigned int a, IntVar x, int i, int n)
Branch commit function type for integer variables.
Definition: int.hh:3806
IntAssign INT_ASSIGN_MAX(void)
Select largest value.
Definition: assign.hpp:69
Simple propagation levels.
Definition: int.hh:943
void extensional(Home home, const IntVarArgs &x, DFA dfa, IntPropLevel)
Post domain consistent propagator for extensional constraint described by a DFA.
Definition: extensional.cpp:45
void(* BoolBranchCommit)(Space &home, unsigned int a, BoolVar x, int i, int n)
Branch commit function type for Boolean variables.
Definition: int.hh:3819
Recording AFC information for integer and Boolean variables.
Definition: int.hh:3832
IntValBranch INT_VAL_MIN(void)
Select smallest value.
Definition: val.hpp:68
Specification of a DFA transition.
Definition: int.hh:1949
void sqrt(Home home, FloatVar x0, FloatVar x1)
Post propagator for .
Definition: arithmetic.cpp:110
Use basic propagation algorithm.
Definition: int.hh:951
Value iterator from range iterator.
With largest max.
Definition: int.hh:3987
unsigned int size(I &i)
Size of all ranges of range iterator i.
Reification specification.
Definition: int.hh:855
Value propagation.
Definition: int.hh:944
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
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
Definition: minimodel.hh:1901
IntVarBranch INT_VAR_MAX_MAX(BranchTbl tbl)
Select variable with largest max.
Definition: var.hpp:207
unsigned int domsize
Domain size.
Definition: int.hh:2100
Range iterator for ranges of integer variable implementation.
Definition: var-imp.hpp:389
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
void distinct(Home home, const IntVarArgs &x, IntPropLevel ipl)
Post propagator for for all .
Definition: distinct.cpp:50
With largest domain size.
Definition: int.hh:3989
Duplicate of an integer view.
Tuple ** tuples
Tuples index.
Definition: int.hh:2090
bool overflow_add(int n, int m)
Check whether adding n and m would overflow.
Definition: limits.hpp:83
void argmax(Home home, const IntVarArgs &x, IntVar y, bool tiebreak, IntPropLevel)
Post propagator for .
Definition: arithmetic.cpp:124
Trace filters.
IntVarBranch INT_VAR_MIN_MAX(BranchTbl tbl)
Select variable with largest min.
Definition: var.hpp:197
int min
Minimum and maximum in domain-values.
Definition: int.hh:2098
Integer set initialization.
Definition: int-set-1.hpp:57
Less ( )
Definition: int.hh:908
void(* VoidFunction)(void)
Base type for any function pointer.
Definition: cast.hpp:45
Integer sets.
Definition: int.hh:172
int o_state
output state Default constructor
Definition: int.hh:1953
void ite(Home home, BoolVar b, IntVar x, IntVar y, IntVar z, IntPropLevel ipl)
Post propagator for if-then-else constraint.
Definition: bool.cpp:912
Tuple * nullpointer
Pointer to NULL-pointer.
Definition: int.hh:2104
Data stored for a Table.
Definition: int.hh:2082
Use advanced propagation algorithm.
Definition: int.hh:952
std::ostream & os
Output stream to use.
Definition: int.hh:4764
static StdIntTracer def
Default tracer (printing to std::cerr)
Definition: int.hh:4742
Execution information.
Definition: core.hpp:957
Prefer speed.
Definition: int.hh:948
Reify eqv(BoolVar x)
Use equivalence for reification.
Definition: reify.hpp:73
Disjunction.
Definition: int.hh:919
With largest degree divided by domain size.
Definition: int.hh:3991
IntVarArgs(const IntVarArgs &a)
Initialize from variable argument array a (copy elements)
Definition: int.hh:646
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
int * data
Tuples data.
Definition: int.hh:2094
Recording activities for integer and Boolean variables.
Definition: int.hh:3879
IntPropLevel sm(IntPropLevel ipl)
Extract speed or memory from propagation level.
Definition: ipl.hpp:47
Passing integer variables.
Definition: int.hh:637
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
Definition: int.hh:1375
Passing integer arguments.
Definition: int.hh:608
BoolVarArgs(InputIterator first, InputIterator last)
Initialize from InputIterator first and last.
Definition: int.hh:708
Passing Boolean variables.
Definition: int.hh:691
Select values greater than mean of smallest and largest value.
Definition: int.hh:4162
double(* BoolBranchMerit)(const Space &home, BoolVar x, int i)
Branch merit function type for Boolean variables.
Definition: int.hh:3770
Tuple * tuple_data
Tuple index data.
Definition: int.hh:2092
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
With largest degree.
Definition: int.hh:3979
void nooverlap(Home home, const IntVarArgs &x, const IntArgs &w, const IntVarArgs &y, const IntArgs &h, IntPropLevel)
Post propagator for rectangle packing.
Definition: no-overlap.cpp:55
Boolean variable array.
Definition: int.hh:787
Boolean integer variables.
Definition: int.hh:492
Prefer to save memory Options: basic versus advanced propagation.
Definition: int.hh:949
const int v[7]
Definition: distinct.cpp:263
Class represeting a set of tuples.
Definition: int.hh:2070
TieBreak< VarBranch > tiebreak(VarBranch a, VarBranch b)
Combine variable selection criteria a and b for tie-breaking.
With smallest degree divided by domain size.
Definition: int.hh:3990
With smallest max.
Definition: int.hh:3986
IntValBranch INT_VAL_MAX(void)
Select largest value.
Definition: val.hpp:78
IntPropLevel
Propagation levels for integer propagators.
Definition: int.hh:941
IntPropLevel ba(IntPropLevel ipl)
Extract basic or advanced from propagation level.
Definition: ipl.hpp:53
Integer view for integer variables.
Definition: view.hpp:129
const int infinity
Infinity for integers.
Definition: int.hh:118
Select the largest range of the variable domain if it has several ranges, otherwise select values gre...
Definition: int.hh:4164
BoolVarArgs(int n)
Allocate array with n elements.
Definition: int.hh:698
Value branching information.
Definition: branch-val.hpp:44
Trace done events.
void div(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Definition: arithmetic.cpp:135
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
Definition: relax.cpp:61
IntValBranch INT_VALUES_MIN(void)
Try all values starting from smallest.
Definition: val.hpp:120
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
bool overflow_sub(int n, int m)
Check whether subtracting m from n would overflow.
Definition: limits.hpp:97
Select values not greater than mean of smallest and largest value.
Definition: int.hh:4161
Node * x
Pointer to corresponding Boolean expression node.
Definition: bool-expr.cpp:253
Generic domain change information to be supplied to advisors.
Definition: core.hpp:277
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:4175
IntVarBranch INT_VAR_MERIT_MIN(IntBranchMerit bm, BranchTbl tbl)
Select variable with least merit according to branch merit function bm.
Definition: var.hpp:118
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel)
Post propagator that s precedes t in x.
Definition: precede.cpp:47
Integer variables.
Definition: int.hh:351
Select random value.
Definition: int.hh:4160
Tracer< Int::BoolView > BoolTracer
Tracer for Boolean variables.
Definition: int.hh:4750
Which values to select for assignment.
Definition: int.hh:4253
#define forceinline
Definition: config.hpp:173
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Definition: rel.cpp:47
Trace delta information for integer variables.
Definition: int.hh:4652
SymmetryHandle values_reflect(int lower, int upper)
The values from lower to upper (inclusive) can be reflected.
Definition: ldsb.cpp:110
Sort ranges according to increasing minimum.
Definition: int-set.cpp:84
Domain propagation Preferences: prefer speed or memory.
Definition: int.hh:946
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
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
Select
Which variable selection.
Definition: int.hh:3973
bool valid(int n)
Return whether n is in range.
Definition: limits.hpp:41
Value iterator for integer sets.
Definition: int.hh:313
Equivalence.
Definition: int.hh:921
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:1960
Int::LDSB::SymmetryObject * ref
Symmetry object that this handle refers to.
Definition: int.hh:4438
PrimArgArray< TaskType > TaskTypeArgs
Argument arrays for passing task type arguments.
Definition: int.hh:987
void(* IntVarValPrint)(const Space &home, const Brancher &b, 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:3950
Random (uniform, for tie breaking)
Definition: int.hh:3975
void values(Home home, const IntVarArgs &x, IntSet y, IntPropLevel ipl=IPL_DEF)
Post constraint .
Definition: minimodel.hh:1868
With smallest domain size.
Definition: int.hh:3988
The shared object.
Definition: core.hpp:88
Tracer that process trace information.
Definition: tracer.hpp:55
Trace fixpoint events.
std::ostream & os
Output stream to use.
Definition: int.hh:4728
Select
Which value selection.
Definition: int.hh:4156
Select greatest value not greater than the median.
Definition: int.hh:4258
static StdBoolTracer def
Default tracer (printing to std::cerr)
Definition: int.hh:4778
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &vars, int ss)
Variable sequences in x of size ss are interchangeable.
Definition: ldsb.cpp:94
const long long int llmax
Largest allowed long long integer value.
Definition: int.hh:120
With highest merit.
Definition: int.hh:3977
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
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:2088
With largest min.
Definition: int.hh:3985
Gecode toplevel namespace
Argument array for variables.
Definition: array.hpp:53
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
Implication for reification.
Definition: int.hh:841
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
Range iterator for computing set difference.
Definition: ranges-diff.hpp:47
Disequality ( )
Definition: int.hh:906
BoolVar x
The Boolean control variable.
Definition: int.hh:858
Random number generator.
Definition: rnd.hpp:46
Select largest value.
Definition: int.hh:4159
Tracer< Int::IntView > IntTracer
Tracer for integer variables.
Definition: int.hh:4714
Class for activity management.
Definition: activity.hpp:44
#define GECODE_INT_EXPORT
Definition: int.hh:79
const long long int llinfinity
Infinity for long long integers.
Definition: int.hh:124
void cumulative(Home home, int c, const TaskTypeArgs &t, const IntVarArgs &s, const IntArgs &p, const IntArgs &u, IntPropLevel ipl)
Post propagators for scheduling tasks on cumulative resources.
Definition: cumulative.cpp:357
With lowest activity.
Definition: int.hh:3982
struct Gecode::@554::NNF::@60::@61 b
For binary nodes (and, or, eqv)
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:905
double tbl(const Gecode::Space &, double w, double b)
Test function for tie-break limit function.
Definition: branch.cpp:65
ReifyMode
Mode for reification.
Definition: int.hh:827
Select value according to user-defined functions.
Definition: int.hh:4165
ReifyMode rm
The reification mode.
Definition: int.hh:860
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
Trace delta information for Boolean variables.
Definition: int.hh:4672
void unary(Home home, const IntVarArgs &s, const IntArgs &p, IntPropLevel ipl)
Post propagators for scheduling tasks on unary resources.
Definition: unary.cpp:48
IntValBranch INT_VAL_NEAR_DEC(IntSharedArray n)
Try value smaller than a given value for a variable first.
Definition: val.hpp:145
IntVarBranch INT_VAR_SIZE_MAX(BranchTbl tbl)
Select variable with largest domain size.
Definition: var.hpp:217
Select largest value.
Definition: int.hh:4259
int delta
Delta information.
Definition: int.hh:4675
void element(Home home, IntSharedArray c, IntVar x0, IntVar x1, IntPropLevel)
Post domain consistent propagator for .
Definition: element.cpp:43
Select value near to a given value, increment values first.
Definition: int.hh:4170
IntVarBranch INT_VAR_REGRET_MIN_MIN(BranchTbl tbl)
Select variable with smallest min-regret.
Definition: var.hpp:272
Select all values starting from smallest.
Definition: int.hh:4166
IntVarBranch INT_VAR_DEGREE_MIN(BranchTbl tbl)
Select variable with smallest degree.
Definition: var.hpp:142
void when(Home home, BoolVar x, void(*t)(Space &home), void(*e)(Space &home), IntPropLevel)
Execute t (then) when x is assigned one, and e (else) otherwise.
Definition: exec.cpp:74
With smallest accumulated failure count divided by domain size.
Definition: int.hh:3992
void clause(Home home, BoolOpType o, const BoolVarArgs &x, const BoolVarArgs &y, int n, IntPropLevel)
Post domain consistent propagator for Boolean clause with positive variables x and negative variables...
Definition: bool.cpp:825
Equivalence for reification (default)
Definition: int.hh:834
Reify pmi(BoolVar x)
Use reverse implication for reification.
Definition: reify.hpp:81
Boolean view for Boolean variables.
Definition: view.hpp:1315
double(* BranchTbl)(const Space &home, double w, double b)
Tie-break limit function.
Definition: branch-var.hpp:49
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, IntPropLevel cl)
Post propagators for the cumulatives constraint.