Go to the documentation of this file.
40 namespace Gecode {
namespace Int {
63 void init(
const View&
x);
81 unsigned int width(
void)
const;
103 void init(
const View&
x);
111 namespace Gecode {
namespace Int {
155 unsigned int size(
void)
const;
157 unsigned int width(
void)
const;
166 bool range(
void)
const;
170 bool in(
int n)
const;
172 bool in(
long long int n)
const;
264 template<
class Char,
class Traits>
265 std::basic_ostream<Char,Traits>&
300 unsigned int size(
void)
const;
302 unsigned int width(
void)
const;
311 bool range(
void)
const;
315 bool in(
int n)
const;
317 bool in(
long long int n)
const;
409 template<
class Char,
class Traits>
410 std::basic_ostream<Char,Traits>&
452 unsigned int size(
void)
const;
454 unsigned int width(
void)
const;
463 bool range(
void)
const;
467 bool in(
int n)
const;
469 bool in(
long long int n)
const;
567 template<
class Char,
class Traits>
568 std::basic_ostream<Char,Traits>&
670 template<
class Val,
class UnsVal>
687 int scale(
void)
const;
699 UnsVal
size(
void)
const;
701 UnsVal
width(
void)
const;
710 bool range(
void)
const;
713 bool in(Val
n)
const;
771 template<
class Char,
class Traits>
772 std::basic_ostream<Char,Traits>&
779 template<
class Char,
class Traits>
780 std::basic_ostream<Char,Traits>&
787 template<
class Val,
class UnsVal>
791 template<
class Val,
class UnsVal>
828 unsigned int size(
void)
const;
830 unsigned int width(
void)
const;
839 bool range(
void)
const;
842 bool in(
int n)
const;
844 bool in(
long long int n)
const;
936 template<
class Char,
class Traits>
937 std::basic_ostream<Char,Traits>&
979 unsigned int size(
void)
const;
981 unsigned int width(
void)
const;
990 bool range(
void)
const;
993 bool in(
int n)
const;
995 bool in(
long long int n)
const;
1081 template<
class Char,
class Traits>
1082 std::basic_ostream<Char,Traits>&
1106 template<
class View>
1128 int min(
void)
const;
1131 int max(
void)
const;
1133 int med(
void)
const;
1135 int val(
void)
const;
1138 unsigned int size(
void)
const;
1140 unsigned int width(
void)
const;
1149 bool range(
void)
const;
1153 bool in(
int n)
const;
1155 bool in(
long long int n)
const;
1263 template<
class Char,
class Traits,
class View>
1264 std::basic_ostream<Char,Traits>&
1271 template<
class View>
1275 template<
class View>
1287 template<
class View>
1345 int min(
void)
const;
1348 int max(
void)
const;
1350 int med(
void)
const;
1352 int val(
void)
const;
1355 unsigned int size(
void)
const;
1357 unsigned int width(
void)
const;
1366 bool range(
void)
const;
1369 bool in(
int n)
const;
1371 bool in(
long long int n)
const;
1376 bool zero(
void)
const;
1379 bool one(
void)
const;
1381 bool none(
void)
const;
1489 template<
class Char,
class Traits>
1490 std::basic_ostream<Char,Traits>&
1531 bool zero(
void)
const;
1534 bool one(
void)
const;
1536 bool none(
void)
const;
1553 int min(
void)
const;
1556 int max(
void)
const;
1558 int val(
void)
const;
1580 template<
class Char,
class Traits>
1581 std::basic_ostream<Char,Traits>&
1605 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.
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.
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)
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.
Gecode::IntArgs i(4, 1, 2, 3, 4)
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.
bool same(const CachedView< View > &x, const CachedView< View > &y)
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.
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.
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.
void update(Space &home, bool share, CachedView< View > &y)
Update this view to be a clone of view y.
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
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
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)
bool before(const CachedView< View > &x, const CachedView< View > &y)
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.
void update(Space &home, bool share, ConstIntView &y)
Update this view to be a clone of view y.
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)
struct Gecode::@579::NNF::@61::@62 b
For binary nodes (and, or, eqv)
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.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
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)
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 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 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.
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.
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.
void update(Space &home, bool share, OffsetView &y)
Update this view to be a clone of view y.
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.
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.
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.
void update(Space &home, bool share, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
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.
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
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.
ViewValues(void)
Default constructor.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
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.
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.