44 namespace Test {
namespace Float {
68 for (
int i=x.
size();
i--; )
83 assert(x.
size() == 1);
107 for (
int i=x.
size();
i--; )
108 if ((x[
i].
max() > max) || (x[
i].min() <
min))
122 assert(x.
size() == 1);
134 for (
int c=-4;
c<=4;
c++) {
135 (void)
new Val(1,
c,step);
136 (void)
new Val(2,
c,step);
137 for (
int d=-3;
d<=3;
d++) {
138 (void)
new Num(1,
c,
d,step);
139 (void)
new Num(2,
c,
d,step);
const Gecode::FloatNum step
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
const FloatNum max
Largest allowed float value.
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.
void dom(Home home, FloatVar x, FloatVal n)
Propagates .
bool testsubsumed
Whether to test for subsumption.
Test for domain constraints with a float value
static std::string str(Gecode::FloatRelType frt)
Map float relation to string.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
const FloatNum min
Smallest allowed float value.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
Reification specification.
Num(int n, Gecode::FloatNum min0, Gecode::FloatNum max0, Gecode::FloatNum st)
Create and register test.
Help class to create and register tests.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Gecode::FloatVal c
Float constant.
Node * x
Pointer to corresponding Boolean expression node.
MaybeType
Type for comparisons and solutions.
Create(void)
Perform creation and registration.
int size(void) const
Return number of variables.
Test for domain constraints with float numbers
Gecode toplevel namespace
Val(int n, Gecode::FloatVal c0, Gecode::FloatNum st)
Create and register test.
Gecode::FloatNum max
Float number.
friend FloatVal max(const FloatVal &x, const FloatVal &y)
friend FloatVal min(const FloatVal &x, const FloatVal &y)
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
int size(void) const
Return size of array (number of elements)
double FloatNum
Floating point number base type.
Gecode::FloatNum min
Float number.
Base class for assignments