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;
424 unsigned int width(
void)
const;
467 unsigned int width(
void)
const;
481 namespace Gecode {
namespace Int {
492 friend class ::Gecode::BoolVar;
518 static const int BITS = 2;
542 unsigned int size(
void)
const;
544 unsigned int width(
void)
const;
553 bool zero(
void)
const;
556 bool one(
void)
const;
558 bool none(
void)
const;
563 bool range(
void)
const;
569 bool in(
int n)
const;
571 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.
int min(void) const
Return minimum.
int min(void) const
Return minimum of domain.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
void dispose(Space &home, RangeList *p, RangeList *l)
Free memory for all elements between this and l (inclusive)
const FloatNum max
Largest allowed float value.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
bool range(void) const
Test whether domain is a range.
void fix(RangeList *n)
Restore simple link to next element (so that it becomes a true free list)
RangeList * prev(const RangeList *n) const
Return previous element (from next n)
bool in(int n) const
Test whether n is contained in domain.
bool operator()(void) const
Test whether iterator is still at a range or done.
int min(void) const
Return smallest value of range.
unsigned int BoolStatus
Type for status of a Boolean variable.
const RangeList * ranges_bwd(void) const
Return range list for backward iteration.
FreeList * next(void) const
Return next freelist object.
RangeList * _lst
Link the last element.
bool any(const View &x)
Test whether x is neither positive nor negative.
static const BoolStatus NONE
Status of domain not yet assigned.
bool in(int n) const
Test whether n is contained in domain.
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.
RangeList * lst(void) const
Return last element of rangelist.
ModEvent zero_none(Space &home)
Assign unassigned variable to zero.
unsigned int size(void) const
Return size (cardinality) of domain.
int ModEvent
Type for modification events.
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.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
IntVarImpFwd(void)
Default constructor.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
Base-class for Int-variable implementations.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p.
bool zero(void) const
Test whether variable is assigned to zero.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
const RangeList * ranges_fwd(void) const
Return range list for forward iteration.
int med(void) const
Return median of domain (greatest element not greater than the median)
bool assigned(void) const
Test whether variable is assigned.
Boolean variable implementation.
RangeList(void)
Default constructor (noop)
int min(void) const
Return minimum of domain.
static const BoolStatus ONE
Status of domain assigned to one.
int val(void) const
Return assigned value (only if assigned)
IntVarImpBwd(void)
Default constructor.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
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)
bool assigned(void) const
Test whether variable is assigned.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
int n
Number of negative literals for node type.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
unsigned int width(void) const
Return width of domain (distance between maximum and minimum)
static ModEvent me(const ModEventDelta &med)
Project modification event for this variable type from med.
int max(void) const
Return maximum.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
void operator++(void)
Move iterator to previous range (if possible)
int PropCond
Type for propagation conditions.
RangeList * fst(void) const
Return first element of rangelist.
Range iterator for ranges of integer variable implementation.
Backward iterator for ranges of integer variable implementations.
unsigned int width(void) const
Return width (distance between maximum and minimum)
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.
int max(void) const
Return maximum of 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.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p.
unsigned int regret_max(void) const
Return regret of domain maximum (distance to next smaller value)
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.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
int max(void) const
Return largest value of range.
BoolStatus status(void) const
Return current domain status.
Integer variable implementation.
RangeList dom
Domain information.
IntVarImp(Space &home, bool share, IntVarImp &x)
Constructor for cloning x.
bool range(void) const
Test whether domain is a range.
ModEvent inter_v(Space &home, I &i, bool depends=true)
Intersect domain with values described by i.
Generic domain change information to be supplied to advisors.
Lists of ranges (intervals)
ModEvent one_none(Space &home)
Assign unassigned variable to one.
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
bool none(void) const
Test whether variable is not yet assigned.
void operator++(void)
Move iterator to next range (if possible)
int val(void) const
Return assigned value (only if assigned)
int max(void) const
Return largest value of range.
IntDelta(void)
Create integer delta as providing no information.
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.
Base-class for freelist-managed objects.
ModEvent fail(Space &home)
Run advisors to be run on failure and returns ME_GEN_FAILED.
Post propagator for SetVar x
unsigned int size(void) const
Return size (cardinality) of domain.
static bool any(const Delta &d)
Test whether arbitrary values got pruned.
Gecode toplevel namespace
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
int min(void) const
Return smallest value of range.
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.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
bool operator()(void) const
Test whether iterator is still at a range or done.
int ModEventDelta
Modification event deltas.
ModEvent narrow_r(Space &home, I &i, bool depends=true)
Replace domain by ranges described by i.
static const int BITS
How many bits does the status have.
unsigned int regret_min(void) const
Return regret of domain minimum (distance to next larger value)
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal 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.
int max(void) const
Return maximum of domain.
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.