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