40namespace 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>
111 return static_cast<UnsVal
>(
x.regret_min()) *
a;
114 template<
class Val,
class UnsVal>
117 return static_cast<UnsVal
>(
x.regret_max()) *
a;
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>
241 return ((base() <
y.base())
242 || ((base() ==
y.base()) && (scale() <
y.scale())));
263 void init(
const IntScaleView&
x);
290 ViewRanges<IntView> > {
299 void init(
const LLongScaleView&
x);
323 template<
class Val,
class UnsVal>
326 return (
x.base() ==
y.base()) && (
x.scale() ==
y.scale());
328 template<
class Val,
class UnsVal>
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Generic domain change information to be supplied to advisors.
Base-class for derived views.
void update(Space &home, DerivedView< View > &y)
Update this view to be a clone of view y.
Integer view for integer variables.
int med(void) const
Return median of domain (greatest element not greater than the median)
Scale integer view (template)
Val val(void) const
Return assigned value (only if assigned)
ModEvent gq(Space &home, Val n)
Restrict domain values to be greater or equal than n.
int scale(void) const
Return scale factor of scale view.
bool in(Val n) const
Test whether n is contained in domain.
bool range(void) const
Test whether domain is a range.
void update(Space &home, ScaleView< Val, UnsVal > &y)
Update this view to be a clone of view y.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
ModEvent le(Space &home, Val n)
Restrict domain values to be less than n.
UnsVal regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
UnsVal width(void) const
Return width of domain (distance between maximum and minimum)
Val max(void) const
Return maximum of domain.
Val med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent gr(Space &home, Val n)
Restrict domain values to be greater than n.
bool operator<(const ScaleView< Val, UnsVal > &y) const
Whether this view comes before view y (arbitray order)
Val min(void) const
Return minimum of domain.
ModEvent eq(Space &home, Val n)
Restrict domain values to be equal to n.
ModEvent nq(Space &home, Val n)
Restrict domain values to be different from n.
UnsVal regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent lq(Space &home, Val n)
Restrict domain values to be less or equal than n.
UnsVal size(void) const
Return size (cardinality) of domain.
ScaleView(void)
Default constructor.
Range iterator for integer views.
void init(const View &x)
Initialize with ranges for view x.
ViewRanges(void)
Default constructor.
Range iterator for pointwise product with a positive integer.
int ModEventDelta
Modification event deltas.
IntType ceil_div_xp(IntType x, IntType y)
Compute where y is non-negative.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
IntType floor_div_xp(IntType x, IntType y)
Compute where y is non-negative.
bool operator==(const CachedView< View > &x, const CachedView< View > &y)
bool operator!=(const CachedView< View > &x, const CachedView< View > &y)
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
Gecode toplevel namespace
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar x
int ModEvent
Type for modification events.