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)
int size(void) const
Return size of array (number of elements)
int size(void) const
Return number of variables.
Space for executing tests.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
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.
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.
struct Gecode::@519::NNF::@60::@61 b
For binary nodes (and, or, eqv)
Node * x
Pointer to corresponding Boolean expression node.
When(void)
Create and register test.
Base class for assignments
void wait(Home home, FloatVar x, void(*c)(Space &home))
Execute c when x becomes assigned.
virtual bool solution(const Assignment &x) const
Check whether x is solution.
virtual void post(Gecode::Space &home, Gecode::IntVarArray &x)
Post wait on x.
static void c(Gecode::Space &_home)
Continuation to be executed.
static void c(Gecode::Space &_home)
Continuation to be executed.