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>&
266 operator <<(std::basic_ostream<Char,Traits>& os,
const IntView&
x);
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>&
411 operator <<(std::basic_ostream<Char,Traits>& os,
const MinusView&
x);
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>&
569 operator <<(std::basic_ostream<Char,Traits>& os,
const OffsetView&
x);
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>&
773 operator <<(std::basic_ostream<Char,Traits>& os,
const IntScaleView&
x);
779 template<
class Char,
class Traits>
780 std::basic_ostream<Char,Traits>&
781 operator <<(std::basic_ostream<Char,Traits>& os,
const LLongScaleView&
x);
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>&
938 operator <<(std::basic_ostream<Char,Traits>& os,
const ConstIntView&
x);
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>&
1083 operator <<(std::basic_ostream<Char,Traits>& os,
const ZeroIntView&
x);
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>&
1491 operator <<(std::basic_ostream<Char,Traits>& os,
const BoolView&
x);
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>&
1582 operator <<(std::basic_ostream<Char,Traits>& os,
const NegBoolView&
x);
1605 namespace Gecode {
namespace Int {
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
int val(void) const
Return assigned value (only if assigned)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Scale integer view (template)
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
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 val(void) const
Return assigned value (only if assigned)
bool none(void) const
Test whether view is not yet assigned.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ViewValues(void)
Default constructor.
Relation may hold or not.
int min(void) const
Return minimum of domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
RelTest rtest_gr(View x, int n)
Test whether view x is greater than integer n.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int max(void) const
Return maximum of domain.
static const int BITS
How many bits does the status have.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
bool range(void) const
Test whether domain is a range.
Offset(int off=0)
Constructor with offset off.
Val med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
BoolStatus status(void) const
Return current domain status.
OffsetView ViewType
The view type.
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 minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
bool range(void) const
Test whether domain is a range.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
RangeList * _lastRange
Last cached range.
Converter without offsets.
int min(void) const
Return minimum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
unsigned int BoolStatus
Type for status of a Boolean variable.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
bool before(const CachedView< View > &x, const CachedView< View > &y)
IntView(void)
Default constructor.
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)
Val min(void) const
Return minimum of domain.
bool in(int n) const
Test whether n is contained in domain.
ViewRanges(void)
Default constructor.
bool operator()(void) const
Test whether iterator is still at a range or done.
Range iterator for range lists
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int ModEvent
Type for modification events.
static const BoolStatus NONE
Status of domain not yet assigned.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
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 lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ConstIntView(void)
Default constructor.
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)
int val(void) const
Return assigned value (only if assigned)
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
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.
ScaleView(void)
Default constructor.
Value iterator for integer views.
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.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int min(void) const
Return minimum of domain.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
Base-class for constant views.
int scale(void) const
Return scale factor of scale view.
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.
void init(const View &x)
Initialize with ranges for view x.
int val(void) const
Return assigned value (only if assigned)
BoolView(void)
Default constructor.
UnsVal size(void) const
Return size (cardinality) of domain.
Base-class for derived views.
unsigned int size(void) const
Return size (cardinality) of domain.
ZeroIntView(void)
Default constructor.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
Range iterator for integer views.
Boolean variable implementation.
bool in(int n) const
Test whether n is contained in domain.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int med(void) const
Return median of domain (greatest element not greater than the median)
static const BoolStatus ONE
Status of domain assigned to one.
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
int max(void) const
Return maximum of domain.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
static const BoolStatus ZERO
Status of domain assigned to zero.
int max(void) const
Return maximum of domain.
static const BoolStatus NONE
Status of domain not yet assigned.
bool range(void) const
Test whether domain is a range.
bool in(int n) const
Test whether n is contained in domain.
bool same(const CachedView< View > &x, const CachedView< View > &y)
Gecode::FloatVal c(-8, 8)
int med(void) const
Return median of domain (greatest element not greater than the median)
int min(void) const
Return minimum of domain.
View ViewType
The view type.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
RelTest rtest_gq(View x, int n)
Test whether view x is greater or equal than integer n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
static const BoolStatus ZERO
Status of domain assigned to zero.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
bool one(void) const
Test whether view is assigned to be one.
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.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool in(int n) const
Test whether n is contained in domain.
int n
Number of negative literals for node type.
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.
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.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int max(void) const
Return maximum of domain.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
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.
int max(void) const
Return maximum of domain.
int val(void) const
Return assigned value (only if assigned)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
RelTest
Result of testing relation.
int offset(void) const
Return offset.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent lq(Space &home, Val 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 inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
OffsetView(void)
Default constructor.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
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.
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.
Value iterator from range iterator.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
void update(Space &home, bool share, ConstIntView &y)
Update this view to be a clone of view y.
RelTest rtest_nq_dom(View x, View y)
Test whether views x and y are different (use full domain information)
int min(void) const
Return minimum of domain.
BoolStatus status(void) const
Return current domain status.
Base-class for variable implementation views.
unsigned int size(void) const
Return size (cardinality) of domain.
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)
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
int offset(void) const
Access offset.
void update(const NoOffset &)
Update during cloning.
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)
int max(void) const
Return maximum of domain.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
int max(void) const
Return maximum of domain.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
int max(void) const
Return maximum of domain.
CachedView(void)
Default constructor.
BoolTest bool_test(const BoolView &b0, const BoolView &b1)
void update(const Offset &o)
Update during cloning.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
void init(const CachedView< View > &x)
Initialize with ranges for view x.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
OffsetView operator()(IntView &x)
Return OffsetRefView for x.
static const BoolStatus ONE
Status of domain assigned to one.
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
RelTest rtest_eq_dom(View x, View y)
Test whether views x and y are equal (use full domain information)
Same variable but complement.
ViewDiffRanges(void)
Default constructor.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
Converter with fixed offset.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
void update(Space &home, bool share, CachedView< View > &y)
Update this view to be a clone of view y.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
Boolean integer variables.
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.
static const BoolStatus ZERO
Status of domain assigned to zero.
NegBoolView(void)
Default constructor.
Val max(void) const
Return maximum of domain.
RelTest rtest_nq_bnd(View x, View y)
Test whether views x and y are different (use bounds information)
int min(void) const
Return minimum of domain.
bool one(void) const
Test whether view is assigned to be one.
bool range(void) const
Test whether domain is a range.
Integer view for integer variables.
Integer variable implementation.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
RelTest rtest_le(View x, int n)
Test whether view x is less than integer n.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
unsigned int size(void) const
Return size (cardinality) of domain.
ScaleView< int, unsigned int > IntScaleView
Integer-precision integer scale view.
unsigned int _size
Size of cached domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
int med(void) const
Return median of domain (greatest element not greater than the median)
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)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
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)
View & operator()(View &x)
Pass through x.
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.
int med(void) const
Return median of domain (greatest element not greater than the median)
void operator++(void)
Move iterator to next range (if possible)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
bool modified(void) const
Check whether cache differs from current domain.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
bool range(void) const
Test whether domain is a range.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int med(void) const
Return median of domain.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
RelTest rtest_eq_bnd(View x, View y)
Test whether views x and y are equal (use bounds information)
int min(void) const
Return minimum of domain.
void update(Space &home, bool share, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
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.
void update(Space &home, bool share, OffsetView &y)
Update this view to be a clone of view y.
Lists of ranges (intervals)
static const BoolStatus ONE
Status of domain assigned to one.
Val val(void) const
Return assigned value (only if assigned)
int min(void) const
Return minimum of domain.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
bool in(int n) const
Test whether n is contained in domain.
int max(void) const
Return largest value of range.
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
Gecode toplevel namespace
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
Range iterator for computing set difference.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
void init(const View &x)
Initialize with values x.
unsigned int size(void) const
Return size (cardinality) of domain.
ScaleView< long long int, unsigned long long int > LLongScaleView
Long long-precision integer scale view.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
void cache(Space &home)
Update cache to current domain.
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
int ModEventDelta
Modification event deltas.
void initCache(Space &home, const IntSet &s)
Initialize cache to set s.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
static const int BITS
How many bits does the status have.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
bool in(Val n) const
Test whether n is contained in domain.
bool range(void) const
Test whether domain is a range.
bool range(void) const
Test whether domain is a range.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
static const int BITS
How many bits does the status have.
Iter::Ranges::RangeList cr
Cached domain iterator.
int offset(void) const
Access offset.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
Range iterator for cached integer views
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
RangeList * _firstRange
First cached range.
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ViewRanges< View > dr
Current domain iterator.
MinusView(void)
Default constructor.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Boolean view for Boolean variables.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
RelTest rtest_lq(View x, int n)
Test whether view x is less or equal than integer n.