00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef __GECODE_INT_HH__
00047 #define __GECODE_INT_HH__
00048
00049 #include <climits>
00050 #include <cfloat>
00051 #include <iostream>
00052
00053 #include <vector>
00054
00055 #include <gecode/kernel.hh>
00056 #include <gecode/iter.hh>
00057
00058
00059
00060
00061
00062 #if !defined(GECODE_STATIC_LIBS) && \
00063 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
00064
00065 #ifdef GECODE_BUILD_INT
00066 #define GECODE_INT_EXPORT __declspec( dllexport )
00067 #else
00068 #define GECODE_INT_EXPORT __declspec( dllimport )
00069 #endif
00070
00071 #else
00072
00073 #ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
00074 #define GECODE_INT_EXPORT __attribute__ ((visibility("default")))
00075 #else
00076 #define GECODE_INT_EXPORT
00077 #endif
00078
00079 #endif
00080
00081
00082 #ifndef GECODE_BUILD_INT
00083 #define GECODE_LIBRARY_NAME "Int"
00084 #include <gecode/support/auto-link.hpp>
00085 #endif
00086
00098 #include <gecode/int/exception.hpp>
00099
00100 namespace Gecode { namespace Int {
00101
00109 namespace Limits {
00111 const int max = INT_MAX - 1;
00113 const int min = -max;
00115 const int infinity = max + 1;
00117 bool valid(int n);
00119 bool valid(double n);
00121 void check(int n, const char* l);
00123 void check(double n, const char* l);
00125 void positive(int n, const char* l);
00127 void positive(double n, const char* l);
00129 void nonnegative(int n, const char* l);
00131 void nonnegative(double n, const char* l);
00133 const double double_max = 9007199254740991.0;
00135 const double double_min = -9007199254740991.0;
00137 void double_check(double n, const char* l);
00139 const double double_infinity = DBL_MAX;
00140 }
00141
00142 }}
00143
00144 #include <gecode/int/limits.hpp>
00145
00146 namespace Gecode {
00147
00148 class IntSetRanges;
00149
00157 class IntSet : public SharedHandle {
00158 friend class IntSetRanges;
00159 private:
00161 class Range {
00162 public:
00163 int min, max;
00164 };
00165 class IntSetObject : public SharedHandle::Object {
00166 public:
00168 unsigned int size;
00170 int n;
00172 Range* r;
00174 GECODE_INT_EXPORT static IntSetObject* allocate(int m);
00176 GECODE_INT_EXPORT SharedHandle::Object* copy(void) const;
00178 GECODE_INT_EXPORT bool in(int n) const;
00180 GECODE_INT_EXPORT virtual ~IntSetObject(void);
00181 };
00183 class MinInc;
00185 GECODE_INT_EXPORT void normalize(Range* r, int n);
00187 GECODE_INT_EXPORT void init(int n, int m);
00189 GECODE_INT_EXPORT void init(const int r[], int n);
00191 GECODE_INT_EXPORT void init(const int r[][2], int n);
00192 public:
00194
00195
00196 IntSet(void);
00201 IntSet(int n, int m);
00203 IntSet(const int r[], int n);
00209 IntSet(const int r[][2], int n);
00211 template<class I>
00212 explicit IntSet(I& i);
00213 #ifdef __INTEL_COMPILER
00214
00215 IntSet(const IntSet& s);
00217 IntSet(IntSet& s);
00219 IntSet(const PrimArgArray<int>& i);
00221 IntSet(PrimArgArray<int>& i);
00222 #endif
00223
00224
00226
00227
00228 int ranges(void) const;
00230 int min(int i) const;
00232 int max(int i) const;
00234 unsigned int width(int i) const;
00236
00238
00239
00240 bool in(int n) const;
00242 unsigned int size(void) const;
00244 unsigned int width(void) const;
00246 int min(void) const;
00248 int max(void) const;
00250
00252
00253
00254 GECODE_INT_EXPORT static const IntSet empty;
00256 };
00257
00263 class IntSetRanges {
00264 private:
00266 const IntSet::Range* i;
00268 const IntSet::Range* e;
00269 public:
00271
00272
00273 IntSetRanges(void);
00275 IntSetRanges(const IntSet& s);
00277 void init(const IntSet& s);
00279
00281
00282
00283 bool operator ()(void) const;
00285 void operator ++(void);
00287
00289
00290
00291 int min(void) const;
00293 int max(void) const;
00295 unsigned int width(void) const;
00297 };
00298
00304 class IntSetValues : public Iter::Ranges::ToValues<IntSetRanges> {
00305 public:
00307
00308
00309 IntSetValues(void);
00311 IntSetValues(const IntSet& s);
00313 void init(const IntSet& s);
00315 };
00316
00321 template<class Char, class Traits>
00322 std::basic_ostream<Char,Traits>&
00323 operator <<(std::basic_ostream<Char,Traits>& os, const IntSet& s);
00324
00325 }
00326
00327 #include <gecode/int/int-set-1.hpp>
00328
00329 #include <gecode/int/var-imp.hpp>
00330
00331 namespace Gecode {
00332
00333 namespace Int {
00334 class IntView;
00335 }
00336
00342 class IntVar : public VarImpVar<Int::IntVarImp> {
00343 friend class IntVarArray;
00344 friend class IntVarArgs;
00345 private:
00346 using VarImpVar<Int::IntVarImp>::x;
00353 void _init(Space& home, int min, int max);
00360 void _init(Space& home, const IntSet& d);
00361 public:
00363
00364
00365 IntVar(void);
00367 IntVar(const IntVar& y);
00369 IntVar(const Int::IntView& y);
00381 GECODE_INT_EXPORT IntVar(Space& home, int min, int max);
00393 GECODE_INT_EXPORT IntVar(Space& home, const IntSet& d);
00395
00397
00398
00399 int min(void) const;
00401 int max(void) const;
00403 int med(void) const;
00411 int val(void) const;
00412
00414 unsigned int size(void) const;
00416 unsigned int width(void) const;
00418 unsigned int regret_min(void) const;
00420 unsigned int regret_max(void) const;
00422
00424
00425
00426 bool range(void) const;
00428 bool in(int n) const;
00430 };
00431
00436 template<class Char, class Traits>
00437 std::basic_ostream<Char,Traits>&
00438 operator <<(std::basic_ostream<Char,Traits>& os, const IntVar& x);
00439
00444 class IntVarRanges : public Int::IntVarImpFwd {
00445 public:
00447
00448
00449 IntVarRanges(void);
00451 IntVarRanges(const IntVar& x);
00453 void init(const IntVar& x);
00455 };
00456
00461 class IntVarValues : public Iter::Ranges::ToValues<IntVarRanges> {
00462 public:
00464
00465
00466 IntVarValues(void);
00468 IntVarValues(const IntVar& x);
00470 void init(const IntVar& x);
00472 };
00473
00474 namespace Int {
00475 class BoolView;
00476 }
00477
00483 class BoolVar : public VarImpVar<Int::BoolVarImp> {
00484 friend class BoolVarArray;
00485 friend class BoolVarArgs;
00486 private:
00487 using VarImpVar<Int::BoolVarImp>::x;
00494 void _init(Space& home, int min, int max);
00495 public:
00497
00498
00499 BoolVar(void);
00501 BoolVar(const BoolVar& y);
00503 BoolVar(const Int::BoolView& y);
00515 GECODE_INT_EXPORT BoolVar(Space& home, int min, int max);
00517
00519
00520
00521 int min(void) const;
00523 int max(void) const;
00525 int med(void) const;
00533 int val(void) const;
00534
00536 unsigned int size(void) const;
00538 unsigned int width(void) const;
00540 unsigned int regret_min(void) const;
00542 unsigned int regret_max(void) const;
00544
00546
00547
00548 bool range(void) const;
00550 bool in(int n) const;
00552
00554
00555
00556 bool zero(void) const;
00558 bool one(void) const;
00560 bool none(void) const;
00562 };
00563
00568 template<class Char, class Traits>
00569 std::basic_ostream<Char,Traits>&
00570 operator <<(std::basic_ostream<Char,Traits>& os, const BoolVar& x);
00571
00572 }
00573
00574
00575 #include <gecode/int/view.hpp>
00576 #include <gecode/int/propagator.hpp>
00577
00578 namespace Gecode {
00579
00589
00590 typedef ArgArray<IntSet> IntSetArgs;
00591
00592 }
00593
00594 #include <gecode/int/array-traits.hpp>
00595
00596 namespace Gecode {
00597
00599 class IntArgs : public PrimArgArray<int> {
00600 public:
00602
00603
00604 IntArgs(void);
00606 explicit IntArgs(int n);
00608 IntArgs(const SharedArray<int>& x);
00610 IntArgs(const std::vector<int>& x);
00612 GECODE_INT_EXPORT
00613 IntArgs(int n, int e0, ...);
00615 IntArgs(int n, const int* e);
00617 IntArgs(const PrimArgArray<int>& a);
00618
00620 static IntArgs create(int n, int start, int inc=1);
00622 };
00623
00625 class IntVarArgs : public VarArgArray<IntVar> {
00626 public:
00628
00629
00630 IntVarArgs(void) {}
00632 explicit IntVarArgs(int n) : VarArgArray<IntVar>(n) {}
00634 IntVarArgs(const IntVarArgs& a) : VarArgArray<IntVar>(a) {}
00636 IntVarArgs(const VarArray<IntVar>& a) : VarArgArray<IntVar>(a) {}
00648 GECODE_INT_EXPORT
00649 IntVarArgs(Space& home, int n, int min, int max);
00661 GECODE_INT_EXPORT
00662 IntVarArgs(Space& home, int n, const IntSet& s);
00664 };
00673 class BoolVarArgs : public VarArgArray<BoolVar> {
00674 public:
00676
00677
00678 BoolVarArgs(void) {}
00680 explicit BoolVarArgs(int n) : VarArgArray<BoolVar>(n) {}
00682 BoolVarArgs(const BoolVarArgs& a) : VarArgArray<BoolVar>(a) {}
00684 BoolVarArgs(const VarArray<BoolVar>& a)
00685 : VarArgArray<BoolVar>(a) {}
00697 GECODE_INT_EXPORT
00698 BoolVarArgs(Space& home, int n, int min, int max);
00700 };
00702
00718 class IntVarArray : public VarArray<IntVar> {
00719 public:
00721
00722
00723 IntVarArray(void);
00725 IntVarArray(Space& home, int n);
00727 IntVarArray(const IntVarArray& a);
00729 IntVarArray(Space& home, const IntVarArgs& a);
00741 GECODE_INT_EXPORT
00742 IntVarArray(Space& home, int n, int min, int max);
00754 GECODE_INT_EXPORT
00755 IntVarArray(Space& home, int n, const IntSet& s);
00757 };
00758
00763 class BoolVarArray : public VarArray<BoolVar> {
00764 public:
00766
00767
00768 BoolVarArray(void);
00770 BoolVarArray(Space& home, int n);
00772 BoolVarArray(const BoolVarArray& a);
00774 BoolVarArray(Space& home, const BoolVarArgs& a);
00786 GECODE_INT_EXPORT
00787 BoolVarArray(Space& home, int n, int min, int max);
00789 };
00790
00791 }
00792
00793 #include <gecode/int/int-set-2.hpp>
00794
00795 #include <gecode/int/array.hpp>
00796
00797 namespace Gecode {
00798
00803 enum IntRelType {
00804 IRT_EQ,
00805 IRT_NQ,
00806 IRT_LQ,
00807 IRT_LE,
00808 IRT_GQ,
00809 IRT_GR
00810 };
00811
00816 enum BoolOpType {
00817 BOT_AND,
00818 BOT_OR,
00819 BOT_IMP,
00820 BOT_EQV,
00821 BOT_XOR
00822 };
00823
00837 enum IntConLevel {
00838 ICL_VAL,
00839 ICL_BND,
00840 ICL_DOM,
00841 ICL_DEF
00842 };
00843
00849 enum TaskType {
00850 TT_FIXP,
00851 TT_FIXS,
00852 TT_FIXE
00853 };
00854
00860 typedef PrimArgArray<TaskType> TaskTypeArgs;
00861
00863 template<>
00864 class ArrayTraits<PrimArgArray<TaskType> > {
00865 public:
00866 typedef TaskTypeArgs StorageType;
00867 typedef TaskType ValueType;
00868 typedef TaskTypeArgs ArgsType;
00869 };
00870
00871
00879
00880 GECODE_INT_EXPORT void
00881 dom(Home home, IntVar x, int n,
00882 IntConLevel icl=ICL_DEF);
00884 GECODE_INT_EXPORT void
00885 dom(Home home, const IntVarArgs& x, int n,
00886 IntConLevel icl=ICL_DEF);
00887
00889 GECODE_INT_EXPORT void
00890 dom(Home home, IntVar x, int l, int m,
00891 IntConLevel icl=ICL_DEF);
00893 GECODE_INT_EXPORT void
00894 dom(Home home, const IntVarArgs& x, int l, int m,
00895 IntConLevel icl=ICL_DEF);
00896
00898 GECODE_INT_EXPORT void
00899 dom(Home home, IntVar x, const IntSet& s,
00900 IntConLevel icl=ICL_DEF);
00902 GECODE_INT_EXPORT void
00903 dom(Home home, const IntVarArgs& x, const IntSet& s,
00904 IntConLevel icl=ICL_DEF);
00905
00907 GECODE_INT_EXPORT void
00908 dom(Home home, IntVar x, int n, BoolVar b,
00909 IntConLevel icl=ICL_DEF);
00911 GECODE_INT_EXPORT void
00912 dom(Home home, IntVar x, int l, int m, BoolVar b,
00913 IntConLevel icl=ICL_DEF);
00915 GECODE_INT_EXPORT void
00916 dom(Home home, IntVar x, const IntSet& s, BoolVar b,
00917 IntConLevel icl=ICL_DEF);
00919
00920
00931 GECODE_INT_EXPORT void
00932 rel(Home home, IntVar x0, IntRelType r, IntVar x1,
00933 IntConLevel icl=ICL_DEF);
00940 GECODE_INT_EXPORT void
00941 rel(Home home, const IntVarArgs& x, IntRelType r, IntVar y,
00942 IntConLevel icl=ICL_DEF);
00946 GECODE_INT_EXPORT void
00947 rel(Home home, IntVar x, IntRelType r, int c,
00948 IntConLevel icl=ICL_DEF);
00952 GECODE_INT_EXPORT void
00953 rel(Home home, const IntVarArgs& x, IntRelType r, int c,
00954 IntConLevel icl=ICL_DEF);
00961 GECODE_INT_EXPORT void
00962 rel(Home home, IntVar x0, IntRelType r, IntVar x1, BoolVar b,
00963 IntConLevel icl=ICL_DEF);
00970 GECODE_INT_EXPORT void
00971 rel(Home home, IntVar x, IntRelType r, int c, BoolVar b,
00972 IntConLevel icl=ICL_DEF);
00987 GECODE_INT_EXPORT void
00988 rel(Home home, const IntVarArgs& x, IntRelType r,
00989 IntConLevel icl=ICL_DEF);
01004 GECODE_INT_EXPORT void
01005 rel(Home home, const IntVarArgs& x, IntRelType r, const IntVarArgs& y,
01006 IntConLevel icl=ICL_DEF);
01007
01015 GECODE_INT_EXPORT void
01016 rel(Home home, BoolVar x0, IntRelType r, BoolVar x1,
01017 IntConLevel icl=ICL_DEF);
01021 GECODE_INT_EXPORT void
01022 rel(Home home, BoolVar x0, IntRelType r, BoolVar x1, BoolVar b,
01023 IntConLevel icl=ICL_DEF);
01027 GECODE_INT_EXPORT void
01028 rel(Home home, const BoolVarArgs& x, IntRelType r, BoolVar y,
01029 IntConLevel icl=ICL_DEF);
01037 GECODE_INT_EXPORT void
01038 rel(Home home, BoolVar x, IntRelType r, int n,
01039 IntConLevel icl=ICL_DEF);
01047 GECODE_INT_EXPORT void
01048 rel(Home home, BoolVar x, IntRelType r, int n, BoolVar b,
01049 IntConLevel icl=ICL_DEF);
01057 GECODE_INT_EXPORT void
01058 rel(Home home, const BoolVarArgs& x, IntRelType r, int n,
01059 IntConLevel icl=ICL_DEF);
01069 GECODE_INT_EXPORT void
01070 rel(Home home, const BoolVarArgs& x, IntRelType r, const BoolVarArgs& y,
01071 IntConLevel icl=ICL_DEF);
01082 GECODE_INT_EXPORT void
01083 rel(Home home, const BoolVarArgs& x, IntRelType r,
01084 IntConLevel icl=ICL_DEF);
01090 GECODE_INT_EXPORT void
01091 rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, BoolVar x2,
01092 IntConLevel icl=ICL_DEF);
01101 GECODE_INT_EXPORT void
01102 rel(Home home, BoolVar x0, BoolOpType o, BoolVar x1, int n,
01103 IntConLevel icl=ICL_DEF);
01113 GECODE_INT_EXPORT void
01114 rel(Home home, BoolOpType o, const BoolVarArgs& x, BoolVar y,
01115 IntConLevel icl=ICL_DEF);
01128 GECODE_INT_EXPORT void
01129 rel(Home home, BoolOpType o, const BoolVarArgs& x, int n,
01130 IntConLevel icl=ICL_DEF);
01141 GECODE_INT_EXPORT void
01142 clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
01143 BoolVar z, IntConLevel icl=ICL_DEF);
01157 GECODE_INT_EXPORT void
01158 clause(Home home, BoolOpType o, const BoolVarArgs& x, const BoolVarArgs& y,
01159 int n, IntConLevel icl=ICL_DEF);
01160
01161
01173 GECODE_INT_EXPORT void
01174 precede(Home home, const IntVarArgs& x, int s, int t,
01175 IntConLevel=ICL_DEF);
01183 GECODE_INT_EXPORT void
01184 precede(Home home, const IntVarArgs& x, const IntArgs& c,
01185 IntConLevel=ICL_DEF);
01186
01187
01193
01194 GECODE_INT_EXPORT void
01195 member(Home home, const IntVarArgs& x, IntVar y,
01196 IntConLevel icl=ICL_DEF);
01198 GECODE_INT_EXPORT void
01199 member(Home home, const BoolVarArgs& x, BoolVar y,
01200 IntConLevel icl=ICL_DEF);
01202 GECODE_INT_EXPORT void
01203 member(Home home, const IntVarArgs& x, IntVar y, BoolVar b,
01204 IntConLevel icl=ICL_DEF);
01206 GECODE_INT_EXPORT void
01207 member(Home home, const BoolVarArgs& x, BoolVar y, BoolVar b,
01208 IntConLevel icl=ICL_DEF);
01210
01211
01218
01219 typedef SharedArray<int> IntSharedArray;
01225 GECODE_INT_EXPORT void
01226 element(Home home, IntSharedArray n, IntVar x0, IntVar x1,
01227 IntConLevel icl=ICL_DEF);
01233 GECODE_INT_EXPORT void
01234 element(Home home, IntSharedArray n, IntVar x0, BoolVar x1,
01235 IntConLevel icl=ICL_DEF);
01241 GECODE_INT_EXPORT void
01242 element(Home home, IntSharedArray n, IntVar x0, int x1,
01243 IntConLevel icl=ICL_DEF);
01249 GECODE_INT_EXPORT void
01250 element(Home home, const IntVarArgs& x, IntVar y0, IntVar y1,
01251 IntConLevel icl=ICL_DEF);
01257 GECODE_INT_EXPORT void
01258 element(Home home, const IntVarArgs& x, IntVar y0, int y1,
01259 IntConLevel icl=ICL_DEF);
01261 GECODE_INT_EXPORT void
01262 element(Home home, const BoolVarArgs& x, IntVar y0, BoolVar y1,
01263 IntConLevel icl=ICL_DEF);
01265 GECODE_INT_EXPORT void
01266 element(Home home, const BoolVarArgs& x, IntVar y0, int y1,
01267 IntConLevel icl=ICL_DEF);
01268
01281 GECODE_INT_EXPORT void
01282 element(Home home, IntSharedArray a,
01283 IntVar x, int w, IntVar y, int h, IntVar z,
01284 IntConLevel icl=ICL_DEF);
01297 GECODE_INT_EXPORT void
01298 element(Home home, IntSharedArray a,
01299 IntVar x, int w, IntVar y, int h, BoolVar z,
01300 IntConLevel icl=ICL_DEF);
01316 GECODE_INT_EXPORT void
01317 element(Home home, const IntVarArgs& a,
01318 IntVar x, int w, IntVar y, int h, IntVar z,
01319 IntConLevel icl=ICL_DEF);
01332 GECODE_INT_EXPORT void
01333 element(Home home, const BoolVarArgs& a,
01334 IntVar x, int w, IntVar y, int h, BoolVar z,
01335 IntConLevel icl=ICL_DEF);
01337
01338
01353 GECODE_INT_EXPORT void
01354 distinct(Home home, const IntVarArgs& x,
01355 IntConLevel icl=ICL_DEF);
01368 GECODE_INT_EXPORT void
01369 distinct(Home home, const IntArgs& n, const IntVarArgs& x,
01370 IntConLevel icl=ICL_DEF);
01372
01373
01391 GECODE_INT_EXPORT void
01392 channel(Home home, const IntVarArgs& x, const IntVarArgs& y,
01393 IntConLevel icl=ICL_DEF);
01394
01408 GECODE_INT_EXPORT void
01409 channel(Home home, const IntVarArgs& x, int xoff,
01410 const IntVarArgs& y, int yoff,
01411 IntConLevel icl=ICL_DEF);
01412
01414 GECODE_INT_EXPORT void
01415 channel(Home home, BoolVar x0, IntVar x1,
01416 IntConLevel icl=ICL_DEF);
01418 forceinline void
01419 channel(Home home, IntVar x0, BoolVar x1,
01420 IntConLevel icl=ICL_DEF) {
01421 channel(home,x1,x0,icl);
01422 }
01428 GECODE_INT_EXPORT void
01429 channel(Home home, const BoolVarArgs& x, IntVar y, int o=0,
01430 IntConLevel icl=ICL_DEF);
01432
01433
01450 GECODE_INT_EXPORT void
01451 sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
01452 IntConLevel icl=ICL_DEF);
01453
01465 GECODE_INT_EXPORT void
01466 sorted(Home home, const IntVarArgs& x, const IntVarArgs& y,
01467 const IntVarArgs& z,
01468 IntConLevel icl=ICL_DEF);
01470
01471
01490 GECODE_INT_EXPORT void
01491 count(Home home, const IntVarArgs& x, int n, IntRelType r, int m,
01492 IntConLevel icl=ICL_DEF);
01497 GECODE_INT_EXPORT void
01498 count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType r, int m,
01499 IntConLevel icl=ICL_DEF);
01506 GECODE_INT_EXPORT void
01507 count(Home home, const IntVarArgs& x, IntVar y, IntRelType r, int m,
01508 IntConLevel icl=ICL_DEF);
01516 GECODE_INT_EXPORT void
01517 count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType r, int m,
01518 IntConLevel icl=ICL_DEF);
01523 GECODE_INT_EXPORT void
01524 count(Home home, const IntVarArgs& x, int n, IntRelType r, IntVar z,
01525 IntConLevel icl=ICL_DEF);
01530 GECODE_INT_EXPORT void
01531 count(Home home, const IntVarArgs& x, const IntSet& y, IntRelType r, IntVar z,
01532 IntConLevel icl=ICL_DEF);
01539 GECODE_INT_EXPORT void
01540 count(Home home, const IntVarArgs& x, IntVar y, IntRelType r, IntVar z,
01541 IntConLevel icl=ICL_DEF);
01549 GECODE_INT_EXPORT void
01550 count(Home home, const IntVarArgs& x, const IntArgs& y, IntRelType r, IntVar z,
01551 IntConLevel icl=ICL_DEF);
01552
01566 GECODE_INT_EXPORT void
01567 count(Home home, const IntVarArgs& x, const IntVarArgs& c,
01568 IntConLevel icl=ICL_DEF);
01569
01583 GECODE_INT_EXPORT void
01584 count(Home home, const IntVarArgs& x, const IntSetArgs& c,
01585 IntConLevel icl=ICL_DEF);
01586
01603 GECODE_INT_EXPORT void
01604 count(Home home, const IntVarArgs& x,
01605 const IntVarArgs& c, const IntArgs& v,
01606 IntConLevel icl=ICL_DEF);
01607
01624 GECODE_INT_EXPORT void
01625 count(Home home, const IntVarArgs& x,
01626 const IntSetArgs& c, const IntArgs& v,
01627 IntConLevel icl=ICL_DEF);
01628
01645 GECODE_INT_EXPORT void
01646 count(Home home, const IntVarArgs& x,
01647 const IntSet& c, const IntArgs& v,
01648 IntConLevel icl=ICL_DEF);
01649
01651
01666 GECODE_INT_EXPORT void
01667 nvalues(Home home, const IntVarArgs& x, IntRelType r, int y,
01668 IntConLevel icl=ICL_DEF);
01672 GECODE_INT_EXPORT void
01673 nvalues(Home home, const IntVarArgs& x, IntRelType r, IntVar y,
01674 IntConLevel icl=ICL_DEF);
01678 GECODE_INT_EXPORT void
01679 nvalues(Home home, const BoolVarArgs& x, IntRelType r, int y,
01680 IntConLevel icl=ICL_DEF);
01684 GECODE_INT_EXPORT void
01685 nvalues(Home home, const BoolVarArgs& x, IntRelType r, IntVar y,
01686 IntConLevel icl=ICL_DEF);
01688
01709 GECODE_INT_EXPORT void
01710 sequence(Home home, const IntVarArgs& x, const IntSet& s,
01711 int q, int l, int u, IntConLevel icl=ICL_DEF);
01712
01727 GECODE_INT_EXPORT void
01728 sequence(Home home, const BoolVarArgs& x, const IntSet& s,
01729 int q, int l, int u, IntConLevel icl=ICL_DEF);
01730
01732
01745
01753 class DFA : public SharedHandle {
01754 private:
01756 class DFAI;
01757 public:
01759 class Transition {
01760 public:
01761 int i_state;
01762 int symbol;
01763 int o_state;
01764 };
01766 class Transitions {
01767 private:
01769 const Transition* c_trans;
01771 const Transition* e_trans;
01772 public:
01774 Transitions(const DFA& d);
01776 Transitions(const DFA& d, int n);
01778 bool operator ()(void) const;
01780 void operator ++(void);
01782 int i_state(void) const;
01784 int symbol(void) const;
01786 int o_state(void) const;
01787 };
01789 class Symbols {
01790 private:
01792 const Transition* c_trans;
01794 const Transition* e_trans;
01795 public:
01797 Symbols(const DFA& d);
01799 bool operator ()(void) const;
01801 void operator ++(void);
01803 int val(void) const;
01804 };
01805 public:
01806 friend class Transitions;
01808 DFA(void);
01820 GECODE_INT_EXPORT
01821 DFA(int s, Transition t[], int f[], bool minimize=true);
01823 DFA(const DFA& d);
01825 int n_states(void) const;
01827 int n_transitions(void) const;
01829 unsigned int n_symbols(void) const;
01831 unsigned int max_degree(void) const;
01833 int final_fst(void) const;
01835 int final_lst(void) const;
01837 int symbol_min(void) const;
01839 int symbol_max(void) const;
01840 };
01841
01842
01850 enum ExtensionalPropKind {
01851 EPK_DEF,
01852 EPK_SPEED,
01853 EPK_MEMORY
01854 };
01855
01866 GECODE_INT_EXPORT void
01867 extensional(Home home, const IntVarArgs& x, DFA d,
01868 IntConLevel icl=ICL_DEF);
01869
01880 GECODE_INT_EXPORT void
01881 extensional(Home home, const BoolVarArgs& x, DFA d,
01882 IntConLevel icl=ICL_DEF);
01883
01890 class TupleSet : public SharedHandle {
01891 public:
01896 typedef int* Tuple;
01897
01902 class GECODE_VTABLE_EXPORT TupleSetI
01903 : public SharedHandle::Object {
01904 public:
01906 int arity;
01908 int size;
01910 Tuple** tuples;
01912 Tuple* tuple_data;
01914 int* data;
01916 int excess;
01918 int min, max;
01920 unsigned int domsize;
01922 Tuple** last;
01924 Tuple* nullpointer;
01925
01927 template<class T>
01928 void add(T t);
01930 GECODE_INT_EXPORT void finalize(void);
01932 GECODE_INT_EXPORT void resize(void);
01934 bool finalized(void) const;
01936 TupleSetI(void);
01938 GECODE_INT_EXPORT virtual ~TupleSetI(void);
01940 GECODE_INT_EXPORT virtual SharedHandle::Object* copy(void) const;
01941 };
01942
01944 TupleSetI* implementation(void);
01945
01947 TupleSet(void);
01949 TupleSet(const TupleSet& d);
01950
01952 void add(const IntArgs& tuple);
01954 void finalize(void);
01956 bool finalized(void) const;
01958 int arity(void) const;
01960 int tuples(void) const;
01962 Tuple operator [](int i) const;
01964 int min(void) const;
01966 int max(void) const;
01967 };
01968
01987 GECODE_INT_EXPORT void
01988 extensional(Home home, const IntVarArgs& x, const TupleSet& t,
01989 ExtensionalPropKind epk=EPK_DEF, IntConLevel icl=ICL_DEF);
01990
02001 GECODE_INT_EXPORT void
02002 extensional(Home home, const BoolVarArgs& x, const TupleSet& t,
02003 ExtensionalPropKind epk=EPK_DEF, IntConLevel icl=ICL_DEF);
02005
02006 }
02007
02008 #include <gecode/int/extensional/dfa.hpp>
02009 #include <gecode/int/extensional/tuple-set.hpp>
02010
02011 namespace Gecode {
02012
02024 GECODE_INT_EXPORT void
02025 min(Home home, IntVar x0, IntVar x1, IntVar x2,
02026 IntConLevel icl=ICL_DEF);
02034 GECODE_INT_EXPORT void
02035 min(Home home, const IntVarArgs& x, IntVar y,
02036 IntConLevel icl=ICL_DEF);
02042 GECODE_INT_EXPORT void
02043 max(Home home, IntVar x0, IntVar x1, IntVar x2,
02044 IntConLevel icl=ICL_DEF);
02052 GECODE_INT_EXPORT void
02053 max(Home home, const IntVarArgs& x, IntVar y,
02054 IntConLevel icl=ICL_DEF);
02055
02061 GECODE_INT_EXPORT void
02062 abs(Home home, IntVar x0, IntVar x1,
02063 IntConLevel icl=ICL_DEF);
02064
02070 GECODE_INT_EXPORT void
02071 mult(Home home, IntVar x0, IntVar x1, IntVar x2,
02072 IntConLevel icl=ICL_DEF);
02073
02079 GECODE_INT_EXPORT void
02080 sqr(Home home, IntVar x0, IntVar x1,
02081 IntConLevel icl=ICL_DEF);
02082
02088 GECODE_INT_EXPORT void
02089 sqrt(Home home, IntVar x0, IntVar x1,
02090 IntConLevel icl=ICL_DEF);
02091
02096 GECODE_INT_EXPORT void
02097 divmod(Home home, IntVar x0, IntVar x1, IntVar x2, IntVar x3,
02098 IntConLevel icl=ICL_DEF);
02099
02104 GECODE_INT_EXPORT void
02105 div(Home home, IntVar x0, IntVar x1, IntVar x2,
02106 IntConLevel icl=ICL_DEF);
02107
02112 GECODE_INT_EXPORT void
02113 mod(Home home, IntVar x0, IntVar x1, IntVar x2,
02114 IntConLevel icl=ICL_DEF);
02116
02148 GECODE_INT_EXPORT void
02149 linear(Home home, const IntVarArgs& x,
02150 IntRelType r, int c,
02151 IntConLevel icl=ICL_DEF);
02155 GECODE_INT_EXPORT void
02156 linear(Home home, const IntVarArgs& x,
02157 IntRelType r, IntVar y,
02158 IntConLevel icl=ICL_DEF);
02162 GECODE_INT_EXPORT void
02163 linear(Home home, const IntVarArgs& x,
02164 IntRelType r, int c, BoolVar b,
02165 IntConLevel icl=ICL_DEF);
02169 GECODE_INT_EXPORT void
02170 linear(Home home, const IntVarArgs& x,
02171 IntRelType r, IntVar y, BoolVar b,
02172 IntConLevel icl=ICL_DEF);
02179 GECODE_INT_EXPORT void
02180 linear(Home home, const IntArgs& a, const IntVarArgs& x,
02181 IntRelType r, int c,
02182 IntConLevel icl=ICL_DEF);
02189 GECODE_INT_EXPORT void
02190 linear(Home home, const IntArgs& a, const IntVarArgs& x,
02191 IntRelType r, IntVar y,
02192 IntConLevel icl=ICL_DEF);
02199 GECODE_INT_EXPORT void
02200 linear(Home home, const IntArgs& a, const IntVarArgs& x,
02201 IntRelType r, int c, BoolVar b,
02202 IntConLevel icl=ICL_DEF);
02209 GECODE_INT_EXPORT void
02210 linear(Home home, const IntArgs& a, const IntVarArgs& x,
02211 IntRelType r, IntVar y, BoolVar b,
02212 IntConLevel icl=ICL_DEF);
02213
02214
02242 GECODE_INT_EXPORT void
02243 linear(Home home, const BoolVarArgs& x,
02244 IntRelType r, int c,
02245 IntConLevel icl=ICL_DEF);
02249 GECODE_INT_EXPORT void
02250 linear(Home home, const BoolVarArgs& x,
02251 IntRelType r, int c, BoolVar b,
02252 IntConLevel icl=ICL_DEF);
02256 GECODE_INT_EXPORT void
02257 linear(Home home, const BoolVarArgs& x,
02258 IntRelType r, IntVar y,
02259 IntConLevel icl=ICL_DEF);
02263 GECODE_INT_EXPORT void
02264 linear(Home home, const BoolVarArgs& x,
02265 IntRelType r, IntVar y, BoolVar b,
02266 IntConLevel icl=ICL_DEF);
02273 GECODE_INT_EXPORT void
02274 linear(Home home, const IntArgs& a, const BoolVarArgs& x,
02275 IntRelType r, int c,
02276 IntConLevel icl=ICL_DEF);
02283 GECODE_INT_EXPORT void
02284 linear(Home home, const IntArgs& a, const BoolVarArgs& x,
02285 IntRelType r, int c, BoolVar b,
02286 IntConLevel icl=ICL_DEF);
02293 GECODE_INT_EXPORT void
02294 linear(Home home, const IntArgs& a, const BoolVarArgs& x,
02295 IntRelType r, IntVar y,
02296 IntConLevel icl=ICL_DEF);
02303 GECODE_INT_EXPORT void
02304 linear(Home home, const IntArgs& a, const BoolVarArgs& x,
02305 IntRelType r, IntVar y, BoolVar b,
02306 IntConLevel icl=ICL_DEF);
02307
02308
02335 GECODE_INT_EXPORT void
02336 binpacking(Home home,
02337 const IntVarArgs& l,
02338 const IntVarArgs& b, const IntArgs& s,
02339 IntConLevel icl=ICL_DEF);
02359 GECODE_INT_EXPORT void
02360 nooverlap(Home home,
02361 const IntVarArgs& x, const IntArgs& w,
02362 const IntVarArgs& y, const IntArgs& h,
02363 IntConLevel icl=ICL_DEF);
02379 GECODE_INT_EXPORT void
02380 nooverlap(Home home,
02381 const IntVarArgs& x, const IntArgs& w,
02382 const IntVarArgs& y, const IntArgs& h,
02383 const BoolVarArgs& o,
02384 IntConLevel icl=ICL_DEF);
02403 GECODE_INT_EXPORT void
02404 nooverlap(Home home,
02405 const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
02406 const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
02407 IntConLevel icl=ICL_DEF);
02427 GECODE_INT_EXPORT void
02428 nooverlap(Home home,
02429 const IntVarArgs& x0, const IntVarArgs& w, const IntVarArgs& x1,
02430 const IntVarArgs& y0, const IntVarArgs& h, const IntVarArgs& y1,
02431 const BoolVarArgs& o,
02432 IntConLevel icl=ICL_DEF);
02433
02434
02440
02483 GECODE_INT_EXPORT void
02484 cumulatives(Home home, const IntVarArgs& m,
02485 const IntVarArgs& s, const IntVarArgs& p,
02486 const IntVarArgs& e, const IntVarArgs& u,
02487 const IntArgs& c, bool at_most,
02488 IntConLevel icl=ICL_DEF);
02493 GECODE_INT_EXPORT void
02494 cumulatives(Home home, const IntArgs& m,
02495 const IntVarArgs& s, const IntVarArgs& p,
02496 const IntVarArgs& e, const IntVarArgs& u,
02497 const IntArgs& c, bool at_most,
02498 IntConLevel icl=ICL_DEF);
02503 GECODE_INT_EXPORT void
02504 cumulatives(Home home, const IntVarArgs& m,
02505 const IntVarArgs& s, const IntArgs& p,
02506 const IntVarArgs& e, const IntVarArgs& u,
02507 const IntArgs& c, bool at_most,
02508 IntConLevel icl=ICL_DEF);
02513 GECODE_INT_EXPORT void
02514 cumulatives(Home home, const IntArgs& m,
02515 const IntVarArgs& s, const IntArgs& p,
02516 const IntVarArgs& e, const IntVarArgs& u,
02517 const IntArgs& c, bool at_most,
02518 IntConLevel icl=ICL_DEF);
02523 GECODE_INT_EXPORT void
02524 cumulatives(Home home, const IntVarArgs& m,
02525 const IntVarArgs& s, const IntVarArgs& p,
02526 const IntVarArgs& e, const IntArgs& u,
02527 const IntArgs& c, bool at_most,
02528 IntConLevel icl=ICL_DEF);
02533 GECODE_INT_EXPORT void
02534 cumulatives(Home home, const IntArgs& m,
02535 const IntVarArgs& s, const IntVarArgs& p,
02536 const IntVarArgs& e, const IntArgs& u,
02537 const IntArgs& c, bool at_most,
02538 IntConLevel icl=ICL_DEF);
02543 GECODE_INT_EXPORT void
02544 cumulatives(Home home, const IntVarArgs& m,
02545 const IntVarArgs& s, const IntArgs& p,
02546 const IntVarArgs& e, const IntArgs& u,
02547 const IntArgs& c, bool at_most,
02548 IntConLevel icl=ICL_DEF);
02553 GECODE_INT_EXPORT void
02554 cumulatives(Home home, const IntArgs& m,
02555 const IntVarArgs& s, const IntArgs& p,
02556 const IntVarArgs& e, const IntArgs& u,
02557 const IntArgs& c, bool at_most,
02558 IntConLevel icl=ICL_DEF);
02559
02578 GECODE_INT_EXPORT void
02579 unary(Home home, const IntVarArgs& s, const IntArgs& p,
02580 IntConLevel icl=ICL_DEF);
02581
02602 GECODE_INT_EXPORT void
02603 unary(Home home, const IntVarArgs& s, const IntArgs& p,
02604 const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02605
02634 GECODE_INT_EXPORT void
02635 unary(Home home, const TaskTypeArgs& t,
02636 const IntVarArgs& flex, const IntArgs& fix, IntConLevel icl=ICL_DEF);
02637
02668 GECODE_INT_EXPORT void
02669 unary(Home home, const TaskTypeArgs& t,
02670 const IntVarArgs& flex, const IntArgs& fix,
02671 const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02672
02692 GECODE_INT_EXPORT void
02693 unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
02694 const IntVarArgs& e, IntConLevel icl=ICL_DEF);
02695
02717 GECODE_INT_EXPORT void
02718 unary(Home home, const IntVarArgs& s, const IntVarArgs& p,
02719 const IntVarArgs& e, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02720
02755 GECODE_INT_EXPORT void
02756 cumulative(Home home, int c, const TaskTypeArgs& t,
02757 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
02758 IntConLevel icl=ICL_DEF);
02759
02760
02765 GECODE_INT_EXPORT void
02766 cumulative(Home home, IntVar c, const TaskTypeArgs& t,
02767 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
02768 IntConLevel icl=ICL_DEF);
02769
02806 GECODE_INT_EXPORT void
02807 cumulative(Home home, int c, const TaskTypeArgs& t,
02808 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
02809 const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02810
02814 GECODE_INT_EXPORT void
02815 cumulative(Home home, IntVar c, const TaskTypeArgs& t,
02816 const IntVarArgs& flex, const IntArgs& fix, const IntArgs& u,
02817 const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02818
02843 GECODE_INT_EXPORT void
02844 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
02845 const IntArgs& u, IntConLevel icl=ICL_DEF);
02846
02850 GECODE_INT_EXPORT void
02851 cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
02852 const IntArgs& u, IntConLevel icl=ICL_DEF);
02853
02880 GECODE_INT_EXPORT void
02881 cumulative(Home home, int c, const IntVarArgs& s, const IntArgs& p,
02882 const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02883
02887 GECODE_INT_EXPORT void
02888 cumulative(Home home, IntVar c, const IntVarArgs& s, const IntArgs& p,
02889 const IntArgs& u, const BoolVarArgs& m, IntConLevel icl=ICL_DEF);
02890
02919 GECODE_INT_EXPORT void
02920 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
02921 const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
02922
02926 GECODE_INT_EXPORT void
02927 cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
02928 const IntVarArgs& e, const IntArgs& u, IntConLevel icl=ICL_DEF);
02929
02960 GECODE_INT_EXPORT void
02961 cumulative(Home home, int c, const IntVarArgs& s, const IntVarArgs& p,
02962 const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
02963 IntConLevel icl=ICL_DEF);
02964
02968 GECODE_INT_EXPORT void
02969 cumulative(Home home, IntVar c, const IntVarArgs& s, const IntVarArgs& p,
02970 const IntVarArgs& e, const IntArgs& u, const BoolVarArgs& m,
02971 IntConLevel icl=ICL_DEF);
02973
02974
02994 GECODE_INT_EXPORT void
02995 circuit(Home home, const IntVarArgs& x,
02996 IntConLevel icl=ICL_DEF);
03012 GECODE_INT_EXPORT void
03013 circuit(Home home, int offset, const IntVarArgs& x,
03014 IntConLevel icl=ICL_DEF);
03036 GECODE_INT_EXPORT void
03037 circuit(Home home,
03038 const IntArgs& c,
03039 const IntVarArgs& x, const IntVarArgs& y, IntVar z,
03040 IntConLevel icl=ICL_DEF);
03063 GECODE_INT_EXPORT void
03064 circuit(Home home,
03065 const IntArgs& c, int offset,
03066 const IntVarArgs& x, const IntVarArgs& y, IntVar z,
03067 IntConLevel icl=ICL_DEF);
03086 GECODE_INT_EXPORT void
03087 circuit(Home home,
03088 const IntArgs& c,
03089 const IntVarArgs& x, IntVar z,
03090 IntConLevel icl=ICL_DEF);
03111 GECODE_INT_EXPORT void
03112 circuit(Home home,
03113 const IntArgs& c, int offset,
03114 const IntVarArgs& x, IntVar z,
03115 IntConLevel icl=ICL_DEF);
03131 GECODE_INT_EXPORT void
03132 path(Home home, const IntVarArgs& x, IntVar s, IntVar e,
03133 IntConLevel icl=ICL_DEF);
03151 GECODE_INT_EXPORT void
03152 path(Home home, int offset, const IntVarArgs& x, IntVar s, IntVar e,
03153 IntConLevel icl=ICL_DEF);
03176 GECODE_INT_EXPORT void
03177 path(Home home,
03178 const IntArgs& c,
03179 const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
03180 IntConLevel icl=ICL_DEF);
03205 GECODE_INT_EXPORT void
03206 path(Home home,
03207 const IntArgs& c, int offset,
03208 const IntVarArgs& x, IntVar s, IntVar e, const IntVarArgs& y, IntVar z,
03209 IntConLevel icl=ICL_DEF);
03230 GECODE_INT_EXPORT void
03231 path(Home home,
03232 const IntArgs& c,
03233 const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
03234 IntConLevel icl=ICL_DEF);
03257 GECODE_INT_EXPORT void
03258 path(Home home,
03259 const IntArgs& c, int offset,
03260 const IntVarArgs& x, IntVar s, IntVar e, IntVar z,
03261 IntConLevel icl=ICL_DEF);
03263
03264
03265
03274
03275 GECODE_INT_EXPORT void
03276 wait(Home home, IntVar x, void (*c)(Space& home),
03277 IntConLevel icl=ICL_DEF);
03279 GECODE_INT_EXPORT void
03280 wait(Home home, BoolVar x, void (*c)(Space& home),
03281 IntConLevel icl=ICL_DEF);
03283 GECODE_INT_EXPORT void
03284 wait(Home home, const IntVarArgs& x, void (*c)(Space& home),
03285 IntConLevel icl=ICL_DEF);
03287 GECODE_INT_EXPORT void
03288 wait(Home home, const BoolVarArgs& x, void (*c)(Space& home),
03289 IntConLevel icl=ICL_DEF);
03291 GECODE_INT_EXPORT void
03292 when(Home home, BoolVar x,
03293 void (*t)(Space& home), void (*e)(Space& home)= NULL,
03294 IntConLevel icl=ICL_DEF);
03296
03297
03322 GECODE_INT_EXPORT void
03323 unshare(Home home, IntVarArgs& x,
03324 IntConLevel icl=ICL_DEF);
03326 GECODE_INT_EXPORT void
03327 unshare(Home home, BoolVarArgs& x,
03328 IntConLevel icl=ICL_DEF);
03330
03331
03337
03338 enum IntVarBranch {
03339 INT_VAR_NONE = 0,
03340 INT_VAR_RND,
03341 INT_VAR_DEGREE_MIN,
03342 INT_VAR_DEGREE_MAX,
03343 INT_VAR_AFC_MIN,
03344 INT_VAR_AFC_MAX,
03345 INT_VAR_MIN_MIN,
03346 INT_VAR_MIN_MAX,
03347 INT_VAR_MAX_MIN,
03348 INT_VAR_MAX_MAX,
03349 INT_VAR_SIZE_MIN,
03350 INT_VAR_SIZE_MAX,
03351 INT_VAR_SIZE_DEGREE_MIN,
03352 INT_VAR_SIZE_DEGREE_MAX,
03353 INT_VAR_SIZE_AFC_MIN,
03354 INT_VAR_SIZE_AFC_MAX,
03355
03360 INT_VAR_REGRET_MIN_MIN,
03366 INT_VAR_REGRET_MIN_MAX,
03372 INT_VAR_REGRET_MAX_MIN,
03378 INT_VAR_REGRET_MAX_MAX
03379 };
03380
03382 enum IntValBranch {
03383 INT_VAL_MIN,
03384 INT_VAL_MED,
03385 INT_VAL_MAX,
03386 INT_VAL_RND,
03387 INT_VAL_SPLIT_MIN,
03388 INT_VAL_SPLIT_MAX,
03389 INT_VAL_RANGE_MIN,
03390 INT_VAL_RANGE_MAX,
03391 INT_VALUES_MIN,
03392 INT_VALUES_MAX
03393 };
03394
03396 GECODE_INT_EXPORT void
03397 branch(Home home, const IntVarArgs& x,
03398 IntVarBranch vars, IntValBranch vals,
03399 const VarBranchOptions& o_vars = VarBranchOptions::def,
03400 const ValBranchOptions& o_vals = ValBranchOptions::def);
03402 GECODE_INT_EXPORT void
03403 branch(Home home, const IntVarArgs& x,
03404 const TieBreakVarBranch<IntVarBranch>& vars, IntValBranch vals,
03405 const TieBreakVarBranchOptions& o_vars = TieBreakVarBranchOptions::def,
03406 const ValBranchOptions& o_vals = ValBranchOptions::def);
03408 GECODE_INT_EXPORT void
03409 branch(Home home, IntVar x, IntValBranch vals,
03410 const ValBranchOptions& o_vals = ValBranchOptions::def);
03412 GECODE_INT_EXPORT void
03413 branch(Home home, const BoolVarArgs& x,
03414 IntVarBranch vars, IntValBranch vals,
03415 const VarBranchOptions& o_vars = VarBranchOptions::def,
03416 const ValBranchOptions& o_vals = ValBranchOptions::def);
03418 GECODE_INT_EXPORT void
03419 branch(Home home, const BoolVarArgs& x,
03420 const TieBreakVarBranch<IntVarBranch>& vars, IntValBranch vals,
03421 const TieBreakVarBranchOptions& o_vars = TieBreakVarBranchOptions::def,
03422 const ValBranchOptions& o_vals = ValBranchOptions::def);
03424 GECODE_INT_EXPORT void
03425 branch(Home home, BoolVar x, IntValBranch vals,
03426 const ValBranchOptions& o_vals = ValBranchOptions::def);
03427
03429
03435
03436 enum IntAssign {
03437 INT_ASSIGN_MIN,
03438 INT_ASSIGN_MED,
03439 INT_ASSIGN_MAX,
03440 INT_ASSIGN_RND
03441 };
03442
03444 GECODE_INT_EXPORT void
03445 assign(Home home, const IntVarArgs& x, IntAssign vals,
03446 const ValBranchOptions& o_vals = ValBranchOptions::def);
03448 GECODE_INT_EXPORT void
03449 assign(Home home, IntVar x, IntAssign vals,
03450 const ValBranchOptions& o_vals = ValBranchOptions::def);
03452 GECODE_INT_EXPORT void
03453 assign(Home home, const BoolVarArgs& x, IntAssign vals,
03454 const ValBranchOptions& o_vals = ValBranchOptions::def);
03456 GECODE_INT_EXPORT void
03457 assign(Home home, BoolVar x, IntAssign vals,
03458 const ValBranchOptions& o_vals = ValBranchOptions::def);
03459
03461
03465 template<class Char, class Traits>
03466 std::basic_ostream<Char,Traits>&
03467 operator <<(std::basic_ostream<Char,Traits>& os, const DFA& d);
03468
03472 template<class Char, class Traits>
03473 std::basic_ostream<Char,Traits>&
03474 operator <<(std::basic_ostream<Char,Traits>& os, const TupleSet& ts);
03475
03476 }
03477
03478 #endif
03479
03480
03481
03482