Go to the documentation of this file.
40 namespace Test {
namespace Float {
47 for (
int i=
a.size();
i--; )
58 class FloatFloat :
public Test {
72 :
Test(
"Linear::Float::"+
73 str(frt0)+
"::"+s+
"::"+
str(c0)+
"::"
76 a(a0),
frt(frt0),
c(c0) {
85 for (
int i=
x.size();
i--; )
90 for (
int i=
x.size();
i--; )
133 :
Test(
"Linear::Var::"+
213 const FloatVal av2[4] = {1.0,1.0,1.0,1.0};
214 const FloatVal av3[4] = {1.0,-1.0,-1.0,1.0};
215 const FloatVal av4[4] = {2.0,3.0,5.0,7.0};
216 const FloatVal av5[4] = {-2.0,3.0,-5.0,7.0};
218 for (
int i=1;
i<=4;
i++) {
Post propagator for SetVar SetOpType SetVar y
Gecode::FloatRelType frt
Float relation type to propagate.
bool testfix
Whether to perform fixpoint test.
unsigned int size(I &i)
Size of all ranges of range iterator i.
Create(void)
Perform creation and registration.
bool reified
Does the constraint also exist as reified constraint.
FloatRelType
Relation types for floats.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Gecode::FloatValArgs a
Coefficients.
FloatFloat(const std::string &s, const Gecode::FloatVal &d, const Gecode::FloatValArgs &a0, Gecode::FloatRelType frt0, Gecode::FloatNum c0, Gecode::FloatNum st)
Create and register test.
Gecode::FloatRelType frt
Float relation type to propagate.
Gecode toplevel namespace
struct Gecode::@602::NNF::@65::@67 a
For atomic nodes.
Node * x
Pointer to corresponding Boolean expression node.
Reification specification.
Gecode::FloatNum c
Result.
virtual MaybeType solution(const Assignment &x) const
Test whether x is solution
Help class to create and register tests.
double FloatNum
Floating point number base type.
bool one(const Gecode::FloatValArgs &a)
Check whether has only one coefficients.
FloatVar(const std::string &s, const Gecode::FloatVal &d, const Gecode::FloatValArgs &a0, Gecode::FloatRelType frt0, Gecode::FloatNum st)
Create and register test.
#define GECODE_NEVER
Assert that this command is never executed.
void linear(Home home, const FloatVarArgs &x, FloatRelType frt, FloatVal c)
Post propagator for .
static MaybeType cmp(Gecode::FloatVal x, Gecode::FloatRelType r, Gecode::FloatVal y)
Compare x and y with respect to r.
int size(void) const
Return size of array (number of elements)
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
Gecode::FloatNum step
Step for going to next solution.
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.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x)
Post constraint on x.
MaybeType
Type for comparisons and solutions.
Base class for assignments
Iterator for float relation types.
Gecode::FloatValArgs a
Coefficients.
virtual void post(Gecode::Space &home, Gecode::FloatVarArray &x, Gecode::Reify r)
Post reified constraint on x for r.
int n
Number of negative literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
Test linear relation over float variables
bool testsubsumed
Whether to test for subsumption.