38namespace Gecode {
namespace Int {
79 BoolView::baseval(
int val)
const {
126 return x->
lq(home,
n);
130 return x->
lq(home,
n);
135 return x->
lq(home,
n-1);
139 return x->
lq(home,
n-1);
144 return x->
gq(home,
n);
148 return x->
gq(home,
n);
153 return x->
gq(home,
n+1);
157 return x->
gq(home,
n+1);
162 return x->
nq(home,
n);
166 return x->
nq(home,
n);
171 return x->
eq(home,
n);
175 return x->
eq(home,
n);
248 return x->
zero(home);
315 : Iter::Ranges::Singleton(
x.
min(),
x.
max()) {}
int n
Number of negative literals for node type.
Boolean integer variables.
Generic domain change information to be supplied to advisors.
Boolean variable implementation.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
bool zero(void) const
Test whether variable is assigned to zero.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
bool none(void) const
Test whether variable is not yet assigned.
int max(void) const
Return maximum of domain.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
bool one(void) const
Test whether variable is assigned to one.
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.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent one_none(Space &home)
Assign unassigned variable to one.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
int med(void) const
Return median of domain (greatest element not greater than the median)
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
bool in(int n) const
Test whether n is contained in domain.
ModEvent zero_none(Space &home)
Assign unassigned variable to zero.
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)
bool range(void) const
Test whether domain is a range.
BoolStatus status(void) const
Return current domain status.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
int val(void) const
Return assigned value (only if assigned)
Boolean view for Boolean variables.
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.
BoolView(void)
Default constructor.
int max(void) const
Return maximum 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 narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
int min(void) const
Return minimum of domain.
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.
ModEvent zero_none(Space &home)
Assign not yet assigned view to zero.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
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.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
BoolStatus status(void) const
Return current domain status.
bool zero(void) const
Test whether view is assigned to be zero.
ModEvent one_none(Space &home)
Assign not yet assigned view to one.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
bool one(void) const
Test whether view is assigned to be one.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
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)
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Range iterator for integer views.
void init(const View &x)
Initialize with ranges for view x.
ViewRanges(void)
Default constructor.
Range iterator for singleton range.
void init(int min, int max)
Initialize with range min to max.
Base-class for variable implementation views.
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
static ModEvent me(const ModEventDelta &med)
int ModEventDelta
Modification event deltas.
unsigned int BoolStatus
Type for status of a Boolean variable.
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.