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)
148 std::function<
void(
Space& home)> c) {
166 return sizeof(*this);
177 std::function<
void(
Space& home)> c0)
193 for (
int i=x.
size()-1;
i>0;
i--)
196 assert(x.size() > 0);
213 for (
int i=x.
size()-1;
i>0;
i--)
216 assert(x.size() > 0);
233 std::function<
void(
Space& home)> c) {
236 for (
int i=x.
size();
i--; )
260 return sizeof(*this);
virtual void reschedule(Space &home)
Schedule function.
virtual Actor * copy(Space &home)
Perform copying during cloning.
void reschedule(Space &home, Propagator &p, PropCond pc)
Re-schedule propagator p with propagation condition pc.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
int size(void) const
Return size of array (number of elements)
void update(Space &home, ViewArray< View > &a)
Update array to be a clone of array a.
ExecStatus ES_SUBSUMED(Propagator &p)
Actor must always be disposed.
void cancel(Space &home, Propagator &p, IntSet &y)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
virtual PropCost cost(const Space &home, const ModEventDelta &med) const
Const function (defined as high unary)
Base-class for propagators.
Wait propagator for single view.
UnaryWait(Home home, View x, std::function< void(Space &home)> c0)
Constructor for creation.
void subscribe(Space &home, Propagator &p, PropCond pc, bool schedule=true)
Subscribe propagator p with propagation condition pc to variable.
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
static PropCost unary(PropCost::Mod m)
Single variable for modifier pcm.
Base-class for both propagators and branchers.
SharedData< std::function< void(Space &home)> > c
Continuation to execute.
int p
Number of positive literals for node type.
Gecode::IntArgs i({1, 2, 3, 4})
Execution has resulted in failure.
~SharedData(void)
Destructors.
Wait propagator for several views.
bool failed(void) const
Check whether space is failed.
ModEventDelta med
A set of modification events (used during propagation)
virtual size_t dispose(Space &home)
Delete propagator and return its size.
const PropCond PC_GEN_ASSIGNED
Propagation condition for an assigned variable.
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.
View x
View to wait for becoming assigned.
Exception: invalid function
void move_lst(int i)
Move view from position size()-1 to position i (truncate array by one)
#define GECODE_VALID_FUNCTION(f)
Assert that a function is valid.
NaryWait(Home home, ViewArray< View > &x, std::function< void(Space &home)> c0)
Constructor for creation.
void ignore(Actor &a, ActorProperty p, bool duplicate=false)
Ignore actor property.
void notice(Actor &a, ActorProperty p, bool duplicate=false)
Notice actor property.
virtual size_t dispose(Space &home)
Delete actor and return its size.
Class for sharing data between spaces.
virtual Actor * copy(Space &home)
Perform copying during cloning.
bool assigned(View x, int v)
Whether x is assigned to value v.
bool assigned(void) const
Test if all variables are assigned.
void unique(void)
Remove all duplicate views from array (changes element order)
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
Gecode toplevel namespace
virtual void reschedule(Space &home)
Schedule function.
int size(void) const
Return size of array (number of elements)
int ModEventDelta
Modification event deltas.
Home class for posting propagators
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)
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.