Programming actors
[Functionality by programming task]
Collaboration diagram for Programming actors:
Modules | |
Programming integer actors | |
Programming set actors | |
Reified propagator patterns | |
Generic branching based on view and value selection | |
Propagator patterns | |
Patterns for set propagators | |
Classes | |
class | Gecode::ViewArray< View > |
View arrays. More... | |
class | Gecode::Actor |
Base-class for both propagators and branchings. More... | |
class | Gecode::Propagator |
Base-class for propagators. More... | |
class | Gecode::BranchingDesc |
Branch description for batch recomputation. More... | |
class | Gecode::Branching |
Base-class for branchings. More... | |
Partial fixpoints | |
ExecStatus | Gecode::Propagator::ES_FIX_PARTIAL (PropModEvent pme) |
Propagator has computed partial fixpoint | |
ExecStatus | Gecode::Propagator::ES_NOFIX_PARTIAL (PropModEvent pme) |
Propagator has not computed partial fixpoint | |
Defines | |
#define | GECODE_ME_CHECK(me) |
Check whether modification event me is failed, and forward failure. | |
#define | GECODE_ME_CHECK_MODIFIED(modified, me) |
Check whether me is failed or modified, and forward failure. | |
#define | GECODE_ME_FAIL(home, me) |
Check whether modification event me is failed, and fail space home. | |
#define | GECODE_ES_CHECK(es) |
Check whether execution status es is failed, and forward failure. | |
#define | GECODE_ES_FAIL(home, es) |
Check whether execution status es is failed, and fail space home. | |
Typedefs | |
typedef int | Gecode::PropModEvent |
Propagator modification events. | |
Enumerations | |
enum | Gecode::ExecStatus { Gecode::ES_FAILED = -1, Gecode::ES_NOFIX = 0, Gecode::ES_OK = 0, Gecode::ES_FIX = 1, Gecode::ES_SUBSUMED = 2, Gecode::__ES_FIX_PARTIAL = 3, Gecode::__ES_NOFIX_PARTIAL = 4 } |
Status of constraint propagation and branching commit. More... | |
enum | Gecode::PropCost { Gecode::PC_CRAZY_LO = 0, Gecode::PC_CRAZY_HI = 0, Gecode::PC_CUBIC_LO = 1, Gecode::PC_CUBIC_HI = 1, Gecode::PC_QUADRATIC_LO = 2, Gecode::PC_QUADRATIC_HI = 2, Gecode::PC_LINEAR_HI = 3, Gecode::PC_LINEAR_LO = 4, Gecode::PC_TERNARY_HI = 5, Gecode::PC_BINARY_HI = 6, Gecode::PC_TERNARY_LO = 6, Gecode::PC_BINARY_LO = 7, Gecode::PC_UNARY_LO = 7, Gecode::PC_UNARY_HI = 7, Gecode::PC_MAX = 7 } |
Classification of propagation cost. More... | |
Functions | |
void | Gecode::Space::fail (void) |
Fail space. | |
bool | Gecode::Space::failed (void) const |
Check whether space is failed. | |
bool | Gecode::me_failed (ModEvent me) |
Check whether modification event me is failed. | |
bool | Gecode::me_modified (ModEvent me) |
Check whether modification event me describes variable modification. | |
PropCost | Gecode::cost_lo (int n, PropCost pc) |
Dynamic low-propagation cost computation. | |
PropCost | Gecode::cost_hi (int n, PropCost pc) |
Dynamic high-propagation cost computation. |
Define Documentation
|
Value: if (::Gecode::me_failed(me)) \ return ::Gecode::ES_FAILED; To be used inside the propagate member function of a propagator or the commit member function of a branching. Definition at line 29 of file macros.icc. |
|
Value: { \ ModEvent __me__ ## __LINE__ = (me); \ if (::Gecode::me_failed(__me__ ## __LINE__)) \ return ::Gecode::ES_FAILED; \ modified |= ::Gecode::me_modified(__me__ ## __LINE__); \ } To be used inside the propagate member function of a propagator or the commit member function of a branching. Definition at line 40 of file macros.icc. |
|
Value: if (::Gecode::me_failed(me)) { \ (home)->fail(); \ return; \ } To be used inside post functions. Definition at line 53 of file macros.icc. |
|
Value: if ((es) < ::Gecode::ES_OK) \ return ::Gecode::ES_FAILED;
Definition at line 65 of file macros.icc. |
|
Value: if ((es) < ::Gecode::ES_OK) { \ (home)->fail(); \ return; \ }
Definition at line 73 of file macros.icc. |
Typedef Documentation
|
Propagator modification events. Propagator modification events are used by propagators. A propagator stores a modification event for each variable type. They can be accessed through a variable or a view from a given propagator. They can be constructed from a given modevent by a variable or view. |
Enumeration Type Documentation
|
Status of constraint propagation and branching commit.
|
|
Function Documentation
|
Propagator has computed partial fixpoint Set propagator modification events after processing of variables to pme.
|
|
Propagator has not computed partial fixpoint Set propagator modification events before processing of variables to pme.
|
|
Fail space. This is useful for failing outside of actors. Never use inside a propagate or commit member function. The system will crash! |
|
Check whether space is failed. Note that this does not perform propagation. This is useful for posting actors: only if a space is not yet failed, new actors are allowed to be created. |
|
Check whether modification event me is failed.
Definition at line 42 of file modevent.icc. |
|
Check whether modification event me describes variable modification.
Definition at line 47 of file modevent.icc. |
|
Dynamic low-propagation cost computation. If n is less than 4, use constant low-costs, otherwise use pc. Definition at line 268 of file propagator.icc. |
|
Dynamic high-propagation cost computation. If n is less than 4, use constant hight-costs, otherwise use pc. Definition at line 275 of file propagator.icc. |