44 namespace Test {
namespace Float {
62 :
Test(
"Rel::Float::Var::XY::"+
str(frt0)+
"::"+
str(n),
70 return cmp(x[0],frt,x[1]);
83 rel(home, x[0], frt, x[1]);
87 rel(home, y, frt, x[2]);
93 assert(x.
size() == 2);
106 :
Test(
"Rel::Float::Var::XX::"+
str(frt0),
113 return cmp(x[0],frt,x[0]);
137 :
Test(
"Rel::Float::Float::"+
str(frt0)+
"::"+
str(n)+
"::"+
str(c0),
145 return cmp(x[0],frt,c);
147 return cmp(x[0],frt,c) &
cmp(x[1],frt,c);
154 rel(home, x[0], frt, c);
156 rel(home, x, frt, c);
161 assert(x.
size() == 1);
177 for (
int c=-4;
c<=4;
c++) {
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Gecode::FloatNum step
Step for going to next solution.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
Create(void)
Perform creation and registration.
int size(void) const
Return size of array (number of elements)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Help class to create and register tests.
Test for simple relation involving float variables
Gecode::FloatVal c
Float constant.
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
FloatVarXX(Gecode::FloatRelType frt0, Gecode::FloatNum st)
Create and register test.
bool testsubsumed
Whether to test for subsumption.
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
Gecode::FloatRelType frt
Float relation type to propagate.
Iterator for float relation types.
int n
Number of negative literals for node type.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
void rel(Home home, IntVar x, SetRelType rt, SetVar s, Reify r)
Post propagator for .
FloatRelType
Relation types for floats.
Reification specification.
Test for simple relation involving shared float variables
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
FloatFloat(Gecode::FloatRelType frt0, int n, Gecode::FloatNum c0, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Post propagator for SetVar SetOpType SetVar y
FloatVarXY(Gecode::FloatRelType frt0, int n, Gecode::FloatNum st)
Create and register test.
Node * x
Pointer to corresponding Boolean expression node.
MaybeType
Type for comparisons and solutions.
void rel(Home home, FloatVar x0, FloatRelType frt, FloatVal n)
Propagates .
Gecode::FloatRelType frt
Float relation type to propagate.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
int size(void) const
Return number of variables.
Gecode toplevel namespace
double FloatNum
Floating point number base type.
Test for simple relation involving float variable and float constant
Base class for assignments
Gecode::FloatRelType frt
Float relation type to propagate.