70 unsigned int width(
void)
const;
79namespace Gecode {
namespace Int {
126 unsigned int width(
void)
const;
169 static void*
operator new(
size_t s,
Space& home);
171 static void*
operator new(
size_t s,
void* p);
173 static void operator delete(
void*);
175 static void operator delete(
void*,
Space&);
177 static void operator delete(
void*,
void*);
223 unsigned int size(
void)
const;
225 unsigned int width(
void)
const;
240 bool range(
void)
const;
245 bool in(
int n)
const;
247 bool in(
long long int n)
const;
261 bool closer_min(
int b)
const;
424 unsigned int width(
void)
const;
467 unsigned int width(
void)
const;
492 friend class ::Gecode::BoolVar;
509 BoolVarImp(
Space& home, BoolVarImp&
x);
542 unsigned int size(
void)
const;
544 unsigned int width(
void)
const;
554 bool zero(
void)
const;
556 bool one(
void)
const;
558 bool none(
void)
const;
564 bool range(
void)
const;
569 bool in(
int n)
const;
571 bool in(
long long int n)
const;
Generic domain change information to be supplied to advisors.
FreeList(void)
Use uninitialized.
FreeList * next(void) const
Return next freelist object.
BoolVarImpBase(Gecode::Space &home, BoolVarImpBase &x)
Constructor for cloning x.
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.
static const int BITS
How many bits does the status have.
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.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
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.
static const BoolStatus NONE
Status of domain not yet assigned.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p to variable with propagation condition pc.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p.
int med(void) const
Return median of domain (greatest element not greater than the median)
BoolVarImp * copy(Space &home)
Return copy of this variable.
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.
static const BoolStatus ZERO
Status of domain assigned to zero.
bool assigned(void) const
Test whether variable is assigned.
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.
static const BoolStatus ONE
Status of domain assigned to one.
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)
static ModEvent modevent(const Delta &d)
Return modification event.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc.
IntDelta(void)
Create integer delta as providing no information.
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
IntVarImpBase(Gecode::Space &home, IntVarImpBase &x)
Constructor for cloning x.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
void operator++(void)
Move iterator to previous range (if possible)
int max(void) const
Return largest value of range.
bool operator()(void) const
Test whether iterator is still at a range or done.
int min(void) const
Return smallest value of range.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
IntVarImpBwd(void)
Default constructor.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
IntVarImpFwd(void)
Default constructor.
bool operator()(void) const
Test whether iterator is still at a range or done.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
int min(void) const
Return smallest value of range.
void operator++(void)
Move iterator to next range (if possible)
int max(void) const
Return largest value of range.
Lists of ranges (intervals)
unsigned int width(void) const
Return width (distance between maximum and minimum)
void fix(RangeList *n)
Restore simple link to next element (so that it becomes a true free list)
int _max
Maximum of range.
int _min
Minimum of range.
RangeList(void)
Default constructor (noop)
int min(void) const
Return minimum.
void prevnext(RangeList *p, RangeList *n)
Set previous element to p and next element to n.
RangeList * prev(const RangeList *n) const
Return previous element (from next n)
int max(void) const
Return maximum.
void dispose(Space &home, RangeList *p, RangeList *l)
Free memory for all elements between this and l (inclusive)
Integer variable implementation.
const RangeList * ranges_bwd(void) const
Return range list for backward iteration.
RangeList * _lst
Link the last element.
RangeList * lst(void) const
Return last element of rangelist.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int med(void) const
Return median of domain (greatest element not greater than the median)
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
bool in(int n) const
Test whether n is contained in domain.
IntVarImp * copy(Space &home)
Return copy of this variable.
bool assigned(void) const
Test whether variable is assigned.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
int max(void) const
Return maximum of domain.
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)
RangeList * fst(void) const
Return first element of rangelist.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
unsigned int size(void) const
Return size (cardinality) of domain.
int min(void) const
Return minimum of domain.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
RangeList dom
Domain information.
unsigned int holes
Size of holes in the domain.
bool range(void) const
Test whether domain is a range.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
IntVarImp(Space &home, IntVarImp &x)
Constructor for cloning x.
friend class IntVarImpBwd
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
friend class IntVarImpFwd
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
const RangeList * ranges_fwd(void) const
Return range list for forward iteration.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
Base-class for propagators.
ModEvent fail(Space &home)
static ModEvent me(const ModEventDelta &med)
#define GECODE_INT_EXPORT
int ModEventDelta
Modification event deltas.
unsigned int BoolStatus
Type for status of a Boolean variable.
Gecode toplevel namespace
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.