Go to the documentation of this file.
44 namespace Gecode {
namespace Set {
namespace Channel {
67 unsigned int xs_size = static_cast<unsigned int>(xs.
size());
101 return sizeof(*this);
114 int xs_size = xs.size();
123 for (
int i=xs_size-1;
i--; ) {
128 for (
int i=xs_size-2;
i--; ) {
133 for (
int i=xs_size;
i--; ) {
140 for (
int i=xs_size;
i--; ) {
149 x0.exclude(home,xs[xs_size-1].max()+1,
152 for (
int i=xs_size-1;
i--; ) {
153 int start = xs[
i].max() + 1;
154 int end = xs[
i+1].min() - 1;
161 if (x0.glbSize()>0) {
169 for (; ubv() && lbv() && ubv.
val()==lbv.
val();
174 if (
i<xs_size-1 && x0.lubMax()==x0.glbMax()) {
180 int to = x0.glbMax();
188 for (
int j=to; j>=from;j--,k--) {
196 for (
int i=xs_size;
i--; )
#define GECODE_ME_CHECK_MODIFIED(modified, me)
Check whether me is failed or modified, and forward failure.
void max(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator for the sorted channel constraint
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Cost function (defined as PC_LINEAR_LO)
const int min
Smallest allowed integer in integer set.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual Actor * copy(Space &home)
Copy propagator during cloning.
Propagator for set equality
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Base-class for both propagators and branchers.
View x0
SetView for the match.
int val(void) const
Return current value.
Gecode toplevel namespace
Base-class for propagators.
const int max
Largest allowed integer in integer set.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
virtual void reschedule(Space &home)
Schedule function.
Home class for posting propagators
Value iterator from range iterator.
Range iterator for computing intersection (binary)
TFE post(PropagatorGroup g)
Only post functions (but not propagators) from g are considered.
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_INT_BND
Propagate when minimum or maximum of a view changes.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Propagation has computed fixpoint.
int size(void) const
Return size of array (number of elements)
virtual size_t dispose(Space &home)
Delete Propagator.
ChannelSorted(Space &home, ChannelSorted &p)
Constructor for cloning p.
const Gecode::PropCond PC_SET_ANY
Propagate when any bound or the cardinality of a view changes.
#define GECODE_ME_CHECK(me)
Check whether modification event me is failed, and forward failure.
ViewArray< Gecode::Int::IntView > xs
IntViews that together form the set x0.
virtual size_t dispose(Space &home)
Delete actor and return its size.
void min(Home home, FloatVar x0, FloatVar x1, FloatVar x2)
Post propagator for .
int ModEventDelta
Modification event deltas.
Gecode::IntArgs i({1, 2, 3, 4})
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
int p
Number of positive literals for node type.