36namespace Test {
namespace Set {
55 (sf0 ?
"std::function" :
"funptr"),
n,
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++)
int n
Number of negative literals for node type.
Node * x
Pointer to corresponding Boolean expression node.
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.
Base class for tests with set constraints
static std::string str(Gecode::SetRelType srt)
Map set relation to string.
void fail(void)
Fail space.
Gecode toplevel namespace