40 namespace Test {
namespace Set {
59 (sf0 ?
"std::function" :
"funptr"),
n,
70 auto f =
static_cast<std::function<void(Space&)>
> 71 ([](
Space& home) {
c(home); });
int size(void) const
Return size of array (number of elements)
Gecode::SetVarArray x
Set variables to be tested.
Wait(int n, bool sf0)
Create and register test.
static std::string str(Gecode::SetRelType srt)
Map set relation to string.
bool assigned(void) const
Test if all variables are assigned.
Gecode::IntArgs i(4, 1, 2, 3, 4)
int n
Number of negative literals for node type.
void fail(void)
Fail space.
Simple test for wait (set variables)
void wait(Home home, FloatVar x, std::function< void(Space &home)> c)
Execute c when x becomes assigned.
bool sf
Whether to use std::function.
virtual void post(Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &)
Post wait on x.
static void c(Gecode::Space &_home)
Continuation to be executed.
Post propagator for f(x \diamond_{\mathit{op}} y) \sim_r z \f$ void rel(Home home
virtual bool solution(const SetAssignment &x) const
Check whether x is solution.
Node * x
Pointer to corresponding Boolean expression node.
Base class for tests with set constraints
Generate all set assignments.
Gecode toplevel namespace
Space for executing set tests.