62 :
SetTest(
"Rel::Bin::"+
str(srt0)+
"::S"+(shared0 ?
"1":
"0"),
63 shared0 ? 1 : 2,ds_33,true)
64 , srt(srt0), shared(shared0){}
66 int x1 = shared ?
x[0] :
x[1];
85 int x1 = shared ?
x[0] :
x[1];
137 :
SetTest(
"ITE",3,ds_03,false,1) {}
140 if ((
x.intval() < 0) || (
x.intval() > 1))
142 if (
x.intval() == 1) {
Range iterator for computing set difference.
Range iterator for computing intersection (binary)
int min(void) const
Return smallest value of range.
Range iterator for singleton range.
Range iterator for computing union (binary)
Reification specification.
A complement iterator spezialized for the BndSet limits.
Range iterator producing subsets of an IntSet.
Test for if-then-else-constraint
ITE(void)
Construct and register test.
void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x and y.
virtual bool solution(const SetAssignment &x) const
Check whether x is a solution.
Test for binary set relation constraint
bool in(int i, CountableSetRanges &c, bool eq=false) const
int minSymDiff(const SetAssignment &x) const
void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
bool solution(const SetAssignment &x) const
Test whether x is solution
RelBin(Gecode::SetRelType srt0, bool shared0)
Create and register test.
Generate all set assignments.
static std::string str(Gecode::SetRelType srt)
Map set relation to string.
SetTest(const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0)
Constructor.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVar x1)
Post propagator for .
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.
SetRelType
Common relation types for sets.
@ SRT_GQ
Greater or equal ( )
@ SRT_LQ
Less or equal ( )
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
const int max
Largest allowed integer in integer set.
Gecode toplevel namespace
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
SetExpr inter(const SetVarArgs &)
Intersection of set variables.
Post propagator for SetVar SetOpType SetVar y
Post propagator for SetVar x
Tests for relation constraints
RelBin _relbin_shared_nq(Gecode::SRT_NQ, true)
RelBin _relbin_shared_cmpl(Gecode::SRT_CMPL, true)
RelBin _relbin_shared_le(Gecode::SRT_LE, true)
RelBin _relbin_shared_gq(Gecode::SRT_GQ, true)
RelBin _relbin_gr(Gecode::SRT_GR, false)
RelBin _relbin_shared_disj(Gecode::SRT_DISJ, true)
RelBin _relbin_disj(Gecode::SRT_DISJ, false)
RelBin _relbin_le(Gecode::SRT_LE, false)
RelBin _relbin_eq(Gecode::SRT_EQ, false)
RelBin _relbin_shared_gr(Gecode::SRT_GR, true)
RelBin _relbin_cmpl(Gecode::SRT_CMPL, false)
RelBin _relbin_shared_eq(Gecode::SRT_EQ, true)
RelBin _relbin_shared_sub(Gecode::SRT_SUB, true)
RelBin _relbin_gq(Gecode::SRT_GQ, false)
RelBin _relbin_sub(Gecode::SRT_SUB, false)
RelBin _relbin_lq(Gecode::SRT_LQ, false)
RelBin _relbin_shared_sup(Gecode::SRT_SUP, true)
RelBin _relbin_shared_lq(Gecode::SRT_LQ, true)
RelBin _relbin_nq(Gecode::SRT_NQ, false)
RelBin _relbin_sup(Gecode::SRT_SUP, false)
#define GECODE_NEVER
Assert that this command is never executed.