Go to the documentation of this file.
40 namespace Gecode {
namespace Int {
103 void init(
const View&
x);
111 namespace Gecode {
namespace Int {
153 #ifdef GECODE_HAS_CBS
154 int baseval(
int val)
const;
159 unsigned int size(
void)
const;
161 unsigned int width(
void)
const;
170 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>&
304 #ifdef GECODE_HAS_CBS
305 int baseval(
int val)
const;
310 unsigned int size(
void)
const;
312 unsigned int width(
void)
const;
321 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>&
471 #ifdef GECODE_HAS_CBS
472 int baseval(
int val)
const;
477 unsigned int size(
void)
const;
479 unsigned int width(
void)
const;
488 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>
720 int scale(
void)
const;
730 #ifdef GECODE_HAS_CBS
731 Val baseval(Val
val)
const;
736 UnsVal
size(
void)
const;
738 UnsVal
width(
void)
const;
747 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>&
832 template<
class Val,
class UnsVal>
837 template<
class Val,
class UnsVal>
875 unsigned int size(
void)
const;
877 unsigned int width(
void)
const;
886 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>&
1024 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;
1045 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>
1187 int min(
void)
const;
1190 int max(
void)
const;
1192 int med(
void)
const;
1194 int val(
void)
const;
1195 #ifdef GECODE_HAS_CBS
1196 int baseval(
int val)
const;
1201 unsigned int size(
void)
const;
1203 unsigned int width(
void)
const;
1212 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>&
1336 template<
class View>
1340 template<
class View>
1352 template<
class View>
1410 int min(
void)
const;
1413 int max(
void)
const;
1415 int med(
void)
const;
1417 int val(
void)
const;
1418 #ifdef GECODE_HAS_CBS
1419 int baseval(
int val)
const;
1424 unsigned int size(
void)
const;
1426 unsigned int width(
void)
const;
1435 bool range(
void)
const;
1438 bool in(
int n)
const;
1440 bool in(
long long int n)
const;
1445 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>&
1602 bool zero(
void)
const;
1605 bool one(
void)
const;
1607 bool none(
void)
const;
1657 int min(
void)
const;
1660 int max(
void)
const;
1662 int val(
void)
const;
1663 #ifdef GECODE_HAS_CBS
1664 int baseval(
int val)
const;
1700 template<
class Char,
class Traits>
1701 std::basic_ostream<Char,Traits>&
1725 namespace Gecode {
namespace Int {
int offset(void) const
Return offset.
RelTest rtest_gq(VX x, VY y)
Test whether view x is greater or equal than view y.
static const int BITS
How many bits does the status have.
static const BoolStatus NONE
Status of domain not yet assigned.
Val max(void) const
Return maximum of domain.
RangeList * _lastRange
Last cached range.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Post propagator for SetVar x
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
Post propagator for SetVar SetOpType SetVar y
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
int max(void) const
Return maximum of domain.
int offset(void) const
Access offset.
UnsVal size(void) const
Return size (cardinality) of domain.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int max(void) const
Return maximum of domain.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
MinusView(void)
Default constructor.
OffsetView ViewType
The view type.
int max(void) const
Return maximum of domain.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
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.
static const BoolStatus ZERO
Status of domain assigned to zero.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Converter with fixed offset.
int min(void) const
Return minimum of domain.
RelTest rtest_eq_bnd(VX x, VY y)
Test whether views x and y are equal (use bounds information)
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.
void init(const View &x)
Initialize with ranges for view x.
int min(void) const
Return minimum of domain.
int min(void) const
Return smallest value of range.
bool operator<(const OffsetView &y) const
Whether this view comes before view y (arbitray order)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Offset(int off=0)
Constructor with offset off.
void operator++(void)
Move iterator to next range (if possible)
unsigned int size(void) const
Return size (cardinality) of domain.
ScaleView(void)
Default constructor.
BoolView(void)
Default constructor.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
bool operator<(const ConstIntView &y) const
Whether this view comes before view y (arbitray order)
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)
static const BoolStatus NONE
Status of domain not yet assigned.
int offset(void) const
Access offset.
RelTest rtest_lq(VX x, VY y)
Test whether view x is less or equal than view y.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
bool one(void) const
Test whether view is assigned to be one.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
void init(const View &x)
Initialize with values x.
ConstIntView(void)
Default constructor.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Value iterator for integer views.
int max(void) const
Return maximum of domain.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
int scale(void) const
Return scale factor of scale view.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
unsigned int size(void) const
Return size (cardinality) of domain.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
bool in(int n) const
Test whether n is contained in 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.
void init(const CachedView< View > &x)
Initialize with ranges for view x.
void update(Space &home, ConstIntView &y)
Update this view to be a clone of view y.
RelTest rtest_gr(VX x, VY y)
Test whether view x is greater than view y.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
@ RT_TRUE
Relation does hold.
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.
static const BoolStatus ONE
Status of domain assigned to one.
ViewDiffRanges(void)
Default constructor.
unsigned int size(void) const
Return size (cardinality) of domain.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int size(void) const
Return size (cardinality) of domain.
ViewRanges< View > dr
Current domain iterator.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
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.
unsigned int BoolStatus
Type for status of a Boolean variable.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
bool in(Val n) const
Test whether n is contained in domain.
Integer variable implementation.
bool range(void) const
Test whether domain is a range.
int min(void) const
Return minimum of domain.
ScaleView< int, unsigned int > IntScaleView
Integer-precision integer scale view.
int val(void) const
Return assigned value (only if assigned)
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
RelTest rtest_nq_dom(VX x, VY y)
Test whether views x and y are different (use full domain information)
Boolean view for Boolean variables.
Base-class for derived views.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
int min(void) const
Return minimum of domain.
Base-class for constant views.
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
@ RT_MAYBE
Relation may hold or not.
bool in(int n) const
Test whether n is contained in domain.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Range iterator for integer views.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool none(void) const
Test whether view is not yet assigned.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
int val(void) const
Return assigned value (only if assigned)
RelTest rtest_eq_dom(VX x, VY y)
Test whether views x and y are equal (use full domain information)
@ RT_FALSE
Relation does not hold.
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)
Val med(void) const
Return median of domain (greatest element not greater than the median)
CachedView(void)
Default constructor.
Generic domain change information to be supplied to advisors.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ScaleView< long long int, unsigned long long int > LLongScaleView
Long long-precision integer scale view.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
unsigned int size(void) const
Return size (cardinality) of domain.
bool range(void) const
Test whether domain is a range.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Converter without offsets.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
static const BoolStatus ONE
Status of domain assigned to one.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Iter::Ranges::RangeList cr
Cached domain iterator.
int med(void) const
Return median of domain (greatest element not greater than the median)
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
BoolStatus status(void) const
Return current domain status.
Value iterator from range iterator.
int max(void) const
Return maximum of domain.
bool range(void) const
Test whether domain is a range.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Boolean variable implementation.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Val val(void) const
Return assigned value (only if assigned)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
bool range(void) const
Test whether domain is a range.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
Range iterator for computing set difference.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Boolean integer variables.
int val(void) const
Return assigned value (only if assigned)
OffsetView operator()(IntView &x)
Return OffsetRefView for x.
int min(void) const
Return minimum of domain.
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.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ViewRanges(void)
Default constructor.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
unsigned int width(const Delta &d) const
Return width of values just pruned.
struct Gecode::@602::NNF::@65::@66 b
For binary nodes (and, or, eqv)
static const int BITS
How many bits does the status have.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const IdxViewArray< View > &x)
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
UnsVal 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.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
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.
ZeroIntView(void)
Default constructor.
OffsetView(void)
Default constructor.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
void cache(Space &home)
Update cache to current domain.
bool modified(void) const
Check whether cache differs from current domain.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
void update(const Offset &o)
Update during cloning.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
unsigned int size(void) const
Return size (cardinality) of domain.
bool in(int n) const
Test whether n is contained in domain.
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 gr(Space &home, int n)
Restrict domain values to be greater than n.
int min(void) const
Return minimum of domain.
bool in(int n) const
Test whether n is contained in domain.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
int ModEvent
Type for modification events.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Range iterator for cached integer views
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
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.
Scale integer view (template)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool range(void) const
Test whether domain is a range.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
View ViewType
The view type.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int val(void) const
Return assigned value (only if assigned)
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
bool in(int n) const
Test whether n is contained in domain.
RelTest rtest_nq_bnd(VX x, VY y)
Test whether views x and y are different (use bounds information)
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
void update(Space &home, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
bool operator<(const ScaleView< Val, UnsVal > &y) const
Whether this view comes before view y (arbitray order)
int med(void) const
Return median of domain (greatest element not greater than the median)
BoolStatus status(void) const
Return current domain status.
bool operator()(void) const
Test whether iterator is still at a range or done.
RelTest rtest_le(VX x, VY y)
Test whether view x is less than view y.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
void update(Space &home, OffsetView &y)
Update this view to be a clone of view y.
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
int val(void) const
Return assigned value (only if assigned)
int val(void) const
Return assigned value (only if assigned)
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool one(void) const
Test whether view is assigned to be one.
Integer view for integer variables.
int min(void) const
Return minimum of domain.
int val(void) const
Return assigned value (only if assigned)
static const BoolStatus ZERO
Status of domain assigned to zero.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int val(void) const
Return assigned value (only if assigned)
int max(void) const
Return largest value of range.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ViewRanges(const View &x)
Initialize with ranges for view x.
static const BoolStatus ZERO
Status of domain assigned to zero.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
RelTest
Result of testing relation.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
unsigned int _size
Size of cached domain.
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.
bool none(void) const
Test whether view is not yet assigned.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
void update(const NoOffset &)
Update during cloning.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
RangeList * _firstRange
First cached range.
int max(void) const
Return maximum 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.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Gecode::FloatVal c(-8, 8)
int min(void) const
Return minimum of domain.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
int med(void) const
Return median of domain.
Range iterator for range lists
void update(Space &home, CachedView< View > &y)
Update this view to be a clone of view y.
int n
Number of negative literals for node type.
Lists of ranges (intervals)
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int ModEventDelta
Modification event deltas.
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
ViewValues(void)
Default constructor.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Gecode::IntArgs i({1, 2, 3, 4})
Val min(void) const
Return minimum of domain.
bool range(void) const
Test whether domain is a range.
bool range(void) const
Test whether domain is a range.
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
unsigned int size(void) const
Return size (cardinality) of domain.
Base-class for variable implementation views.
IntView(void)
Default constructor.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
static const int BITS
How many bits does the status have.
View & operator()(View &x)
Pass through x.
bool range(void) const
Test whether domain is a range.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
bool in(int n) const
Test whether n is contained in domain.
@ BT_COMP
Same variable but complement.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int max(void) const
Return maximum of domain.
bool in(int n) const
Test whether n is contained in domain.
NegBoolView(void)
Default constructor.
static const BoolStatus NONE
Status of domain not yet assigned.