40namespace Gecode {
namespace Int {
70 unsigned int width(
void)
const;
79namespace Gecode {
namespace Int {
89 class IntVarImp :
public IntVarImpBase {
90 friend class IntVarImpFwd;
91 friend class IntVarImpBwd;
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*);
204 IntVarImp(
Space& home, IntVarImp&
x);
207 IntVarImp(
Space& home,
int min,
int max);
223 unsigned int size(
void)
const;
225 unsigned int width(
void)
const;
227 unsigned int regret_min(
void)
const;
229 unsigned int regret_max(
void)
const;
240 bool range(
void)
const;
242 bool assigned(
void)
const;
245 bool in(
int n)
const;
247 bool in(
long long int n)
const;
261 bool closer_min(
int b)
const;
371 IntVarImp* copy(
Space& home);
377 static int min(
const Delta& d);
379 static int max(
const Delta& d);
381 static unsigned int width(
const Delta& d);
383 static bool any(
const Delta& d);
404 IntVarImpFwd(
const IntVarImp*
x);
406 void init(
const IntVarImp*
x);
412 bool operator ()(
void)
const;
414 void operator ++(
void);
424 unsigned int width(
void)
const;
447 IntVarImpBwd(
const IntVarImp*
x);
449 void init(
const IntVarImp*
x);
455 bool operator ()(
void)
const;
457 void operator ++(
void);
467 unsigned int width(
void)
const;
481namespace Gecode {
namespace Int {
492 friend class ::Gecode::BoolVar;
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;
int p
Number of positive literals for node type.
int n
Number of negative literals for node type.
struct Gecode::@603::NNF::@65::@67 a
For atomic nodes.
Generic domain change information to be supplied to advisors.
Base-class for freelist-managed objects.
FreeList * next(void) const
Return next freelist object.
Base-class for Bool-variable implementations.
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.
Integer delta information for advisors.
IntDelta(void)
Create integer delta as providing no information.
void subscribe(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned, bool schedule)
Subscribe propagator p with propagation condition pc.
static void schedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::ModEvent me)
Schedule propagator p.
void reschedule(Gecode::Space &home, Gecode::Propagator &p, Gecode::PropCond pc, bool assigned)
Re-schedule propagator p.
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)
Base-class for propagators.
ModEvent fail(Space &home)
Run advisors to be run on failure and returns ME_GEN_FAILED.
static ModEvent me(const ModEventDelta &med)
Project modification event for this variable type from med.
#define GECODE_INT_EXPORT
int ModEventDelta
Modification event deltas.
unsigned int BoolStatus
Type for status of a Boolean variable.
Gecode toplevel namespace
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
void range(Home home, const IntVarArgs &x, SetVar y, SetVar z)
Post constraint .
int PropCond
Type for propagation conditions.
Post propagator for SetVar x
int ModEvent
Type for modification events.