42 namespace Test {
namespace Int {
57 :
Test(
"Wait::Int::"+
str(n),n,0,n,false) {}
61 for (
int j=
i+1; j<x.
size(); j++)
77 for (
int j=
i+1; j<home.
x.
size(); j++)
78 if (home.
x[
i].val() == home.
x[j].val())
88 :
Test(
"Wait::Bool::"+
str(n),n,0,1,false) {}
99 for (
int i=
b.size();
i--; )
111 t += home.
x[
i].val();
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Gecode::IntVarArray x
Variables to be tested.
void channel(Home home, FloatVar x0, IntVar x1)
Post propagator for channeling a float and an integer variable .
Simple test for wait (Boolean variables)
virtual bool solution(const Assignment &x) const
Check whether x is solution.
Space for executing tests.
static std::string str(Gecode::ExtensionalPropKind epk)
Map extensional propagation kind to string.
void when(Home home, BoolVar x, void(*t)(Space &home), void(*e)(Space &home), IntConLevel)
Execute t (then) when x is assigned one, and e (else) otherwise.
Gecode::IntArgs i(4, 1, 2, 3, 4)
IntWait(int n)
Create and register test.
int n
Number of negative literals for node type.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
void fail(void)
Fail space.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post wait on x.
Simple test for wait (integer variables)
static void e(Gecode::Space &home)
Else-function to be executed.
BoolWait(int n)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post when on x.
Passing Boolean variables.
static void t(Gecode::Space &home)
Then-function to be executed.
Node * x
Pointer to corresponding Boolean expression node.
When(void)
Create and register test.
Base class for assignments
struct Gecode::@518::NNF::@57::@58 b
For binary nodes (and, or, eqv)
void wait(Home home, FloatVar x, void(*c)(Space &home))
Execute c when x becomes assigned.
int size(void) const
Return size of array (number of elements)
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post wait on x.
int size(void) const
Return number of variables.
static void c(Gecode::Space &_home)
Continuation to be executed.
static void c(Gecode::Space &_home)
Continuation to be executed.