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