40namespace Gecode {
namespace Int {
103 void init(
const View&
x);
111namespace Gecode {
namespace Int {
155 int baseval(
int val)
const;
159 unsigned int size(
void)
const;
161 unsigned int width(
void)
const;
171 bool range(
void)
const;
174 bool in(
int n)
const;
176 bool in(
long long int n)
const;
270 template<
class Char,
class Traits>
271 std::basic_ostream<Char,Traits>&
306 int baseval(
int val)
const;
310 unsigned int size(
void)
const;
312 unsigned int width(
void)
const;
322 bool range(
void)
const;
325 bool in(
int n)
const;
327 bool in(
long long int n)
const;
421 template<
class Char,
class Traits>
422 std::basic_ostream<Char,Traits>&
473 int baseval(
int val)
const;
477 unsigned int size(
void)
const;
479 unsigned int width(
void)
const;
489 bool range(
void)
const;
492 bool in(
int n)
const;
494 bool in(
long long int n)
const;
600 template<
class Char,
class Traits>
601 std::basic_ostream<Char,Traits>&
703 template<
class Val,
class UnsVal>
721 int scale(
void)
const;
732 Val baseval(Val
val)
const;
736 UnsVal
size(
void)
const;
738 UnsVal
width(
void)
const;
748 bool range(
void)
const;
750 bool in(Val
n)
const;
816 template<
class Char,
class Traits>
817 std::basic_ostream<Char,Traits>&
824 template<
class Char,
class Traits>
825 std::basic_ostream<Char,Traits>&
833 template<
class Val,
class UnsVal>
837 template<
class Val,
class UnsVal>
875 unsigned int size(
void)
const;
877 unsigned int width(
void)
const;
887 bool range(
void)
const;
889 bool in(
int n)
const;
891 bool in(
long long int n)
const;
991 template<
class Char,
class Traits>
992 std::basic_ostream<Char,Traits>&
1025 int min(
void)
const;
1027 int max(
void)
const;
1029 int med(
void)
const;
1031 int val(
void)
const;
1034 unsigned int size(
void)
const;
1036 unsigned int width(
void)
const;
1046 bool range(
void)
const;
1048 bool in(
int n)
const;
1050 bool in(
long long int n)
const;
1138 template<
class Char,
class Traits>
1139 std::basic_ostream<Char,Traits>&
1165 template<
class View>
1188 int min(
void)
const;
1190 int max(
void)
const;
1192 int med(
void)
const;
1194 int val(
void)
const;
1195#ifdef GECODE_HAS_CBS
1197 int baseval(
int val)
const;
1201 unsigned int size(
void)
const;
1203 unsigned int width(
void)
const;
1213 bool range(
void)
const;
1216 bool in(
int n)
const;
1218 bool in(
long long int n)
const;
1328 template<
class Char,
class Traits,
class View>
1329 std::basic_ostream<Char,Traits>&
1337 template<
class View>
1340 template<
class View>
1352 template<
class View>
1411 int min(
void)
const;
1413 int max(
void)
const;
1415 int med(
void)
const;
1417 int val(
void)
const;
1418#ifdef GECODE_HAS_CBS
1420 int baseval(
int val)
const;
1424 unsigned int size(
void)
const;
1426 unsigned int width(
void)
const;
1436 bool range(
void)
const;
1438 bool in(
int n)
const;
1440 bool in(
long long int n)
const;
1446 bool zero(
void)
const;
1448 bool one(
void)
const;
1450 bool none(
void)
const;
1560 template<
class Char,
class Traits>
1561 std::basic_ostream<Char,Traits>&
1603 bool zero(
void)
const;
1605 bool one(
void)
const;
1607 bool none(
void)
const;
1658 int min(
void)
const;
1660 int max(
void)
const;
1662 int val(
void)
const;
1663#ifdef GECODE_HAS_CBS
1665 int baseval(
int val)
const;
1700 template<
class Char,
class Traits>
1701 std::basic_ostream<Char,Traits>&
1725namespace Gecode {
namespace Int {
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int n
Number of negative literals for node type.
Boolean integer variables.
Base-class for constant views.
Generic domain change information to be supplied to advisors.
Base-class for derived views.
static ModEvent me(const ModEventDelta &med)
Boolean variable implementation.
static const int BITS
How many bits does the status have.
static const BoolStatus NONE
Status of domain not yet assigned.
static const BoolStatus ZERO
Status of domain assigned to zero.
static const BoolStatus ONE
Status of domain assigned to one.
Boolean view for Boolean variables.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
bool in(int n) const
Test whether n is contained in domain.
BoolView(void)
Default constructor.
int max(void) const
Return maximum of domain.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
static const BoolStatus NONE
Status of domain not yet assigned.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
static const BoolStatus ONE
Status of domain assigned to one.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
int min(void) const
Return minimum of domain.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool range(void) const
Test whether domain is a range.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
bool none(void) const
Test whether view is not yet assigned.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
BoolStatus status(void) const
Return current domain status.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
static const int BITS
How many bits does the status have.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
bool one(void) const
Test whether view is assigned to be one.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int val(void) const
Return assigned value (only if assigned)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
static const BoolStatus ZERO
Status of domain assigned to zero.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
unsigned int size(void) const
Return size (cardinality) of domain.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
int med(void) const
Return median of domain (greatest element not greater than the median)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
RangeList * _firstRange
First cached range.
RangeList * _lastRange
Last cached range.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
bool in(int n) const
Test whether n is contained in domain.
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
unsigned int _size
Size of cached domain.
bool range(void) const
Test whether domain is a range.
int val(void) const
Return assigned value (only if assigned)
void cache(Space &home)
Update cache to current domain.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
int min(void) const
Return minimum of domain.
bool modified(void) const
Check whether cache differs from current domain.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
int max(void) const
Return maximum of domain.
CachedView(void)
Default constructor.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
bool range(void) const
Test whether domain is a range.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool operator<(const ConstIntView &y) const
Whether this view comes before view y (arbitray order)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
bool in(int n) const
Test whether n is contained in domain.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int min(void) const
Return minimum of domain.
int max(void) const
Return maximum of domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
void update(Space &home, ConstIntView &y)
Update this view to be a clone of view y.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ConstIntView(void)
Default constructor.
int val(void) const
Return assigned value (only if assigned)
int med(void) const
Return median of domain (greatest element not greater than the median)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Integer variable implementation.
Integer view for integer variables.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
int min(void) const
Return minimum of domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool range(void) const
Test whether domain is a range.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
bool in(int n) const
Test whether n is contained in domain.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
IntView(void)
Default constructor.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
int val(void) const
Return assigned value (only if assigned)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int max(void) const
Return maximum of domain.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
int max(void) const
Return maximum of domain.
int min(void) const
Return minimum of domain.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool in(int n) const
Test whether n is contained in domain.
bool range(void) const
Test whether domain is a range.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
MinusView(void)
Default constructor.
int med(void) const
Return median of domain.
int val(void) const
Return assigned value (only if assigned)
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
BoolStatus status(void) const
Return current domain status.
bool zero(void) const
Test whether view is assigned to be zero.
bool one(void) const
Test whether view is assigned to be one.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
bool none(void) const
Test whether view is not yet assigned.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
unsigned int width(const Delta &d) const
Return width of values just pruned.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
static const BoolStatus ONE
Status of domain assigned to one.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int max(void) const
Return maximum of domain.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int min(void) const
Return minimum of domain.
static const BoolStatus NONE
Status of domain not yet assigned.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
NegBoolView(void)
Default constructor.
int val(void) const
Return assigned value (only if assigned)
static const int BITS
How many bits does the status have.
static const BoolStatus ZERO
Status of domain assigned to zero.
Converter without offsets.
void update(const NoOffset &)
Update during cloning.
int offset(void) const
Access offset.
View & operator()(View &x)
Pass through x.
View ViewType
The view type.
int min(void) const
Return minimum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int val(void) const
Return assigned value (only if assigned)
void update(Space &home, OffsetView &y)
Update this view to be a clone of view y.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
int med(void) const
Return median of domain (greatest element not greater than the median)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
unsigned int size(void) const
Return size (cardinality) of domain.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
int offset(void) const
Return offset.
int max(void) const
Return maximum of domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
OffsetView(void)
Default constructor.
bool in(int n) const
Test whether n is contained in domain.
bool operator<(const OffsetView &y) const
Whether this view comes before view y (arbitray order)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
bool range(void) const
Test whether domain is a range.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Converter with fixed offset.
Offset(int off=0)
Constructor with offset off.
void update(const Offset &o)
Update during cloning.
OffsetView ViewType
The view type.
OffsetView operator()(IntView &x)
Return OffsetRefView for x.
int offset(void) const
Access offset.
Scale integer view (template)
Val val(void) const
Return assigned value (only if assigned)
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
int scale(void) const
Return scale factor of scale view.
bool in(Val n) const
Test whether n is contained in domain.
bool range(void) const
Test whether domain is a range.
void update(Space &home, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
Val max(void) const
Return maximum of domain.
Val med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
bool operator<(const ScaleView< Val, UnsVal > &y) const
Whether this view comes before view y (arbitray order)
Val min(void) const
Return minimum of domain.
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
UnsVal size(void) const
Return size (cardinality) of domain.
ScaleView(void)
Default constructor.
Range iterator for cached integer views
void init(const CachedView< View > &x)
Initialize with ranges for view x.
ViewRanges< View > dr
Current domain iterator.
Iter::Ranges::RangeList cr
Cached domain iterator.
ViewDiffRanges(void)
Default constructor.
Range iterator for integer views.
ViewRanges(const View &x)
Initialize with ranges for view x.
int max(void) const
Return largest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
int min(void) const
Return smallest value of range.
void init(const View &x)
Initialize with ranges for view x.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
void operator++(void)
Move iterator to next range (if possible)
ViewRanges(void)
Default constructor.
Value iterator for integer views.
void init(const View &x)
Initialize with values x.
ViewValues(void)
Default constructor.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ZeroIntView(void)
Default constructor.
int med(void) const
Return median of domain (greatest element not greater than the median)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
int max(void) const
Return maximum of domain.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
bool range(void) const
Test whether domain is a range.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
int val(void) const
Return assigned value (only if assigned)
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool in(int n) const
Test whether n is contained in domain.
int min(void) const
Return minimum of domain.
Range iterator for computing set difference.
Range iterator for range lists
Value iterator from range iterator.
Lists of ranges (intervals)
Base-class for variable implementation views.
static ModEvent me(const ModEventDelta &med)
ScaleView< long long int, unsigned long long int > LLongScaleView
Long long-precision integer scale view.
ScaleView< int, unsigned int > IntScaleView
Integer-precision integer scale view.
int ModEventDelta
Modification event deltas.
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
RelTest rtest_nq_dom(VX x, VY y)
Test whether views x and y are different (use full domain information)
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
RelTest rtest_lq(VX x, VY y)
Test whether view x is less or equal than view y.
RelTest rtest_le(VX x, VY y)
Test whether view x is less than view y.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
unsigned int BoolStatus
Type for status of a Boolean variable.
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
RelTest
Result of testing relation.
@ RT_TRUE
Relation does hold.
@ RT_MAYBE
Relation may hold or not.
@ RT_FALSE
Relation does not hold.
RelTest rtest_nq_bnd(VX x, VY y)
Test whether views x and y are different (use bounds information)
@ BT_COMP
Same variable but complement.
RelTest rtest_gr(VX x, VY y)
Test whether view x is greater than view y.
RelTest rtest_gq(VX x, VY y)
Test whether view x is greater or equal than view y.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
int ModEvent
Type for modification events.