Generated on for Gecode by doxygen 1.17.0
set.hh
Go to the documentation of this file.
1/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
2/*
3 * Main authors:
4 * Guido Tack <tack@gecode.dev>
5 * Christian Schulte <schulte@gecode.dev>
6 *
7 * Contributing authors:
8 * Gabor Szokoli <szokoli@gecode.dev>
9 *
10 * Copyright:
11 * Guido Tack, 2004
12 * Christian Schulte, 2004
13 * Gabor Szokoli, 2004
14 *
15 * This file is part of Gecode, the generic constraint
16 * development environment:
17 * http://www.gecode.dev
18 *
19 * Permission is hereby granted, free of charge, to any person obtaining
20 * a copy of this software and associated documentation files (the
21 * "Software"), to deal in the Software without restriction, including
22 * without limitation the rights to use, copy, modify, merge, publish,
23 * distribute, sublicense, and/or sell copies of the Software, and to
24 * permit persons to whom the Software is furnished to do so, subject to
25 * the following conditions:
26 *
27 * The above copyright notice and this permission notice shall be
28 * included in all copies or substantial portions of the Software.
29 *
30 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
31 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
33 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
34 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
35 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
36 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
37 *
38 */
39
40#ifndef GECODE_SET_HH
41#define GECODE_SET_HH
42
43#include <gecode/kernel.hh>
44#include <gecode/int.hh>
45#include <gecode/iter.hh>
46
47#include <functional>
48
49/*
50 * Configure linking
51 *
52 */
53#if !defined(GECODE_STATIC_LIBS) && \
54 (defined(__CYGWIN__) || defined(__MINGW32__) || defined(_MSC_VER))
55
56#ifdef GECODE_BUILD_SET
57#define GECODE_SET_EXPORT __declspec( dllexport )
58#else
59#define GECODE_SET_EXPORT __declspec( dllimport )
60#endif
61
62#else
63
64#ifdef GECODE_GCC_HAS_CLASS_VISIBILITY
65#define GECODE_SET_EXPORT __attribute__ ((visibility("default")))
66#else
67#define GECODE_SET_EXPORT
68#endif
69
70#endif
71
72// Configure auto-linking
73#ifndef GECODE_BUILD_SET
74#define GECODE_LIBRARY_NAME "Set"
76#endif
77
78
89
91
92namespace Gecode { namespace Set {
93
95 namespace Limits {
97 const int max = (Gecode::Int::Limits::max / 2) - 1;
99 const int min = -max;
101 const unsigned int card = max-min+1;
103 void check(int n, const char* l);
105 void check(unsigned int n, const char* l);
107 void check(const IntSet& s, const char* l);
108 }
109
110}}
111
112#include <gecode/set/limits.hpp>
113
114#include <gecode/set/var-imp.hpp>
115
116namespace Gecode {
117
118 namespace Set {
119 class SetView;
120 }
121
127 class SetVar : public VarImpVar<Set::SetVarImp> {
128 friend class SetVarArray;
129 friend class SetVarArgs;
131 public:
133
134
135 SetVar(void);
137 SetVar(const SetVar& y);
139 SetVar(const Set::SetView& y);
140
143
162 SetVar(Space& home,int glbMin,int glbMax,int lubMin,int lubMax,
163 unsigned int cardMin = 0,
164 unsigned int cardMax = Set::Limits::card);
165
183 SetVar(Space& home,const IntSet& glbD,int lubMin,int lubMax,
184 unsigned int cardMin = 0,
185 unsigned int cardMax = Set::Limits::card);
186
205 SetVar(Space& home,int glbMin,int glbMax,const IntSet& lubD,
206 unsigned int cardMin = 0,
207 unsigned int cardMax = Set::Limits::card);
208
227 SetVar(Space& home,const IntSet& glbD,const IntSet& lubD,
228 unsigned int cardMin = 0,
229 unsigned int cardMax = Set::Limits::card);
231
233
234
235 unsigned int glbSize(void) const;
237 unsigned int lubSize(void) const;
239 unsigned int unknownSize(void) const;
241 unsigned int cardMin(void) const;
243 unsigned int cardMax(void) const;
245 int lubMin(void) const;
247 int lubMax(void) const;
249 int glbMin(void) const;
251 int glbMax(void) const;
253
255
256
257 bool contains(int i) const;
259 bool notContains(int i) const;
261
263 SetVar& operator =(const SetVar&) = default;
264 };
265
271
274 private:
276 public:
278
279
280 SetVarGlbRanges(void);
282 SetVarGlbRanges(const SetVar& x);
284
286
287
288 bool operator ()(void) const;
290 void operator ++(void);
292
294
295
296 int min(void) const;
298 int max(void) const;
300 unsigned int width(void) const;
302 };
303
306 private:
308 public:
310
311
312 SetVarLubRanges(void);
314 SetVarLubRanges(const SetVar& x);
316
318
319
320 bool operator ()(void) const;
322 void operator ++(void);
324
326
327
328 int min(void) const;
330 int max(void) const;
332 unsigned int width(void) const;
334 };
335
338 private:
340 public:
342
343
346 SetVarUnknownRanges(const SetVar& x);
348
350
351
352 bool operator ()(void) const;
354 void operator ++(void);
356
358
359
360 int min(void) const;
362 int max(void) const;
364 unsigned int width(void) const;
366 };
367
370 private:
372 public:
374
375
378 SetVarGlbValues(const SetVar& x);
380
382
383
384 bool operator ()(void) const;
386 void operator ++(void);
388
390
391
392 int val(void) const;
394 };
395
398 private:
400 public:
402
403
406 SetVarLubValues(const SetVar& x);
408
410
411
412 bool operator ()(void) const;
414 void operator ++(void);
416
418
419
420 int val(void) const;
422 };
423
426 private:
428 public:
430
431
434 SetVarUnknownValues(const SetVar& x);
436
438
439
440 bool operator ()(void) const;
442 void operator ++(void);
444
446
447
448 int val(void) const;
450 };
451
453
458 template<class Char, class Traits>
459 std::basic_ostream<Char,Traits>&
460 operator <<(std::basic_ostream<Char,Traits>& os, const SetVar& x);
461
462}
463
464#include <gecode/set/view.hpp>
465
466namespace Gecode {
474
476
477}
478
480
481namespace Gecode {
482
491 class SetVarArgs : public VarArgArray<SetVar> {
492 public:
494
495
496 SetVarArgs(void);
498 explicit SetVarArgs(int n);
500 SetVarArgs(const SetVarArgs& a);
504 SetVarArgs(const std::vector<SetVar>& a);
506 SetVarArgs(std::initializer_list<SetVar> a);
508 template<class InputIterator>
509 SetVarArgs(InputIterator first, InputIterator last);
517 SetVarArgs(Space& home,int n,int glbMin,int glbMax,
518 int lubMin,int lubMax,
519 unsigned int minCard = 0,
520 unsigned int maxCard = Set::Limits::card);
528 SetVarArgs(Space& home,int n,const IntSet& glb,
529 int lubMin, int lubMax,
530 unsigned int minCard = 0,
531 unsigned int maxCard = Set::Limits::card);
539 SetVarArgs(Space& home,int n,int glbMin,int glbMax,
540 const IntSet& lub,
541 unsigned int minCard = 0,
542 unsigned int maxCard = Set::Limits::card);
550 SetVarArgs(Space& home,int n,
551 const IntSet& glb,const IntSet& lub,
552 unsigned int minCard = 0,
553 unsigned int maxCard = Set::Limits::card);
555 SetVarArgs& operator =(const SetVarArgs&) = default;
557 };
558
559
570
575 class SetVarArray : public VarArray<SetVar> {
576 public:
578
579
580 SetVarArray(void);
582 SetVarArray(const SetVarArray&);
584 SetVarArray(Space& home, const SetVarArgs&);
594 SetVarArray(Space& home,int n,int glbMin,int glbMax,int lubMin,int lubMax,
595 unsigned int minCard = 0,
596 unsigned int maxCard = Set::Limits::card);
604 SetVarArray(Space& home,int n,const IntSet& glb, int lubMin, int lubMax,
605 unsigned int minCard = 0,
606 unsigned int maxCard = Set::Limits::card);
614 SetVarArray(Space& home,int n,int glbMin,int glbMax,const IntSet& lub,
615 unsigned int minCard = 0,
616 unsigned int maxCard = Set::Limits::card);
624 SetVarArray(Space& home,int n,
625 const IntSet& glb,const IntSet& lub,
626 unsigned int minCard = 0,
627 unsigned int maxCard = Set::Limits::card);
631 };
632
633}
634
635#include <gecode/set/array.hpp>
636
637namespace Gecode {
638
662
673
680
682 dom(Home home, SetVar x, SetRelType r, int i);
685 dom(Home home, const SetVarArgs& x, SetRelType r, int i);
688 dom(Home home, SetVar x, SetRelType r, int i, int j);
691 dom(Home home, const SetVarArgs& x, SetRelType r, int i, int j);
694 dom(Home home, SetVar x, SetRelType r, const IntSet& s);
697 dom(Home home, const SetVarArgs& x, SetRelType r, const IntSet& s);
700 cardinality(Home home, SetVar x, unsigned int i, unsigned int j);
703 cardinality(Home home, const SetVarArgs& x, unsigned int i, unsigned int j);
706 dom(Home home, SetVar x, SetRelType rt, int i, Reify r);
709 dom(Home home, SetVar x, SetRelType rt, int i, int j, Reify r);
712 dom(Home home, SetVar x, SetRelType rt, const IntSet& s, Reify r);
715 dom(Home home, SetVar x, SetVar d);
718 dom(Home home, const SetVarArgs& x, const SetVarArgs& d);
720
721
728
733 rel(Home home, SetVar x, SetRelType rt, SetVar y, Reify r);
742 rel(Home home, SetVar s, SetRelType rt, IntVar x, Reify r);
745 rel(Home home, IntVar x, SetRelType rt, SetVar s, Reify r);
748 rel(Home home, SetVar s, IntRelType rt, IntVar x);
750 void
751 rel(Home home, IntVar x, IntRelType rt, SetVar s);
754 rel(Home home, SetVar s, IntRelType rt, IntVar x, Reify r);
756 void
757 rel(Home home, IntVar x, IntRelType rt, SetVar s, Reify r);
759
760}
761
762#include <gecode/set/int.hpp>
763
764namespace Gecode {
765
772
777 rel(Home home, SetOpType op, const SetVarArgs& x, SetVar y);
780 rel(Home home, SetOpType op, const SetVarArgs& x, const IntSet& z, SetVar y);
783 rel(Home home, SetOpType op, const IntVarArgs& x, const IntSet& z, SetVar y);
786 rel(Home home, SetOpType op, const IntVarArgs& x, SetVar y);
789 rel(Home home, const IntSet& x, SetOpType op, SetVar y,
790 SetRelType r, SetVar z);
793 rel(Home home, SetVar x, SetOpType op, const IntSet& y,
794 SetRelType r, SetVar z);
798 SetRelType r, const IntSet& z);
801 rel(Home home, const IntSet& x, SetOpType op, SetVar y, SetRelType r,
802 const IntSet& z);
805 rel(Home home, SetVar x, SetOpType op, const IntSet& y, SetRelType r,
806 const IntSet& z);
812 ite(Home home, BoolVar b, SetVar x, SetVar y, SetVar z);
814
815
822
829
830
837
839 sequence(Home home, const SetVarArgs& x);
842 sequence(Home home, const SetVarArgs& y, SetVar x);
844
845
852
854 atmostOne(Home home, const SetVarArgs& x, unsigned int c);
856
866 min(Home home, SetVar s, IntVar x);
876 min(Home home, SetVar s, IntVar x, Reify r);
881 max(Home home, SetVar s, IntVar x);
891 max(Home home, SetVar s, IntVar x, Reify r);
916 SetVar x, IntVar y);
917
918
925
927 channel(Home home, const IntVarArgs& x,const SetVarArgs& y);
933 channel(Home home, const BoolVarArgs& x, SetVar y);
936 channel(Home home, const SetVarArgs& x, const SetVarArgs& y);
938
939
952 precede(Home home, const SetVarArgs& x, int s, int t);
957 precede(Home home, const SetVarArgs& x, const IntArgs& c);
958
959
972
982 element(Home home, SetOpType op, const SetVarArgs& x, SetVar y, SetVar z,
994 element(Home home, SetOpType op, const IntVarArgs& x, SetVar y, SetVar z,
1006 element(Home home, SetOpType op, const IntSetArgs& x, SetVar y, SetVar z,
1018 element(Home home, SetOpType op, const IntArgs& x, SetVar y, SetVar z,
1026 element(Home home, const SetVarArgs& x, IntVar y, SetVar z);
1033 element(Home home, const IntSetArgs& s, IntVar y, SetVar z);
1040 element(Home home, const IntSetArgs& a,
1041 IntVar x, int w, IntVar y, int h, SetVar z);
1048 element(Home home, const SetVarArgs& a,
1049 IntVar x, int w, IntVar y, int h, SetVar z);
1051
1052
1063
1065 wait(Home home, SetVar x, std::function<void(Space& home)> c);
1068 wait(Home home, const SetVarArgs& x, std::function<void(Space& home)> c);
1070
1071}
1072
1073
1074namespace Gecode {
1075
1080
1089 typedef std::function<bool(const Space& home, SetVar x, int i)>
1101 typedef std::function<double(const Space& home, SetVar x, int i)>
1103
1114 typedef std::function<int(const Space& home, SetVar x, int i)>
1116
1128 typedef std::function<void(Space& home, unsigned int a,
1129 SetVar x, int i, int n)>
1131
1132}
1133
1135
1136namespace Gecode {
1137
1143 class SetAFC : public AFC {
1144 public:
1152 SetAFC(void);
1154 SetAFC(const SetAFC& a);
1156 SetAFC& operator =(const SetAFC& a);
1164 SetAFC(Home home, const SetVarArgs& x, double d=1.0, bool share=true);
1175 void init(Home home, const SetVarArgs& x, double d=1.0, bool share=true);
1176 };
1177
1178}
1179
1181
1182namespace Gecode {
1183
1184
1190 class SetAction : public Action {
1191 public:
1199 SetAction(void);
1201 SetAction(const SetAction& a);
1203 SetAction& operator =(const SetAction& a);
1215 SetAction(Home home, const SetVarArgs& x, double d=1.0,
1216 bool p=true, bool f=true,
1217 SetBranchMerit bm=nullptr);
1232 init(Home home, const SetVarArgs& x, double d=1.0,
1233 bool p=true, bool f=true,
1234 SetBranchMerit bm=nullptr);
1235 };
1236
1237}
1238
1240
1241namespace Gecode {
1242
1248 class SetCHB : public CHB {
1249 public:
1257 SetCHB(void);
1259 SetCHB(const SetCHB& chb);
1261 SetCHB& operator =(const SetCHB& chb);
1271 SetCHB(Home home, const SetVarArgs& x, SetBranchMerit bm=nullptr);
1284 init(Home home, const SetVarArgs& x, SetBranchMerit bm=nullptr);
1285 };
1286
1287}
1288
1290
1291namespace Gecode {
1292
1294 typedef std::function<void(const Space &home, const Brancher& b,
1295 unsigned int a,
1296 SetVar x, int i, const int& n,
1297 std::ostream& o)>
1299
1300}
1301
1302namespace Gecode {
1303
1365
1371
1384 SetVarBranch SET_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr);
1388 SetVarBranch SET_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr);
1392 SetVarBranch SET_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr);
1396 SetVarBranch SET_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr);
1424 SetVarBranch SET_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
1428 SetVarBranch SET_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
1432 SetVarBranch SET_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr);
1436 SetVarBranch SET_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr);
1448
1449}
1450
1452
1453namespace Gecode {
1454
1487
1493
1518
1519}
1520
1522
1523namespace Gecode {
1524
1557
1563
1587
1588}
1589
1591
1592namespace Gecode {
1593
1600 branch(Home home, const SetVarArgs& x,
1601 SetVarBranch vars, SetValBranch vals,
1602 SetBranchFilter bf=nullptr,
1603 SetVarValPrint vvp=nullptr);
1610 branch(Home home, const SetVarArgs& x,
1612 SetBranchFilter bf=nullptr,
1613 SetVarValPrint vvp=nullptr);
1621 SetVarValPrint vvp=nullptr);
1622
1629 assign(Home home, const SetVarArgs& x,
1630 SetVarBranch vars, SetAssign vals,
1631 SetBranchFilter bf=nullptr,
1632 SetVarValPrint vvp=nullptr);
1639 assign(Home home, const SetVarArgs& x,
1641 SetBranchFilter bf=nullptr,
1642 SetVarValPrint vvp=nullptr);
1650 SetVarValPrint vvp=nullptr);
1651
1652}
1653
1654namespace Gecode {
1655
1661 void
1662 branch(Home home, const SetVarArgs& x,
1663 SetValBranch vals,
1664 SetBranchFilter bf=nullptr,
1665 SetVarValPrint vvp=nullptr);
1666
1672 void
1673 assign(Home home, const SetVarArgs& x,
1674 SetAssign vals,
1675 SetBranchFilter bf=nullptr,
1676 SetVarValPrint vvp=nullptr);
1677
1678}
1679
1680#include <gecode/set/branch.hpp>
1681
1682// LDSB-related declarations.
1683namespace Gecode {
1700 branch(Home home, const SetVarArgs& x,
1701 SetVarBranch vars, SetValBranch vals,
1702 const Symmetries& syms,
1703 SetBranchFilter bf=nullptr,
1704 SetVarValPrint vvp=nullptr);
1712 branch(Home home, const SetVarArgs& x,
1714 const Symmetries& syms,
1715 SetBranchFilter bf=nullptr,
1716 SetVarValPrint vvp=nullptr);
1717}
1718
1719namespace Gecode {
1720
1721 /*
1722 * \brief Relaxed assignment of variables in \a x from values in \a sx
1723 *
1724 * The variables in \a x are assigned values from the assigned variables
1725 * in the solution \a sx with a relaxation probability \a p. That is,
1726 * if \f$p=0.1\f$ approximately 10% of the variables in \a x will be
1727 * assigned a value from \a sx.
1728 *
1729 * The random numbers are generated from the generator \a r. At least
1730 * one variable will not be assigned: in case the relaxation attempt
1731 * would suggest that all variables should be assigned, a single
1732 * variable will be selected randomly to remain unassigned.
1733 *
1734 * Throws an exception of type Set::ArgumentSizeMismatch, if \a x and
1735 * \a sx are of different size.
1736 *
1737 * Throws an exception of type Set::OutOfLimits, if \a p is not between
1738 * \a 0.0 and \a 1.0.
1739 *
1740 * \ingroup TaskModeSet
1741 */
1743 relax(Home home, const SetVarArgs& x, const SetVarArgs& sx,
1744 Rnd r, double p);
1745
1746}
1747
1749
1750namespace Gecode {
1751
1756
1762 protected:
1764 public:
1766 class Glb
1767 : public Iter::Ranges::Diff<Set::GlbRanges<Set::SetView>,
1768 Iter::Ranges::RangeList> {
1769 protected:
1774 public:
1776
1777
1780 };
1783 class Lub
1784 : public Iter::Ranges::Diff<Iter::Ranges::RangeList,
1785 Set::LubRanges<Set::SetView> > {
1786 protected:
1791 public:
1793
1794
1797 };
1800
1801
1804
1806
1807 Glb& glb(void);
1809 Lub& lub(void);
1811 };
1812
1813}
1814
1816
1818
1819namespace Gecode {
1820
1831
1837 protected:
1839 std::ostream& os;
1840 public:
1842 StdSetTracer(std::ostream& os0 = std::cerr);
1844 virtual void init(const Space& home, const SetTraceRecorder& t);
1846 virtual void prune(const Space& home, const SetTraceRecorder& t,
1847 const ViewTraceInfo& vti, int i, SetTraceDelta& d);
1849 virtual void fix(const Space& home, const SetTraceRecorder& t);
1851 virtual void fail(const Space& home, const SetTraceRecorder& t);
1853 virtual void done(const Space& home, const SetTraceRecorder& t);
1856 };
1857
1858
1864 trace(Home home, const SetVarArgs& x,
1865 TraceFilter tf,
1866 int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
1872 void
1873 trace(Home home, const SetVarArgs& x,
1874 int te = (TE_INIT | TE_PRUNE | TE_FIX | TE_FAIL | TE_DONE),
1876
1877}
1878
1879#include <gecode/set/trace.hpp>
1880
1881#endif
1882
1883// IFDEF: GECODE_HAS_SET_VARS
1884// STATISTICS: set-post
AFC(void)
Construct as not yet initialized.
Definition afc.hpp:119
Action(void)
Construct as not yet initialized.
Definition action.hpp:344
Passing Boolean variables.
Definition int.hh:738
Boolean integer variables.
Definition int.hh:533
CHB(void)
Construct as not yet initialized.
Definition chb.hpp:346
Generic domain change information to be supplied to advisors.
Definition core.hpp:209
Home class for posting propagators
Definition core.hpp:863
Passing integer arguments.
Definition int.hh:652
Integer sets.
Definition int.hh:178
Passing integer variables.
Definition int.hh:680
Integer variables.
Definition int.hh:389
Range iterator for computing set difference.
Range iterator for range lists
Value iterator from range iterator.
Lists of ranges (intervals).
Reification specification.
Definition int.hh:910
Random number generator.
Definition rnd.hpp:42
Recording AFC information for set variables.
Definition set.hh:1143
SetAFC & operator=(const SetAFC &a)
Assignment operator.
Definition afc.hpp:44
void init(Home home, const SetVarArgs &x, double d=1.0, bool share=true)
Initialize for set variables x with decay factor d.
Definition afc.hpp:54
SetAFC(void)
Construct as not yet initialized.
Definition afc.hpp:37
Recording actions for set variables.
Definition set.hh:1190
SetAction(Home home, const SetVarArgs &x, double d=1.0, bool p=true, bool f=true, SetBranchMerit bm=nullptr)
Initialize for set variables x with decay factor d.
SetAction(void)
Construct as not yet initialized.
Definition action.hpp:37
SetAction & operator=(const SetAction &a)
Assignment operator.
Definition action.hpp:44
void init(Home home, const SetVarArgs &x, double d=1.0, bool p=true, bool f=true, SetBranchMerit bm=nullptr)
Initialize for set variables x with decay factor d.
Which value to select for assignment.
Definition set.hh:1530
SetAssign(Select s=SEL_MIN_INC)
Initialize with selection strategy s.
Definition assign.hpp:37
Select s
Which value to select.
Definition set.hh:1546
Select
Which value selection.
Definition set.hh:1533
@ SEL_MED_EXC
Exclude median element (rounding downwards).
Definition set.hh:1537
@ SEL_MIN_EXC
Exclude smallest element.
Definition set.hh:1535
@ SEL_RND_EXC
Exclude random element.
Definition set.hh:1541
@ SEL_MIN_INC
Include smallest element.
Definition set.hh:1534
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition set.hh:1542
@ SEL_MAX_INC
Include largest element.
Definition set.hh:1538
@ SEL_MAX_EXC
Exclude largest element.
Definition set.hh:1539
@ SEL_MED_INC
Include median element (rounding downwards).
Definition set.hh:1536
@ SEL_RND_INC
Include random element.
Definition set.hh:1540
Select select(void) const
Return selection strategy.
Definition assign.hpp:49
Recording CHB for set variables.
Definition set.hh:1248
SetCHB & operator=(const SetCHB &chb)
Assignment operator.
Definition chb.hpp:44
void init(Home home, const SetVarArgs &x, SetBranchMerit bm=nullptr)
Initialize for set variables x.
SetCHB(void)
Construct as not yet initialized.
Definition chb.hpp:37
SetCHB(Home home, const SetVarArgs &x, SetBranchMerit bm=nullptr)
Initialize for set variables x.
Delta for the greatest lower bound.
Definition set.hh:1768
Set::GlbRanges< Set::SetView > n
Iterator over new glb.
Definition set.hh:1773
Iter::Ranges::RangeList o
Iterator over old glb.
Definition set.hh:1771
Glb(RangeList *o, Set::SetView n)
Initialize with old glb and new glb.
Definition delta.hpp:37
Delta for the least upper bound.
Definition set.hh:1785
Iter::Ranges::RangeList o
Iterator over old lub.
Definition set.hh:1788
Lub(RangeList *o, Set::SetView n)
Initialize with old lub o and new lub n.
Definition delta.hpp:42
Set::LubRanges< Set::SetView > n
Iterator over new lub.
Definition set.hh:1790
Trace delta information for set variables.
Definition set.hh:1761
Glb & glb(void)
Give access to iterator for delta in greatest lower bound (values that have been included).
Definition delta.hpp:52
SetTraceDelta(Set::SetTraceView o, Set::SetView n, const Delta &d)
Initialize with old trace view o, new view n, and delta d.
Definition delta.hpp:48
Lub & lub(void)
Give access iterator for delta in least bound (values that have been removed).
Definition delta.hpp:56
Which values to select for branching first.
Definition set.hh:1460
SetValBranch(Select s=SEL_MIN_INC)
Initialize with selection strategy s.
Definition val.hpp:37
Select
Which value selection.
Definition set.hh:1463
@ SEL_VAL_COMMIT
Select value according to user-defined functions.
Definition set.hh:1472
@ SEL_MAX_INC
Include largest element.
Definition set.hh:1468
@ SEL_MIN_EXC
Exclude smallest element.
Definition set.hh:1465
@ SEL_RND_EXC
Exclude random element.
Definition set.hh:1471
@ SEL_MIN_INC
Include smallest element.
Definition set.hh:1464
@ SEL_MAX_EXC
Exclude largest element.
Definition set.hh:1469
@ SEL_MED_EXC
Exclude median element (rounding downwards).
Definition set.hh:1467
@ SEL_RND_INC
Include random element.
Definition set.hh:1470
@ SEL_MED_INC
Include median element (rounding downwards).
Definition set.hh:1466
Select s
Which value to select.
Definition set.hh:1476
Select select(void) const
Return selection strategy.
Definition val.hpp:49
Passing set variables.
Definition set.hh:491
SetVarArgs(Space &home, int n, const IntSet &glb, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArgs(void)
Allocate empty array.
Definition array.hpp:48
SetVarArgs(Space &home, int n, int glbMin, int glbMax, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArgs(Space &home, int n, const IntSet &glb, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArgs & operator=(const SetVarArgs &)=default
Assignment operator.
SetVarArgs(Space &home, int n, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArray(Space &home, int n, int glbMin, int glbMax, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArray(Space &home, int n)
Allocate array for n set variables (variables are uninitialized).
SetVarArray(Space &home, int n, const IntSet &glb, const IntSet &lub, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArray(Space &home, int n, const IntSet &glb, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
SetVarArray & operator=(const SetVarArray &)=default
Assignment operator.
SetVarArray(void)
Default constructor (array of size 0).
Definition array.hpp:77
SetVarArray(Space &home, int n, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int minCard=0, unsigned int maxCard=Set::Limits::card)
Create an array of size n.
Which variable to select for branching.
Definition set.hh:1309
void expand(Home home, const SetVarArgs &x)
Expand AFC, action, and CHB.
Definition var.hpp:74
Select
Which variable selection.
Definition set.hh:1312
@ SEL_ACTION_SIZE_MIN
With smallest action divided by domain size.
Definition set.hh:1335
@ SEL_CHB_MIN
With lowest CHB Q-score.
Definition set.hh:1323
@ SEL_CHB_MAX
With highest CHB Q-score.
Definition set.hh:1324
@ SEL_MERIT_MIN
With least merit.
Definition set.hh:1315
@ SEL_DEGREE_SIZE_MAX
With largest degree divided by domain size.
Definition set.hh:1332
@ SEL_AFC_SIZE_MIN
With smallest accumulated failure count divided by domain size.
Definition set.hh:1333
@ SEL_AFC_MIN
With smallest accumulated failure count.
Definition set.hh:1319
@ SEL_CHB_SIZE_MAX
With largest CHB Q-score divided by domain size.
Definition set.hh:1338
@ SEL_NONE
First unassigned.
Definition set.hh:1313
@ SEL_ACTION_SIZE_MAX
With largest action divided by domain size.
Definition set.hh:1336
@ SEL_DEGREE_MAX
With largest degree.
Definition set.hh:1318
@ SEL_AFC_MAX
With largest accumulated failure count.
Definition set.hh:1320
@ SEL_CHB_SIZE_MIN
With smallest CHB Q-score divided by domain size.
Definition set.hh:1337
@ SEL_MERIT_MAX
With highest merit.
Definition set.hh:1316
@ SEL_SIZE_MIN
With smallest unknown set.
Definition set.hh:1329
@ SEL_RND
Random (uniform, for tie breaking).
Definition set.hh:1314
@ SEL_ACTION_MAX
With highest action.
Definition set.hh:1322
@ SEL_AFC_SIZE_MAX
With largest accumulated failure count divided by domain size.
Definition set.hh:1334
@ SEL_ACTION_MIN
With lowest action.
Definition set.hh:1321
@ SEL_MIN_MAX
With largest minimum unknown element.
Definition set.hh:1326
@ SEL_MAX_MAX
With largest maximum unknown element.
Definition set.hh:1328
@ SEL_MAX_MIN
With smallest maximum unknown element.
Definition set.hh:1327
@ SEL_DEGREE_SIZE_MIN
With smallest degree divided by domain size.
Definition set.hh:1331
@ SEL_MIN_MIN
With smallest minimum unknown element.
Definition set.hh:1325
@ SEL_DEGREE_MIN
With smallest degree.
Definition set.hh:1317
@ SEL_SIZE_MAX
With largest unknown set.
Definition set.hh:1330
SetVarBranch(void)
Initialize with strategy SEL_NONE.
Definition var.hpp:37
Select s
Which variable to select.
Definition set.hh:1342
Select select(void) const
Return selection strategy.
Definition var.hpp:69
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition set.hpp:111
int max(void) const
Return largest value of range.
Definition set.hpp:123
void operator++(void)
Move iterator to next range (if possible).
Definition set.hpp:115
int min(void) const
Return smallest value of range.
Definition set.hpp:119
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition set.hpp:127
SetVarGlbRanges(void)
Default constructor.
Definition set.hpp:103
bool operator()(void) const
Test whether iterator is still at a value or done.
Definition set.hpp:191
int val(void) const
Return current value.
Definition set.hpp:201
void operator++(void)
Move iterator to next value (if possible).
Definition set.hpp:196
SetVarGlbValues(void)
Default constructor.
void operator++(void)
Move iterator to next range (if possible).
Definition set.hpp:142
SetVarLubRanges(void)
Default constructor.
Definition set.hpp:130
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition set.hpp:154
int max(void) const
Return largest value of range.
Definition set.hpp:150
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition set.hpp:138
int min(void) const
Return smallest value of range.
Definition set.hpp:146
bool operator()(void) const
Test whether iterator is still at a value or done.
Definition set.hpp:212
int val(void) const
Return current value.
Definition set.hpp:222
SetVarLubValues(void)
Default constructor.
void operator++(void)
Move iterator to next value (if possible).
Definition set.hpp:217
int max(void) const
Return largest value of range.
Definition set.hpp:178
bool operator()(void) const
Test whether iterator is still at a range or done.
Definition set.hpp:166
unsigned int width(void) const
Return width of range (distance between minimum and maximum).
Definition set.hpp:182
void operator++(void)
Move iterator to next range (if possible).
Definition set.hpp:170
int min(void) const
Return smallest value of range.
Definition set.hpp:174
SetVarUnknownRanges(void)
Default constructor.
Definition set.hpp:157
int val(void) const
Return current value.
Definition set.hpp:243
bool operator()(void) const
Test whether iterator is still at a value or done.
Definition set.hpp:233
SetVarUnknownValues(void)
Default constructor.
void operator++(void)
Move iterator to next value (if possible).
Definition set.hpp:238
Set variables
Definition set.hh:127
unsigned int cardMax(void) const
Return cardinality maximum.
Definition set.hpp:81
SetVar(Space &home)
Initialize variable with empty greatest lower and full least upper bound.
SetVar(void)
Default constructor.
Definition set.hpp:46
bool notContains(int i) const
Test whether i is not in the least upper bound.
Definition set.hpp:75
friend class SetVarArgs
Definition set.hh:129
int lubMin(void) const
Return minimum element of least upper bound.
Definition set.hpp:84
friend class SetVarArray
Definition set.hh:128
SetVar(Space &home, const IntSet &glbD, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
Initialize variable with given bounds and cardinality.
unsigned int lubSize(void) const
Return number of elements in the least upper bound.
Definition set.hpp:66
SetVar & operator=(const SetVar &)=default
Assignment operator.
int lubMax(void) const
Return maximum element of least upper bound.
Definition set.hpp:87
SetVar(Space &home, const IntSet &glbD, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
Initialize variable with given bounds and cardinality.
SetVar(Space &home, int glbMin, int glbMax, const IntSet &lubD, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
Initialize variable with given bounds and cardinality.
SetVar(Space &home, int glbMin, int glbMax, int lubMin, int lubMax, unsigned int cardMin=0, unsigned int cardMax=Set::Limits::card)
Initialize variable with given bounds and cardinality.
unsigned int glbSize(void) const
Return number of elements in the greatest lower bound.
Definition set.hpp:63
int glbMin(void) const
Return minimum element of greatest lower bound.
Definition set.hpp:90
unsigned int unknownSize(void) const
Return number of unknown elements (elements in lub but not in glb).
Definition set.hpp:69
int glbMax(void) const
Return maximum of greatest lower bound.
Definition set.hpp:93
bool contains(int i) const
Test whether i is in greatest lower bound.
Definition set.hpp:72
unsigned int cardMin(void) const
Return cardinality minimum.
Definition set.hpp:78
Range iterator for the greatest lower bound.
Definition var-imp.hpp:359
Range iterator for the least upper bound.
Definition var-imp.hpp:317
Duplicate of a set view.
Finite integer set variable implementation.
Definition var-imp.hpp:430
Set view for set variables
Definition view.hpp:56
Range iterator for the unknown set.
Definition var-imp.hpp:402
Computation spaces.
Definition core.hpp:1775
virtual void prune(const Space &home, const SetTraceRecorder &t, const ViewTraceInfo &vti, int i, SetTraceDelta &d)
Print prune information.
virtual void done(const Space &home, const SetTraceRecorder &t)
Print that trace recorder is done.
virtual void init(const Space &home, const SetTraceRecorder &t)
Print init information.
virtual void fail(const Space &home, const SetTraceRecorder &t)
Print failure information.
virtual void fix(const Space &home, const SetTraceRecorder &t)
Print fixpoint information.
StdSetTracer(std::ostream &os0=std::cerr)
Initialize with output stream os0.
std::ostream & os
Output stream to use.
Definition set.hh:1839
static StdSetTracer def
Default tracer (printing to std::cerr).
Definition set.hh:1855
Collection of symmetries.
Definition int.hh:5638
A reference-counted pointer to a SymmetryObject.
Definition int.hh:5601
Combine variable selection criteria for tie-breaking.
Definition tiebreak.hpp:38
Trace filters.
Definition filter.hpp:133
Variable arrays
Definition array.hpp:112
View trace information.
Definition core.hpp:917
Propagator for recording view trace information.
Definition recorder.hpp:60
Tracer that process view trace information.
Definition tracer.hpp:51
#define GECODE_SET_EXPORT
Definition set.hh:67
void trace(Home home, const FloatVarArgs &x, TraceFilter tf, int te=(TE_INIT|TE_PRUNE|TE_FIX|TE_FAIL|TE_DONE), FloatTracer &t=StdFloatTracer::def)
Create a tracer for float variables.
std::function< double(const Space &home, double w, double b)> BranchTbl
Tie-break limit function.
Definition var.hpp:48
void assign(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatAssign vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Assign all x with variable selection vars and value selection vals.
void branch(Home home, const FloatVarArgs &x, FloatVarBranch vars, FloatValBranch vals, FloatBranchFilter bf=nullptr, FloatVarValPrint vvp=nullptr)
Branch over x with variable selection vars and value selection vals.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
void precede(Home home, const IntVarArgs &x, int s, int t, IntPropLevel=IPL_DEF)
Post propagator that s precedes t in x.
IntRelType
Relation types for integers.
Definition int.hh:959
std::function< bool(const Space &home, SetVar x, int i)> SetBranchFilter
Branch filter function type for set variables.
Definition set.hh:1090
std::function< double(const Space &home, SetVar x, int i)> SetBranchMerit
Branch merit function type for set variables.
Definition set.hh:1102
std::function< int(const Space &home, SetVar x, int i)> SetBranchVal
Branch value function type for set variables.
Definition set.hh:1115
std::function< void(Space &home, unsigned int a, SetVar x, int i, int n)> SetBranchCommit
Branch commit function type for set variables.
Definition set.hh:1130
void weights(Home home, IntSharedArray elements, IntSharedArray weights, SetVar x, IntVar y)
Post propagator for .
void notMin(Home home, SetVar s, IntVar x)
Post propagator that x is not the minimal element of s.
void notMax(Home home, SetVar s, IntVar x)
Post propagator that x is not the maximal element of s.
SetOpType
Common operations for sets.
Definition set.hh:667
SetRelType
Common relation types for sets.
Definition set.hh:650
@ SOT_MINUS
Difference.
Definition set.hh:671
@ SOT_DUNION
Disjoint union.
Definition set.hh:669
@ SOT_UNION
Union.
Definition set.hh:668
@ SOT_INTER
Intersection
Definition set.hh:670
@ SRT_GQ
Greater or equal ( ).
Definition set.hh:659
@ SRT_CMPL
Complement.
Definition set.hh:656
@ SRT_GR
Greater ( ).
Definition set.hh:660
@ SRT_LQ
Less or equal ( ).
Definition set.hh:657
@ SRT_NQ
Disequality ( ).
Definition set.hh:652
@ SRT_LE
Less ( ).
Definition set.hh:658
@ SRT_EQ
Equality ( ).
Definition set.hh:651
@ SRT_SUP
Superset ( ).
Definition set.hh:654
@ SRT_DISJ
Disjoint ( ).
Definition set.hh:655
@ SRT_SUB
Subset ( ).
Definition set.hh:653
ViewTracer< Set::SetView > SetTracer
Tracer for set variables.
Definition set.hh:1825
ViewTraceRecorder< Set::SetView > SetTraceRecorder
Trace recorder for set variables.
Definition set.hh:1830
@ TE_INIT
Trace init events.
Definition recorder.hpp:43
@ TE_PRUNE
Trace prune events.
Definition recorder.hpp:44
@ TE_FIX
Trace fixpoint events.
Definition recorder.hpp:45
@ TE_FAIL
Trace fail events.
Definition recorder.hpp:46
@ TE_DONE
Trace done events.
Definition recorder.hpp:47
const int max
Largest allowed integer value.
Definition int.hh:120
Numerical limits for set variables.
Definition set.hh:95
void check(int n, const char *l)
Check whether integer n is in range, otherwise throw overflow exception with information l.
Definition limits.hpp:37
const int min
Smallest allowed integer in integer set.
Definition set.hh:99
const unsigned int card
Maximum cardinality of an integer set.
Definition set.hh:101
const int max
Largest allowed integer in integer set.
Definition set.hh:97
Gecode toplevel namespace
SetVarBranch SET_VAR_MERIT_MAX(SetBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with highest merit according to branch merit function bm.
Definition var.hpp:111
SetValBranch SET_VAL_MED_INC(void)
Include median element (rounding downwards).
Definition val.hpp:65
ArgArray< IntSet > IntSetArgs
Passing set arguments.
Definition int.hh:643
void atmostOne(Home home, const SetVarArgs &x, unsigned int c)
Post propagator for and .
SetVarBranch SET_VAR_ACTION_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest action divided by domain size with decay factor d.
Definition var.hpp:246
SetVarBranch SET_VAR_CHB_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest CHB Q-score divided by domain size.
Definition var.hpp:266
SetVarBranch SET_VAR_ACTION_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest action divided by domain size with decay factor d.
Definition var.hpp:256
SetAssign SET_ASSIGN_RND_EXC(Rnd r)
Exclude random element.
Definition assign.hpp:90
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
SetVarBranch SET_VAR_NONE(void)
Select first unassigned variable.
Definition var.hpp:96
SetValBranch SET_VAL_RND_INC(Rnd r)
Include random element.
Definition val.hpp:85
SetVarBranch SET_VAR_DEGREE_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree divided by domain size.
Definition var.hpp:221
void sequence(Home home, const IntVarArgs &x, const IntSet &s, int q, int l, int u, IntPropLevel ipl=IPL_DEF)
Post propagator for .
void channelSorted(Home home, const IntVarArgs &x, SetVar y)
Post propagator for and .
SharedArray< int > IntSharedArray
Arrays of integers that can be shared among several element constraints.
Definition int.hh:1512
Archive & operator<<(Archive &e, FloatNumBranch nl)
Definition val-sel.hpp:39
SetValBranch SET_VAL_RND_EXC(Rnd r)
Exclude random element.
Definition val.hpp:90
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
SetVarBranch SET_VAR_CHB_MIN(BranchTbl tbl=nullptr)
Select variable with lowest CHB Q-score.
Definition var.hpp:166
SetVarBranch SET_VAR_MIN_MAX(BranchTbl tbl=nullptr)
Select variable with largest minimum unknown element.
Definition var.hpp:191
SetAssign SET_ASSIGN_MED_EXC(void)
Exclude median element (rounding downwards).
Definition assign.hpp:70
SetVarBranch SET_VAR_CHB_MAX(BranchTbl tbl=nullptr)
Select variable with highest CHB Q-score.
Definition var.hpp:176
SetAssign SET_ASSIGN_MED_INC(void)
Include median element (rounding downwards).
Definition assign.hpp:65
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
void element(Home home, IntSharedArray n, IntVar x0, IntVar x1, IntPropLevel ipl=IPL_DEF)
Post domain consistent propagator for .
SetValBranch SET_VAL(SetBranchVal v, SetBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
Definition val.hpp:95
SetVarBranch SET_VAR_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest unknown set.
Definition var.hpp:206
SetVarBranch SET_VAR_RND(Rnd r)
Select random variable (uniform distribution, for tie breaking).
Definition var.hpp:101
SetVarBranch SET_VAR_MAX_MAX(BranchTbl tbl=nullptr)
Select variable with largest maximum unknown element.
Definition var.hpp:201
SetVarBranch SET_VAR_AFC_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count with decay factor d.
Definition var.hpp:136
SetAssign SET_ASSIGN_MAX_INC(void)
Include largest element.
Definition assign.hpp:75
SetVarBranch SET_VAR_MIN_MIN(BranchTbl tbl=nullptr)
Select variable with smallest minimum unknown element.
Definition var.hpp:186
SetValBranch SET_VAL_MED_EXC(void)
Exclude median element (rounding downwards).
Definition val.hpp:70
SetValBranch SET_VAL_MAX_INC(void)
Include largest element.
Definition val.hpp:75
SetAssign SET_ASSIGN_RND_INC(Rnd r)
Include random element.
Definition assign.hpp:85
SetVarBranch SET_VAR_CHB_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest CHB Q-score divided by domain size.
Definition var.hpp:276
SetVarBranch SET_VAR_DEGREE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree.
Definition var.hpp:116
SymmetryHandle VariableSymmetry(const IntVarArgs &x)
Variables in x are interchangeable.
void relax(Home home, const FloatVarArgs &x, const FloatVarArgs &sx, Rnd r, double p)
void convex(Home home, SetVar x)
Post propagator that propagates that x is convex.
SetVarBranch SET_VAR_AFC_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count with decay factor d.
Definition var.hpp:126
SetVarBranch SET_VAR_MAX_MIN(BranchTbl tbl=nullptr)
Select variable with smallest maximum unknown element.
Definition var.hpp:196
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
SetVarBranch SET_VAR_DEGREE_MAX(BranchTbl tbl=nullptr)
Select variable with largest degree.
Definition var.hpp:121
SetValBranch SET_VAL_MIN_INC(void)
Include smallest element.
Definition val.hpp:55
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
SetVarBranch SET_VAR_AFC_SIZE_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with smallest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:226
SymmetryHandle VariableSequenceSymmetry(const IntVarArgs &x, int ss)
Variable sequences in x of size ss are interchangeable.
SetAssign SET_ASSIGN_MIN_EXC(void)
Exclude smallest element.
Definition assign.hpp:60
SetAssign SET_ASSIGN_MIN_INC(void)
Include smallest element.
Definition assign.hpp:55
SetValBranch SET_VAL_MAX_EXC(void)
Exclude largest element.
Definition val.hpp:80
SetAssign SET_ASSIGN(SetBranchVal v, SetBranchCommit c=nullptr)
Select value as defined by the value function v and commit function c.
Definition assign.hpp:95
SetAssign SET_ASSIGN_MAX_EXC(void)
Exclude largest element.
Definition assign.hpp:80
SetVarBranch SET_VAR_AFC_SIZE_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with largest accumulated failure count divided by domain size with decay factor d.
Definition var.hpp:236
SetVarBranch SET_VAR_ACTION_MIN(double d=1.0, BranchTbl tbl=nullptr)
Select variable with lowest action with decay factor d.
Definition var.hpp:146
LinIntExpr cardinality(const SetExpr &)
Cardinality of set expression.
std::function< void(const Space &home, const Brancher &b, unsigned int a, SetVar x, int i, const int &n, std::ostream &o)> SetVarValPrint
Function type for printing branching alternatives for set variables.
Definition set.hh:1298
SetVarBranch SET_VAR_MERIT_MIN(SetBranchMerit bm, BranchTbl tbl=nullptr)
Select variable with least merit according to branch merit function bm.
Definition var.hpp:106
SetVarBranch SET_VAR_DEGREE_SIZE_MIN(BranchTbl tbl=nullptr)
Select variable with smallest degree divided by domain size.
Definition var.hpp:216
SetValBranch SET_VAL_MIN_EXC(void)
Exclude smallest element.
Definition val.hpp:60
SetVarBranch SET_VAR_SIZE_MAX(BranchTbl tbl=nullptr)
Select variable with largest unknown set.
Definition var.hpp:211
SetVarBranch SET_VAR_ACTION_MAX(double d=1.0, BranchTbl tbl=nullptr)
Select variable with highest action with decay factor d.
Definition var.hpp:156