44 namespace Test {
namespace Set {
66 :
SetTest(
"Rel::Bin::"+str(srt0)+
"::S"+(shared0 ?
"1":
"0"),
67 shared0 ? 1 : 2,ds_33,true)
68 , srt(srt0), shared(shared0){}
70 int x1 = shared ? x[0] : x[1];
89 int x1 = shared ? x[0] : x[1];
96 case SRT_LQ:
return (!xr0()) || in(minSymDiff(x),xr1,
true);
97 case SRT_LE:
return xr0() ? in(minSymDiff(x),xr1) : xr1();
98 case SRT_GQ:
return (!xr1()) || in(minSymDiff(x),xr0,
true);
99 case SRT_GR:
return xr1() ? in(minSymDiff(x),xr0) : xr0();
141 :
SetTest(
"ITE",3,ds_03,false,1) {}
ITE(void)
Construct and register test.
RelBin _relbin_shared_le(Gecode::SRT_LE, true)
SetRelType
Common relation types for sets.
Range iterator for singleton range.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
RelBin _relbin_le(Gecode::SRT_LE, false)
RelBin _relbin_nq(Gecode::SRT_NQ, false)
bool equal(I &i, J &j)
Check whether range iterators i and j are equal.
RelBin(Gecode::SetRelType srt0, bool shared0)
Create and register test.
RelBin _relbin_sup(Gecode::SRT_SUP, false)
RelBin _relbin_gr(Gecode::SRT_GR, false)
const int max
Largest allowed integer in integer set.
RelBin _relbin_shared_sub(Gecode::SRT_SUB, true)
RelBin _relbin_sub(Gecode::SRT_SUB, false)
RelBin _relbin_lq(Gecode::SRT_LQ, false)
RelBin _relbin_cmpl(Gecode::SRT_CMPL, false)
Test for binary set relation constraint
void post(Space &home, SetVarArray &x, IntVarArray &)
Post constraint on x.
bool in(int i, CountableSetRanges &c, bool eq=false) const
Gecode::IntArgs i(4, 1, 2, 3, 4)
RelBin _relbin_shared_cmpl(Gecode::SRT_CMPL, true)
Range iterator for computing intersection (binary)
RelBin _relbin_shared_disj(Gecode::SRT_DISJ, true)
A complement iterator spezialized for the BndSet limits.
void post(Space &home, SetVarArray &x, IntVarArray &, Reify r)
Post reified constraint on x for b.
virtual bool solution(const SetAssignment &x) const
Check whether x is a solution.
Reification specification.
RelBin _relbin_shared_lq(Gecode::SRT_LQ, true)
Gecode::IntSet lub
The common superset for all domains.
union Gecode::@585::NNF::@62 u
Union depending on nodetype t.
RelBin _relbin_shared_eq(Gecode::SRT_EQ, true)
RelBin _relbin_shared_sup(Gecode::SRT_SUP, true)
Range iterator for computing union (binary)
Post propagator for SetVar SetOpType SetVar SetRelType r
SetExpr inter(const SetVarArgs &x)
Intersection of set variables.
struct Gecode::@585::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Post propagator for SetVar SetOpType SetVar y
Test for if-then-else-constraint
RelBin _relbin_eq(Gecode::SRT_EQ, false)
struct Gecode::@585::NNF::@62::@64 a
For atomic nodes.
Base class for tests with set constraints
Generate all set assignments.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
int minSymDiff(const SetAssignment &x) const
Range iterator producing subsets of an IntSet.
RelBin _relbin_shared_gr(Gecode::SRT_GR, true)
Post propagator for SetVar x
RelBin _relbin_shared_nq(Gecode::SRT_NQ, true)
bool subset(I &i, J &j)
Check whether range iterator i is subset of range iterator j.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
RelBin _relbin_shared_gq(Gecode::SRT_GQ, true)
bool solution(const SetAssignment &x) const
Test whether x is solution
Gecode toplevel namespace
Range iterator for computing set difference.
RelBin _relbin_disj(Gecode::SRT_DISJ, false)
int min(void) const
Return smallest value of range.
void post(Space &home, SetVarArray &x, IntVarArray &y)
Post constraint on x and y.
RelBin _relbin_gq(Gecode::SRT_GQ, false)
#define GECODE_NEVER
Assert that this command is never executed.
int intval(void) const
Return value for first integer variable.
void ite(Home home, BoolVar b, FloatVar x, FloatVar y, FloatVar z)
Post propagator for if-then-else constraint.