40 namespace Test {
namespace Float {
64 for (
int i=
x.size();
i--; )
72 Gecode::dom(home,
x[0],
c);
74 Gecode::dom(home,
x,
c);
79 assert(
x.size() == 1);
80 Gecode::dom(home,
x[0],
c,
r);
103 for (
int i=
x.size();
i--; )
111 Gecode::dom(home,
x[0],
min,
max);
113 Gecode::dom(home,
x,
min,
max);
118 assert(
x.size() == 1);
119 Gecode::dom(home,
x[0],
min,
max,
r);
128 using namespace Gecode;
130 for (
int c=-4;
c<=4;
c++) {
133 for (
int d=-3;
d<=3;
d++) {
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
friend FloatVal max(const FloatVal &x, const FloatVal &y)
friend FloatVal min(const FloatVal &x, const FloatVal &y)
Reification specification.
Base class for assignments
Help class to create and register tests.
Create(void)
Perform creation and registration.
Test for domain constraints with float numbers
Gecode::FloatNum max
Float number.
Num(int n, Gecode::FloatNum min0, Gecode::FloatNum max0, Gecode::FloatNum st)
Create and register test.
Gecode::FloatNum min
Float number.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
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
Test for domain constraints with a float value
Val(int n, Gecode::FloatVal c0, Gecode::FloatNum st)
Create and register test.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Gecode::FloatVal c
Float constant.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
bool testsubsumed
Whether to test for subsumption.
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
double FloatNum
Floating point number base type.
const FloatNum max
Largest allowed float value.
const Gecode::FloatNum step
MaybeType
Type for comparisons and solutions.
Gecode::IntArgs i({1, 2, 3, 4})