38 #ifndef __GECODE_KERNEL_WAIT_HH__
39 #define __GECODE_KERNEL_WAIT_HH__
43 namespace Gecode {
namespace Kernel {
155 return sizeof(*this);
175 x.update(home,shared,p.
x);
181 for (
int i=x.
size()-1;
i>0;
i--)
184 assert(x.size() > 0);
196 for (
int i=x.
size()-1;
i>0;
i--)
199 assert(x.size() > 0);
215 for (
int i=x.
size();
i--; )
237 return sizeof(*this);
void update(Space &, bool share, ViewArray< View > &a)
Update array to be a clone of array a.
void(* c)(Space &)
Continuation to execute.
UnaryWait(Home home, View x, void(*c0)(Space &))
Constructor for creation.
ExecStatus ES_SUBSUMED(Propagator &p)
int size(void) const
Return size of array (number of elements)
void cancel(Space &home, Propagator &p, IntSet &y)
View x
View to wait for becoming assigned.
Wait propagator for single view.
Base-class for propagators.
Wait propagator for several views.
void(* c)(Space &)
Continuation to execute.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
void unique(const Space &home)
Remove all duplicate views from array (changes element order)
bool failed(void) const
Check whether space is failed.
Base-class for both propagators and branchers.
Gecode::FloatVal c(-8, 8)
int p
Number of positive literals for node type.
Gecode::IntArgs i(4, 1, 2, 3, 4)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Execution has resulted in failure.
static ExecStatus post(Space &home, View x, void(*c)(Space &))
Post propagator that waits until x becomes assigned and then executes c.
void subscribe(Space &home, Propagator &p, PropCond pc, bool process=true)
Subscribe propagator p with propagation condition pc to variable.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
ModEventDelta med
A set of modification events (used during propagation)
ViewArray< View > x
Views to wait for becoming assigned.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as low unary)
const PropCond PC_GEN_ASSIGNED
Propagation condition for an assigned variable.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one)
static ExecStatus post(Space &home, ViewArray< View > &x, void(*c)(Space &))
Post propagator that waits until x becomes assigned and then executes c.
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.
NaryWait(Home home, ViewArray< View > &x, void(*c0)(Space &))
Constructor for creation.
Node * x
Pointer to corresponding Boolean expression node.
virtual size_t dispose(Space &home)
Delete actor and return its size.
bool assigned(View x, int v)
Whether x is assigned to value v.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual Actor * copy(Space &home, bool share)
Perform copying during cloning.
bool shared(const ConstView< ViewA > &, const ConstView< ViewB > &)
Test whether views share same variable.
int size(void) const
Return size of array (number of elements)
Gecode toplevel namespace
int ModEventDelta
Modification event deltas.
Home class for posting propagators
bool assigned(void) const
Test if all variables are assigned.