48 namespace Gecode {
namespace Set {
namespace Channel {
71 unsigned int xs_size =
static_cast<unsigned int>(xs.
size());
105 return sizeof(*this);
127 for (
int i=xs_size-1;
i--; ) {
132 for (
int i=xs_size-2;
i--; ) {
137 for (
int i=xs_size;
i--; ) {
144 for (
int i=xs_size;
i--; ) {
153 x0.exclude(home,
xs[xs_size-1].max()+1,
156 for (
int i=xs_size-1;
i--; ) {
157 int start =
xs[
i].max() + 1;
158 int end =
xs[
i+1].min() - 1;
165 if (
x0.glbSize()>0) {
173 for (; ubv() && lbv() && ubv.
val()==lbv.
val();
178 if (i<xs_size-1 &&
x0.lubMax()==
x0.glbMax()) {
184 int to =
x0.glbMax();
192 for (
int j=to; j>=from;j--,k--) {
200 for (
int i=xs_size;
i--; )
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
const int min
Smallest allowed integer in integer set.
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
ExecStatus ES_SUBSUMED(Propagator &p)
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_LINEAR_LO)
Base-class for propagators.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Propagation has computed fixpoint.
const int max
Largest allowed integer in integer set.
#define GECODE_ME_CHECK_MODIFIED(modified, me)
Check whether me is failed or modified, and forward failure.
int val(void) const
Return current value.
Base-class for both propagators and branchers.
View x0
SetView for the match.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual void reschedule(Space &home)
Schedule function.
Range iterator for computing intersection (binary)
const Gecode::PropCond PC_INT_BND
Propagate when minimum or maximum of a view changes.
Value iterator from range iterator.
void cancel(Space &home, Propagator &p, PropCond pc)
Cancel subscription of propagator p with propagation condition pc to all views.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
static ExecStatus post(Home home, View s, ViewArray< Gecode::Int::IntView > &x)
Post propagator that propagates that s contains the , which are sorted in non-descending order...
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
Propagator for the sorted channel constraint
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
virtual size_t dispose(Space &home)
Delete actor and return its size.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual size_t dispose(Space &home)
Delete Propagator.
ChannelSorted(Space &home, ChannelSorted &p)
Constructor for cloning p.
Propagator for set equality
Gecode toplevel namespace
int min(void) const
Return smallest value of range.
ViewArray< Gecode::Int::IntView > xs
IntViews that together form the set x0.
int ModEventDelta
Modification event deltas.
int size(void) const
Return size of array (number of elements)
Home class for posting propagators