44 namespace Gecode {
namespace Int {
81 namespace Gecode {
namespace Int {
128 unsigned int width(
void)
const;
171 static void*
operator new(
size_t s,
Space& home);
173 static void*
operator new(
size_t s,
void*
p);
175 static void operator delete(
void*);
177 static void operator delete(
void*,
Space&);
179 static void operator delete(
void*,
void*);
225 unsigned int size(
void)
const;
227 unsigned int width(
void)
const;
241 bool range(
void)
const;
247 bool in(
int n)
const;
249 bool in(
long long int n)
const;
263 bool closer_min(
int b)
const;
419 unsigned int width(
void)
const;
462 unsigned int width(
void)
const;
476 namespace Gecode {
namespace Int {
487 friend class ::Gecode::BoolVar;
513 static const int BITS = 2;
516 static const BoolStatus
ZERO = 0;
518 static const BoolStatus
ONE = 3;
520 static const BoolStatus
NONE = 2;
522 BoolStatus
status(
void)
const;
537 unsigned int size(
void)
const;
539 unsigned int width(
void)
const;
548 bool zero(
void)
const;
551 bool one(
void)
const;
553 bool none(
void)
const;
558 bool range(
void)
const;
564 bool in(
int n)
const;
566 bool in(
long long int n)
const;
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
bool assigned(void) const
Test whether variable is assigned.
unsigned int size(void) const
Return size (cardinality) of domain.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
void dispose(Space &home, RangeList *p, RangeList *l)
Free memory for all elements between this and l (inclusive)
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
int med(void) const
Return median of domain (greatest element not greater than the median)
const FloatNum max
Largest allowed float value.
void fix(RangeList *n)
Restore simple link to next element (so that it becomes a true free list)
int min(void) const
Return minimum.
int min(void) const
Return smallest value of range.
unsigned int BoolStatus
Type for status of a Boolean variable.
RangeList * _lst
Link the last element.
bool any(const View &x)
Test whether x is neither positive nor negative.
bool operator()(void) const
Test whether iterator is still at a range or done.
static const BoolStatus NONE
Status of domain not yet assigned.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
ModEvent zero_none(Space &home)
Assign unassigned variable to zero.
int min(void) const
Return minimum of domain.
int ModEvent
Type for modification events.
static void schedule(Space &home, Propagator &p, ModEvent me, bool force=false)
Schedule propagator p with modification event me.
bool zero(void) const
Test whether variable is assigned to zero.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
Base-class for propagators.
bool operator()(void) const
Test whether iterator is still at a range or done.
FreeList * next(void) const
Return next freelist object.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
bool range(void) const
Test whether domain is a range.
IntVarImpFwd(void)
Default constructor.
Base-class for Int-variable implementations.
RangeList * lst(void) const
Return last element of rangelist.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
Boolean variable implementation.
RangeList(void)
Default constructor (noop)
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
static const BoolStatus ONE
Status of domain assigned to one.
bool one(void) const
Test whether variable is assigned to one.
int val(void) const
Return assigned value (only if assigned)
IntVarImpBwd(void)
Default constructor.
BoolStatus status(void) const
Return current domain status.
int _max
Maximum of range.
int p
Number of positive literals for node type.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
bool assigned(void) const
Test whether variable is assigned.
int max(void) const
Return largest value of range.
static ModEvent me(const ModEventDelta &med)
Project modification event for this variable type from med.
void operator++(void)
Move iterator to previous range (if possible)
bool range(void) const
Test whether domain is a range.
int PropCond
Type for propagation conditions.
int max(void) const
Return maximum.
Range iterator for ranges of integer variable implementation.
bool none(void) const
Test whether variable is not yet assigned.
Backward iterator for ranges of integer variable implementations.
int min(void) const
Return smallest value of range.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
RangeList * prev(const RangeList *n) const
Return previous element (from next n)
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
IntVarImp * copy(Space &home, bool share)
Return copy of this variable.
bool in(int n) const
Test whether n is contained in domain.
BoolVarImp * copy(Space &home, bool share)
Return copy of this variable.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p to variable with propagation condition pc.
unsigned int holes
Size of holes in the domain.
const RangeList * ranges_bwd(void) const
Return range list for backward iteration.
ModEvent minus_v(Space &home, I &i, bool depends=true)
Remove from domain the values described by i.
static const BoolStatus ZERO
Status of domain assigned to zero.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
Integer delta information for advisors.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Integer variable implementation.
RangeList dom
Domain information.
IntVarImp(Space &home, bool share, IntVarImp &x)
Constructor for cloning x.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
Lists of ranges (intervals)
ModEvent one_none(Space &home)
Assign unassigned variable to one.
int max(void) const
Return maximum of domain.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
void operator++(void)
Move iterator to next range (if possible)
unsigned int width(void) const
Return width (distance between maximum and minimum)
IntDelta(void)
Create integer delta as providing no information.
int val(void) const
Return assigned value (only if assigned)
Base-class for Bool-variable implementations.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
void prevnext(RangeList *p, RangeList *n)
Set previous element to p and next element to n.
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 width(void) const
Return width of range (distance between minimum and maximum)
Base-class for freelist-managed objects.
bool in(int n) const
Test whether n is contained in domain.
int med(void) const
Return median of domain (greatest element not greater than the median)
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
Gecode toplevel namespace
const RangeList * ranges_fwd(void) const
Return range list for forward iteration.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
int max(void) const
Return maximum of domain.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
int _min
Minimum of range.
ModEvent narrow_v(Space &home, I &i, bool depends=true)
Replace domain by values described by i.
#define GECODE_INT_EXPORT
static ModEvent modevent(const Delta &d)
Return modification event.
int max(void) const
Return largest value of range.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
int ModEventDelta
Modification event deltas.
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.
static const int BITS
How many bits does the status have.
RangeList * fst(void) const
Return first element of rangelist.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.