Single value precedence propagator. More...
#include <precede.hh>
Classes | |
class | Index |
Advisors for views (by position in array) More... | |
Public Member Functions | |
virtual Propagator * | copy (Space &home, bool share) |
Copy propagator during cloning. More... | |
virtual PropCost | cost (const Space &, const ModEventDelta &) const |
Cost function. More... | |
virtual size_t | dispose (Space &home) |
Delete propagator and return its size. More... | |
virtual ExecStatus | advise (Space &home, Advisor &a, const Delta &d) |
Give advice to propagator. More... | |
virtual ExecStatus | propagate (Space &home, const ModEventDelta &med) |
Perform propagation. More... | |
![]() | |
ModEventDelta | modeventdelta (void) const |
Return the modification event delta. More... | |
double | afc (const Space &home) const |
Return the accumlated failure count. More... | |
![]() |
Static Public Member Functions | |
static ExecStatus | post (Home home, ViewArray< View > &x, int s, int t) |
Post propagator that s precedes t in x. More... | |
![]() | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. More... | |
static void | operator delete (void *p, Space &home) |
No-op for exceptions. More... | |
Protected Member Functions | |
ExecStatus | updateAlpha (Space &home) |
Update the alpha pointer. More... | |
ExecStatus | updateBeta (Space &home) |
Update the beta pointer. More... | |
Single (Home home, ViewArray< View > &x, int s, int t, int beta, int gamma) | |
Constructor for posting. More... | |
Single (Space &home, bool share, Single< View > &p) | |
Constructor for cloning p. More... | |
![]() | |
NaryPropagator (Space &home, bool share, NaryPropagator &p) | |
Constructor for cloning p. More... | |
NaryPropagator (Space &home, bool share, Propagator &p, ViewArray< View > &x) | |
Constructor for rewriting p during cloning. More... | |
NaryPropagator (Home home, ViewArray< View > &x) | |
Constructor for creation. More... | |
![]() | |
Propagator (Home home) | |
Constructor for posting. More... | |
Propagator (Space &home, bool share, Propagator &p) | |
Constructor for cloning p. More... | |
Propagator * | fwd (void) const |
Return forwarding pointer during copying. More... | |
Protected Attributes | |
Council< Index > | c |
The advisor council. More... | |
int | s |
The value s must precede t. More... | |
int | t |
int | alpha |
Pointers updated during propagation. More... | |
int | beta |
int | gamma |
![]() | |
ViewArray< View > | x |
Array of views. More... | |
Single value precedence propagator.
The propagator is based on: Yat Chiu Law and Jimmy H.M. Lee, Global Constraints for Integer and Set Value Precedence, CP 2004, 362–376.
Requires
Definition at line 65 of file precede.hh.
|
inlineprotected |
Constructor for posting.
Definition at line 88 of file single.hpp.
|
inlineprotected |
Constructor for cloning p.
Definition at line 132 of file single.hpp.
|
inlineprotected |
Update the alpha pointer.
Definition at line 65 of file single.hpp.
|
inlineprotected |
Update the beta pointer.
Definition at line 76 of file single.hpp.
|
virtual |
Copy propagator during cloning.
Implements Gecode::Actor.
Definition at line 140 of file single.hpp.
|
virtual |
Cost function.
Reimplemented from Gecode::NaryPropagator< View, PC_INT_NONE >.
Definition at line 175 of file single.hpp.
|
inlinevirtual |
Delete propagator and return its size.
Reimplemented from Gecode::NaryPropagator< View, PC_INT_NONE >.
Definition at line 164 of file single.hpp.
|
virtual |
Give advice to propagator.
Reimplemented from Gecode::Propagator.
Definition at line 181 of file single.hpp.
|
virtual |
|
inlinestatic |
Post propagator that s precedes t in x.
Definition at line 100 of file single.hpp.
|
protected |
The advisor council.
Definition at line 79 of file precede.hh.
|
protected |
The value s must precede t.
Definition at line 81 of file precede.hh.
|
protected |
Definition at line 81 of file precede.hh.
|
protected |
Pointers updated during propagation.
Definition at line 83 of file precede.hh.
|
protected |
Definition at line 83 of file precede.hh.
|
protected |
Definition at line 83 of file precede.hh.