64 std::function<
void(
Space& home)>
c);
84 std::function<
void(
Space& home)> c0);
98 std::function<
void(
Space& home)>
c);
111 std::function<
void(
Space& home)> c0)
140 assert(
x.assigned());
148 std::function<
void(
Space& home)>
c) {
164 c.~SharedData<std::function<void(
Space& home)>>();
166 return sizeof(*this);
177 std::function<
void(
Space& home)> c0)
179 assert(!
x[0].assigned());
192 assert(!
x[0].assigned());
193 for (
int i=
x.size()-1; i>0; i--)
196 assert(
x.size() > 0);
212 assert(
x[0].assigned());
213 for (
int i=
x.size()-1; i>0; i--)
216 assert(
x.size() > 0);
225 assert(!
x[0].assigned());
233 std::function<
void(
Space& home)>
c) {
236 for (
int i=
x.size(); i--; )
258 c.~SharedData<std::function<void(
Space& home)>>();
260 return sizeof(*this);
Base-class for both propagators and branchers.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Home class for posting propagators
Exception: invalid function
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as high unary)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual Actor * copy(Space &home)
Perform copying during cloning.
NaryWait(Home home, ViewArray< View > &x, std::function< void(Space &home)> c0)
Constructor for creation.
virtual void reschedule(Space &home)
Schedule function.
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
ViewArray< View > x
Views to wait for becoming assigned.
static ExecStatus post(Home home, ViewArray< View > &x, std::function< void(Space &home)> c)
Post propagator that waits until x becomes assigned and then executes c.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
ModEventDelta med
A set of modification events (used during propagation)
Propagator(Home home)
Constructor for posting.
Class for sharing data between spaces.
View x
View to wait for becoming assigned.
virtual void reschedule(Space &home)
Schedule function.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
static ExecStatus post(Home home, View x, std::function< void(Space &home)> c)
Post propagator that waits until x becomes assigned and then executes c.
UnaryWait(Home home, View x, std::function< void(Space &home)> c0)
Constructor for creation.
virtual Actor * copy(Space &home)
Perform copying during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as low unary)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus ES_SUBSUMED(Propagator &p)
Propagator p is subsumed
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
int ModEventDelta
Modification event deltas.
bool failed(void) const
Check whether space is failed.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
@ AP_DISPOSE
Actor must always be disposed.
Gecode toplevel namespace
const PropCond PC_GEN_ASSIGNED
Propagation condition for an assigned variable.
@ ES_OK
Execution is okay.
@ ES_FAILED
Execution has resulted in failure.
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.