40 namespace Gecode {
namespace Int {
46 template<
class Val,
class UnsVal>
50 template<
class Val,
class UnsVal>
60 template<
class Val,
class UnsVal>
65 template<
class Val,
class UnsVal>
68 return static_cast<Val
>(
x.
min()) *
a;
71 template<
class Val,
class UnsVal>
74 return static_cast<Val
>(
x.
max()) *
a;
77 template<
class Val,
class UnsVal>
80 return static_cast<Val
>(
x.
med()) *
a;
83 template<
class Val,
class UnsVal>
86 return static_cast<Val
>(
x.
val()) *
a;
89 template<
class Val,
class UnsVal>
96 template<
class Val,
class UnsVal>
99 return static_cast<UnsVal
>(
x.
size());
102 template<
class Val,
class UnsVal>
105 return static_cast<UnsVal
>(
x.
width()) *
a;
108 template<
class Val,
class UnsVal>
114 template<
class Val,
class UnsVal>
125 template<
class Val,
class UnsVal>
130 template<
class Val,
class UnsVal>
133 return ((n %
a) == 0) &&
x.
in(n / a);
143 template<
class Val,
class UnsVal>
150 template<
class Val,
class UnsVal>
157 template<
class Val,
class UnsVal>
163 template<
class Val,
class UnsVal>
170 template<
class Val,
class UnsVal>
176 template<
class Val,
class UnsVal>
187 template<
class Val,
class UnsVal>
199 template<
class Val,
class UnsVal>
202 return static_cast<Val
>(
x.
min(d)) *
a;
204 template<
class Val,
class UnsVal>
207 return static_cast<Val
>(
x.
max(d)) *
a;
209 template<
class Val,
class UnsVal>
212 return static_cast<UnsVal
>(
x.
width(d)) *
a;
214 template<
class Val,
class UnsVal>
226 template<
class Val,
class UnsVal>
238 template<
class Val,
class UnsVal>
290 ViewRanges<IntView> > {
323 template<
class Val,
class UnsVal>
328 template<
class Val,
class UnsVal>
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.
int val(void) const
Return assigned value (only if assigned)
IntView base(void) const
Return view from which this view is derived.
Val max(void) const
Return maximum of domain.
bool operator!=(const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
Test whether views x and y are not the same.
bool operator==(const ScaleView< Val, UnsVal > &x, const ScaleView< Val, UnsVal > &y)
Test whether views x and y are the same.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ViewRanges(void)
Default constructor.
int ModEvent
Type for modification events.
unsigned int size(void) const
Return size (cardinality) of domain.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
int scale(void) const
Return scale factor of scale view.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Range iterator for integer variable views
ScaleView(void)
Default constructor.
void init(const View &x)
Initialize with ranges for view x.
Base-class for derived views.
Range iterator for integer views.
bool in(Val n) const
Test whether n is contained in domain.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
bool in(int n) const
Test whether n is contained in domain.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
int n
Number of negative literals for node type.
Val med(void) const
Return median of domain (greatest element not greater than the median)
void update(Space &home, DerivedView< View > &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.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
bool range(void) const
Test whether domain is a range.
Val val(void) const
Return assigned value (only if assigned)
Range iterator for pointwise product with a positive integer.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
int min(void) const
Return minimum of domain.
IntType floor_div_xp(IntType x, IntType y)
Compute where y is non-negative.
IntType ceil_div_xp(IntType x, IntType y)
Compute where y is non-negative.
bool range(void) const
Test whether domain is a range.
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
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)
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
Integer view for integer variables.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Post propagator for SetVar SetOpType SetVar y
Generic domain change information to be supplied to advisors.
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
IntView x
View from which this view is derived.
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
Gecode toplevel namespace
int max(void) const
Return maximum of domain.
Val min(void) const
Return minimum of domain.
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
int ModEventDelta
Modification event deltas.
UnsVal size(void) const
Return size (cardinality) of domain.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
struct Gecode::@593::NNF::@62::@64 a
For atomic nodes.
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.