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