79 BoolView::baseval(
int val)
const {
94 return x->regret_min();
98 return x->regret_max();
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);
186 return x->narrow_r(home,i,depend);
191 return x->inter_r(home,i,depend);
196 return x->minus_r(home,i,depend);
201 return x->narrow_v(home,i,depend);
206 return x->inter_v(home,i,depend);
211 return x->minus_v(home,i,depend);
239 return x->zero_none(home);
243 return x->one_none(home);
248 return x->zero(home);
Boolean integer variables.
Generic domain change information to be supplied to advisors.
Boolean variable implementation.
bool zero(void) const
Test whether variable is assigned to zero.
int max(void) const
Return maximum of domain.
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.
int min(void) const
Return minimum of domain.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
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)
ViewRanges(void)
Default constructor.
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.
Singleton(void)
Default constructor.
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
static ModEvent me(const ModEventDelta &med)
void varimp(VarImpType *y)
int ModEventDelta
Modification event deltas.
unsigned int BoolStatus
Type for status of a Boolean variable.
Range and value iterators.
Gecode toplevel namespace
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
int ModEvent
Type for modification events.