88 root->reschedule(home,*
this);
90 while ((l != NULL) && l->
leaf()) {
103 switch (
root->status(home)) {
111 while ((l != NULL) && l->
leaf()) {
123 while ((l != NULL) && l->
leaf()) {
143 while ((l != NULL) && l->
leaf()) {
144 switch (l->
status(home)) {
157 p = l; l = l->
next();
165 switch (l->
status(home)) {
177 while ((l != NULL) && l->
leaf()) {
205 }
else if (
root != NULL) {
208 while ((l != NULL) && l->
leaf())
217 return sizeof(*this);
Base-class for both propagators and branchers.
virtual size_t dispose(Space &home)
Delete actor and return its size.
No-good literal recorded during search.
bool leaf(void) const
Test whether literal is a leaf.
virtual ExecStatus prune(Space &home)=0
Propagate the negation of the no-good literal.
virtual void cancel(Space &home, Propagator &p)=0
Cancel propagator p from all views of the no-good literal.
virtual void subscribe(Space &home, Propagator &p)=0
Subscribe propagator p to all views of the no-good literal.
virtual NGL::Status status(const Space &home) const =0
Test the status of the no-good literal.
Status
The status of a no-good literal.
@ SUBSUMED
The literal is subsumed.
@ FAILED
The literal is failed.
@ NONE
The literal is neither failed nor subsumed.
virtual void reschedule(Space &home, Propagator &p)=0
Schedule propagator p for all views of the no-good literal.
NGL * next(void) const
Return pointer to next literal.
virtual size_t dispose(Space &home)
Dispose.
static PropCost linear(PropCost::Mod m, unsigned int n)
Linear complexity for modifier pcm and size measure n.
Base-class for propagators.
unsigned int n
Number of no-good literals with subscriptions.
virtual size_t dispose(Space &home)
Delete propagator and return its size.
virtual ExecStatus propagate(Space &home, const ModEventDelta &med)
Perform propagation.
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)
NoGoodsProp(Space &home, NGL *root)
Constructor for creation.
virtual void reschedule(Space &home)
Schedule function.
NGL * root
Root of no-good literal tree.
virtual NGL::Status status(const Space &home) const
Test the status of the no-good literal.
virtual ExecStatus prune(Space &home)
Propagate the negation of the no-good literal.
virtual NGL * copy(Space &home)
Create copy.
virtual void cancel(Space &home, Propagator &p)
Cancel propagator p from all views of the no-good literal.
virtual void reschedule(Space &home, Propagator &p)
Schedule propagator p for all views of the no-good literal.
virtual void subscribe(Space &home, Propagator &p)
Subscribe propagator p to all views of the no-good literal.
void rfree(void *p, size_t s)
Free memory previously allocated with alloc (might be reused later)
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.
#define GECODE_ES_CHECK(es)
Check whether execution status es is failed or subsumed, and forward failure or subsumption.
@ AP_DISPOSE
Actor must always be disposed.
NGL * disposenext(NGL *ngl, Space &home, Propagator &p, bool c)
Help function to cancel and dispose a no-good literal.
Gecode toplevel namespace
@ ES_OK
Execution is okay.
@ ES_NOFIX
Propagation has not computed fixpoint.
#define GECODE_NEVER
Assert that this command is never executed.