42 namespace Gecode {
namespace Set {
112 (
x.
val()==
n) :
false; }
213 if (iter.min()!=iter.max())
216 int val = iter.min();
367 unsigned int width(
void)
const;
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.
int val(void) const
Return assigned value (only if assigned)
View base(void) const
Return view from which this view is derived.
static ModEvent modevent(const Delta &d)
Return modification event.
static ModEventDelta med(ModEvent)
Translate modification event me to modification event delta for view.
const Gecode::ModEvent ME_SET_FAILED
Domain operation has resulted in failure.
int min(void) const
Return smallest value of range.
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.
ModEvent intersectI(Space &home, I &iter)
Intersect least upper bound with range sequence described by i.
int lubMin(void) const
Return minimum of the least upper bound.
ModEvent eq(Space &home, int n)
Restrict domain values to be equal to n.
int glbMin(void) const
Return minimum of the greatest lower bound.
bool operator()(void) const
Test whether iterator is still at a range or done.
unsigned int cardMax(void) const
Return maximum cardinality.
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.
void varimp(VarImpType *y)
Set variable implementation to y.
Base-class for propagators.
unsigned int size(void) const
Return size (cardinality) of domain.
Range iterator for the greatest lower bound.
static const int MIN_OF_EMPTY
Returned by empty sets when asked for their minimum element.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
ModEvent minus_r(Space &home, I &i, bool depends=true)
Remove from domain the ranges described by i.
unsigned int glbSize(void) const
Return the number of elements in the greatest lower bound.
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.
bool glbAny(const Delta &d) const
Test whether arbitrary values got pruned from glb.
const Gecode::ModEvent ME_INT_FAILED
Domain operation has resulted in failure.
unsigned int lubSize(void) const
Return the number of elements in the least upper bound.
static const int MAX_OF_EMPTY
Returned by empty sets when asked for their maximum element.
struct Gecode::@579::NNF::@61::@63 a
For atomic nodes.
Gecode::FloatVal c(-8, 8)
bool in(int n) const
Test whether n is contained in domain.
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 p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
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.
int lubMax(void) const
Return maximum of the least upper bound.
unsigned int cardMin(void) const
Return minimum cardinality.
int PropCond
Type for propagation conditions.
const Gecode::ModEvent ME_INT_VAL
Domain operation has resulted in a value (assigned variable)
static ModEvent me_inttoset(ModEvent me)
Convert integer variable ModEvent me to a ModEvent for set variables.
int glbMax(void) const
Return maximum of the greatest lower bound.
Range iterator for ranges of integer variable implementation.
const Gecode::PropCond PC_INT_DOM
Propagate when domain changes.
void operator++(void)
Move iterator to next range (if possible)
int min(void) const
Return minimum of domain.
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.
Integer view for integer variables.
bool any(const Delta &d) const
Test whether arbitrary values got pruned.
Post propagator for SetVar SetOpType SetVar y
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to view.
bool assigned(void) const
Test whether view is assigned.
const double base
Base for geometric restart sequence.
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.
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.
Post propagator for SetVar x
bool notContains(int i) const
Test whether i is not in the least upper bound.
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...
unsigned int unknownSize(void) const
Return the number of unknown elements.
int max(void) const
Return largest value of range.
Gecode toplevel namespace
const Gecode::PropCond PC_SET_VAL
Propagate when a view becomes assigned (single value)
int max(void) const
Return maximum of domain.
static void schedule(Space &home, Propagator &p, ModEvent me)
Schedule propagator p with modification event me.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
LubRanges(void)
Default constructor.
void init(const IntVarImp *x)
Initialize with ranges from variable implementation x.
unsigned int width(void) const
Return width of range (distance between minimum and maximum)
const Gecode::ModEvent ME_SET_VAL
Domain operation has resulted in a value (assigned variable)
int ModEventDelta
Modification event deltas.
bool lubAny(const Delta &d) const
Test whether arbitrary values got pruned from lub.
#define GECODE_NEVER
Assert that this command is never executed.
bool contains(int i) const
Test whether i is in the greatest lower bound.
const Gecode::ModEvent ME_INT_NONE
Domain operation has not changed domain.
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)