Go to the documentation of this file.
38 #ifndef __GECODE_KERNEL_WAIT_HH__
39 #define __GECODE_KERNEL_WAIT_HH__
43 namespace Gecode {
namespace Kernel {
73 std::function<
void(
Space& home)>
c);
93 std::function<
void(
Space& home)> c0);
107 std::function<
void(
Space& home)>
c);
120 std::function<
void(
Space& home)> c0)
158 std::function<
void(
Space& home)>
c) {
174 c.~SharedData<std::function<void(
Space& home)>>();
176 return sizeof(*this);
187 std::function<
void(
Space& home)> c0)
204 for (
int i=
x.size()-1;
i>0;
i--)
207 assert(
x.size() > 0);
224 for (
int i=
x.size()-1;
i>0;
i--)
227 assert(
x.size() > 0);
244 std::function<
void(
Space& home)>
c) {
247 for (
int i=
x.size();
i--; )
269 c.~SharedData<std::function<void(
Space& home)>>();
271 return sizeof(*this);
virtual size_t dispose(Space &home)
Delete propagator and return its size.
Post propagator for SetVar x
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ExecStatus ES_SUBSUMED(Propagator &p)
View x
View to wait for becoming assigned.
Class for sharing data between spaces.
bool assigned(View x, int v)
Whether x is assigned to value v.
const PropCond PC_GEN_ASSIGNED
Propagation condition for an assigned variable.
Gecode::IntArgs i(4, 1, 2, 3, 4)
Base-class for both propagators and branchers.
bool assigned(void) const
Test whether view is assigned.
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as high unary)
ViewArray< View > x
Views to wait for becoming assigned.
Gecode toplevel namespace
Base-class for propagators.
virtual void reschedule(Space &home)
Schedule function.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
UnaryWait(Home home, View x, std::function< void(Space &home)> c0)
Constructor for creation.
NaryWait(Home home, ViewArray< View > &x, std::function< void(Space &home)> c0)
Constructor for creation.
Home class for posting propagators
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
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.
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
@ AP_DISPOSE
Actor must always be disposed.
virtual void reschedule(Space &home)
Schedule function.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
ModEventDelta med
A set of modification events (used during propagation)
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as low unary)
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
bool failed(void) const
Check whether space is failed.
Wait propagator for single view.
Exception: invalid function
bool shared(const IntSet &, VX)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Gecode::FloatVal c(-8, 8)
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
@ ES_FAILED
Execution has resulted in failure.
int ModEventDelta
Modification event deltas.
@ ES_OK
Execution is okay.
int p
Number of positive literals for node type.
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.
Wait propagator for several views.