55 (sf0 ?
"std::function" :
"funptr"),n,
56 Gecode::IntSet(0,n),false),
sf(sf0) {}
66 auto f =
static_cast<std::function<
void(
Space&)
>>
67 ([](
Space& home) {
c(home); });
70 Gecode::wait(home, x, f);
72 Gecode::wait(home, x, &c);
75 Gecode::wait(home, x[0], f);
77 Gecode::wait(home, x[0], &c);
83 for (
int i=0; i<home.
x.
size(); i++)
bool assigned(void) const
Test if all variables are assigned.
int size(void) const
Return size of array (number of elements)
Simple test for wait (set variables)
Wait(int n, bool sf0)
Create and register test.
virtual void post(Gecode::Space &home, Gecode::SetVarArray &x, Gecode::IntVarArray &)
Post wait on x.
bool sf
Whether to use std::function.
static void c(Gecode::Space &_home)
Continuation to be executed.
virtual bool solution(const SetAssignment &x) const
Check whether x is solution.
Generate all set assignments.
Space for executing set tests.
Gecode::SetVarArray x
Set variables to be tested.
static std::string str(Gecode::SetRelType srt)
Map set relation to string.
SetTest(const std::string &s, int a, const Gecode::IntSet &d, bool r=false, int w=0)
Constructor.
void fail(void)
Fail space.
Gecode toplevel namespace
Post propagator for SetVar x
Tests for synchronized execution