38 namespace Gecode {
namespace Int {
88 return x->regret_min();
92 return x->regret_max();
120 return x->lq(home,
n);
124 return x->lq(home,
n);
129 return x->lq(home,
n-1);
133 return x->lq(home,
n-1);
138 return x->gq(home,
n);
142 return x->gq(home,
n);
147 return x->gq(home,
n+1);
151 return x->gq(home,
n+1);
156 return x->nq(home,
n);
160 return x->nq(home,
n);
165 return x->eq(home,
n);
169 return x->eq(home,
n);
180 return x->narrow_r(home,
i,depend);
185 return x->inter_r(home,
i,depend);
190 return x->minus_r(home,
i,depend);
195 return x->narrow_v(home,
i,depend);
200 return x->inter_v(home,
i,depend);
205 return x->minus_v(home,
i,depend);
233 return x->zero_none(home);
237 return x->one_none(home);
242 return x->zero(home);
305 : Iter::Ranges::Singleton(
x.
min(),
x.
max()) {}
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
bool zero(void) const
Test whether view is assigned to be zero.
Range iterator for singleton range.
bool range(void) const
Test whether domain is a range.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
unsigned int size(void) const
Return size (cardinality) of domain.
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.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
ViewRanges(void)
Default constructor.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
int ModEvent
Type for modification events.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
void init(const View &x)
Initialize with ranges for view x.
bool zero(void) const
Test whether variable is assigned to zero.
BoolView(void)
Default constructor.
Range iterator for integer views.
Boolean variable implementation.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int min(void) const
Return minimum of domain.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
int max(void) const
Return maximum of domain.
void init(int min, int max)
Initialize with range min to max.
BoolStatus status(void) const
Return current domain status.
ModEvent gq(Space &home, int 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)
Base-class for variable implementation views.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values 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.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
int min(void) const
Return minimum of domain.
Boolean integer variables.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
Post propagator for SetVar SetOpType SetVar y
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
Generic domain change information to be supplied to advisors.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
Post propagator for SetVar x
int med(void) const
Return median of domain (greatest element not greater than the median)
bool in(int n) const
Test whether n is contained in domain.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Gecode toplevel namespace
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
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.
VarImpType * x
Pointer to variable implementation.
int ModEventDelta
Modification event deltas.
int val(void) const
Return assigned value (only if assigned)
bool one(void) const
Test whether variable is assigned to one.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Boolean view for Boolean variables.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.