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
Access offset.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
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 range (distance between minimum and maximum)
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.
int min(void) const
Return minimum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
bool in(int n) const
Test whether n is contained in domain.
unsigned int size(void) const
Return size (cardinality) of domain.
int val(void) const
Return assigned value (only if assigned)
Val max(void) const
Return maximum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
ViewValues(void)
Default constructor.
int val(void) const
Return assigned value (only if assigned)
Relation may hold or not.
int min(void) const
Return minimum of domain.
bool zero(void) const
Test whether view is assigned to be zero.
RelTest rtest_gr(View x, int n)
Test whether view x is greater than integer n.
bool range(void) const
Test whether domain is a range.
bool range(void) const
Test whether domain is a range.
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.
Offset(int off=0)
Constructor with offset off.
bool range(void) const
Test whether domain is a range.
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.
OffsetView ViewType
The view type.
bool in(int n) const
Test whether n is contained in 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.
int max(void) const
Return maximum of domain.
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.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
RangeList * _lastRange
Last cached range.
Converter without offsets.
unsigned int size(void) const
Return size (cardinality) of domain.
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.
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 one(void) const
Test whether view is assigned to be one.
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)
int max(void) const
Return maximum of domain.
IntView(void)
Default constructor.
static const BoolStatus NONE
Status of domain not yet assigned.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ViewRanges(void)
Default constructor.
Range iterator for range lists
int min(void) const
Return minimum of domain.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
struct Gecode::@511::NNF::@54::@55 b
For binary nodes (and, or, eqv)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
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.
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)
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.
int scale(void) const
Return scale factor of scale view.
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 range(void) const
Test whether domain is a range.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
int val(void) const
Return assigned value (only if assigned)
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.
ScaleView(void)
Default constructor.
Value iterator for integer views.
bool zero(void) const
Test whether view is assigned to be zero.
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.
int min(void) const
Return minimum of domain.
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.
bool modified(void) const
Check whether cache differs from current domain.
int offset(void) const
Access offset.
int max(void) const
Return maximum of domain.
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.
Base-class for constant views.
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.
BoolView(void)
Default constructor.
Base-class for derived views.
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.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
bool in(Val n) const
Test whether n is contained in domain.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
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.
static const BoolStatus ZERO
Status of domain assigned to zero.
static const BoolStatus NONE
Status of domain not yet assigned.
int max(void) const
Return maximum of domain.
int min(void) const
Return minimum of domain.
bool same(const CachedView< View > &x, const CachedView< View > &y)
Gecode::FloatVal c(-8, 8)
bool in(int n) const
Test whether n is contained in 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.
bool range(void) const
Test whether domain is a range.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
int val(void) const
Return assigned value (only if assigned)
static const BoolStatus ZERO
Status of domain assigned to zero.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
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)
int n
Number of negative literals for node type.
int val(void) const
Return assigned value (only if assigned)
unsigned int size(void) const
Return size (cardinality) of domain.
Val med(void) const
Return median of domain (greatest element not greater than the median)
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 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.
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.
int max(void) const
Return maximum of domain.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
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)
RelTest
Result of testing relation.
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 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 range(void) const
Test whether domain is a range.
Val val(void) const
Return assigned value (only if assigned)
OffsetView(void)
Default constructor.
BoolStatus status(void) const
Return current domain status.
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 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.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
void update(Space &home, bool share, ConstIntView &y)
Update this view to be a clone of view y.
int min(void) const
Return smallest value of range.
RelTest rtest_nq_dom(View x, View y)
Test whether views x and y are different (use full domain information)
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)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool one(void) const
Test whether view is assigned to be one.
int min(void) const
Return minimum of domain.
Base-class for variable implementation views.
int min(void) const
Return minimum of domain.
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 max(void) const
Return maximum of domain.
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 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.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
bool in(int n) const
Test whether n is contained in 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.
bool range(void) const
Test whether domain is a range.
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.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
bool none(void) const
Test whether view is not yet assigned.
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
BoolStatus status(void) const
Return current domain status.
RelTest rtest_eq_dom(View x, View y)
Test whether views x and y are equal (use full domain information)
int min(void) const
Return minimum of domain.
Same variable but complement.
ViewDiffRanges(void)
Default constructor.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
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.
int med(void) const
Return median of domain (greatest element not greater than the median)
int med(void) const
Return median of domain (greatest element not greater than the median)
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Boolean integer variables.
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.
RelTest rtest_nq_bnd(View x, View y)
Test whether views x and y are different (use bounds information)
Integer view for integer variables.
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)
Integer variable implementation.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int med(void) const
Return median of domain (greatest element not greater than the median)
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 offset(void) const
Return offset.
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 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 regret_min(void) const
Return regret of domain minimum (distance to next larger value)
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.
bool operator()(void) const
Test whether iterator is still at a range or done.
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.
View & operator()(View &x)
Pass through x.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
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.
void operator++(void)
Move iterator to next range (if possible)
int max(void) const
Return largest value of range.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
RelTest rtest_eq_bnd(View x, View y)
Test whether views x and y are equal (use bounds information)
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.
bool in(int n) const
Test whether n is contained in domain.
UnsVal 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.
bool in(int n) const
Test whether n is contained in domain.
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.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
unsigned int size(void) const
Return size (cardinality) of domain.
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
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.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
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 regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
void init(const View &x)
Initialize with values x.
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)
Val min(void) const
Return minimum of domain.
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.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
static const int BITS
How many bits does the status have.
int val(void) const
Return assigned value (only if assigned)
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
UnsVal size(void) const
Return size (cardinality) of domain.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
static const int BITS
How many bits does the status have.
std::basic_ostream< Char, Traits > & operator<<(std::basic_ostream< Char, Traits > &os, const TaskArray< Task > &t)
Iter::Ranges::RangeList cr
Cached domain iterator.
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)
Range iterator for cached integer views
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
RangeList * _firstRange
First cached range.
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
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.