42 namespace Gecode {
namespace Set {
112 (
x.
val()==
n) :
false; }
213 if (iter.min()!=iter.max())
216 int val = iter.min();
363 unsigned int width(
void)
const;
int val(void) const
Return assigned value (only if assigned)
ModEvent inter_r(Space &home, I &i, bool depends=true)
Intersect domain with ranges described by i.
ModEvent nq(Space &home, int n)
Restrict domain values to be different from n.
ModEvent gr(Space &home, int n)
Restrict domain values to be greater than n.
static ModEventDelta med(ModEvent me)
Translate modification event me to modification event delta for view.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
static ModEvent modevent(const Delta &d)
Return modification event.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
bool notContains(int i) const
Test whether i is not in the least upper bound.
const Gecode::ModEvent ME_SET_FAILED
Domain operation has resulted in failure.
ModEvent includeI(Space &home, I &i)
Include range sequence described by i in greatest lower bound.
const Gecode::PropCond PC_SET_CARD
Propagate when the cardinality of a view changes.
const Gecode::ModEvent ME_SET_LUB
Domain operation has changed the least upper bound.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
VarImpType * varimp(void) const
Return variable implementation of view.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
SingletonView(void)
Default constructor.
ModEvent include(Space &home, int i, int j)
Update greatest lower bound to include all elements between and including i and j.
int ModEvent
Type for modification events.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
Base-class for propagators.
Range iterator for the greatest lower bound.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
bool contains(int i) const
Test whether i is in the greatest lower bound.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
static PropCond pc_settoint(PropCond pc)
Convert set variable PropCond pc to a PropCond for integer variables.
Base-class for derived views.
Range iterator for the least upper bound.
int min(void) const
Return smallest value of range.
int max(void) const
Return maximum of domain.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
Gecode::FloatVal c(-8, 8)
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
ModEvent le(Space &home, int n)
Restrict domain values to be less than n.
int max(void) const
Return largest value of range.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
bool in(int n) const
Test whether n is contained in domain.
int n
Number of negative literals for node type.
int glbMin(void) const
Return minimum of the greatest lower bound.
unsigned int unknownSize(void) const
Return the number of unknown elements.
unsigned int cardMax(void) const
Return maximum cardinality.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
ModEvent lq(Space &home, int n)
Restrict domain values to be less or equal than n.
View base(void) const
Return view from which this view is derived.
bool operator()(void) const
Test whether iterator is still at a range or done.
unsigned int size(void) const
Return size (cardinality) of domain.
int PropCond
Type for propagation conditions.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
int lubMin(void) const
Return minimum of the least upper bound.
static ModEvent me_inttoset(ModEvent me)
Convert integer variable ModEvent me to a ModEvent for set variables.
Range iterator for ranges of integer variable implementation.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
int min(void) const
Return minimum of domain.
void operator++(void)
Move iterator to next range (if possible)
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
const Gecode::ModEvent ME_SET_NONE
Domain operation has not changed domain.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to view.
ModEvent excludeI(Space &home, I &i)
Remove range sequence described by i from least upper bound.
int glbMax(void) const
Return maximum of the greatest lower bound.
Integer view for integer variables.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
unsigned int cardMin(void) const
Return minimum cardinality.
Node * x
Pointer to corresponding Boolean expression node.
Generic domain change information to be supplied to advisors.
static ModEvent modevent(const Delta &d)
Return modification event.
const Gecode::ModEvent ME_INT_DOM
Domain operation has changed the domain.
const Gecode::PropCond PC_SET_CGLB
Propagate when the cardinality or the greatest lower bound of a view changes.
GlbRanges(void)
Default constructor.
static ModEvent me(const ModEventDelta &med)
Return modification event for view type in med.
void init(const T &x)
Initialize with least upper bound ranges for set variable x.
bool assigned(void) const
Test whether view is assigned.
int lubMax(void) const
Return maximum of the least upper bound.
ModEvent gq(Space &home, int n)
Restrict domain values to be greater or equal than n.
ModEvent intersect(Space &home, int i, int j)
Update least upper bound to contain at most all elements between and including i and j...
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
Gecode::Int::IntView x
View from which this view is derived.
ModEvent exclude(Space &home, int i, int j)
Restrict least upper bound to not contain all elements between and including i and j...
Gecode toplevel namespace
const Gecode::PropCond PC_SET_VAL
Propagate when a view becomes assigned (single value)
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
LubRanges(void)
Default constructor.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
const Gecode::ModEvent ME_SET_VAL
Domain operation has resulted in a value (assigned variable)
int ModEventDelta
Modification event deltas.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
#define GECODE_NEVER
Assert that this command is never executed.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
struct Gecode::@518::NNF::@57::@59 a
For atomic nodes.
bool me_failed(ModEvent me)
Check whether modification event me is failed.
void init(const T &x)
Initialize with greatest lower bound ranges for set variable x.
static ModEvent me_settoint(ModEvent me)
Convert set variable ModEvent me to a ModEvent for integer variables.
const Gecode::PropCond PC_INT_VAL
Propagate when a view becomes assigned (single value)