Programming search engines
[Functionality by programming task]
Collaboration diagram for Programming search engines:
![]() |
Enumerations | |
enum | Gecode::SpaceStatus { Gecode::SS_FAILED, Gecode::SS_SOLVED, Gecode::SS_BRANCH } |
Space status More... | |
Functions | |
SpaceStatus | Gecode::Space::status (unsigned int &a=unused_ui, unsigned long int &pn=unused_uli) |
Query space status. | |
Space * | Gecode::Space::clone (bool share=true, unsigned long int &pn=unused_uli) |
Clone space. | |
void | Gecode::Space::commit (unsigned int a, BranchingDesc *d=NULL, unsigned long int &pn=unused_uli) |
Commit space to alternative. | |
BranchingDesc * | Gecode::Space::description (void) const |
Get branching description for current branching. | |
void | Gecode::Space::flush (void) |
Flush cache datastructures in actors. |
Enumeration Type Documentation
enum Gecode::SpaceStatus |
Function Documentation
SpaceStatus Gecode::Space::status | ( | unsigned int & | a = unused_ui , |
|
unsigned long int & | pn = unused_uli | |||
) | [inherited] |
Query space status.
Propagates the space until fixpoint or failure and increments pn by the number of propagator executions.
- if the space is failed, SpaceStatus::SS_FAILED is returned.
- if the space is not failed but the space has no branching left, SpaceStatus::SS_SOLVED is returned and a is assigned 0.
- otherwise, SpaceStatus::SS_BRANCH is returned and a is assigned the number of alternatives of the branching.
Space * Gecode::Space::clone | ( | bool | share = true , |
|
unsigned long int & | pn = unused_uli | |||
) | [inherited] |
Clone space.
Propagates the space until fixpoint and increments pn by the number of propagator executions. If propagation results in a failed space, an exception of type SpaceFailed is thrown.
Otherwise, a clone of the space is returned. If shared is true, sharable datastructures are shared among the clone and the original space. If shared is false, independent copies of the shared datastructures must be created. This means that a clone with no sharing can be used in a different thread without any interaction with the original space.
void Gecode::Space::commit | ( | unsigned int | a, | |
BranchingDesc * | d = NULL , |
|||
unsigned long int & | pn = unused_uli | |||
) | [inherited] |
Commit space to alternative.
Computes according to whether a branching description d is passed (d == NULL means no branching description).
- if no branching description is provided, the space is propagated until fixpoint and pn is incremented by the number of propagator executions performed. Then the current branching is committed to alternative a.
- if a branching description is provided, no propagation is perfomed (to support batch recomputation) and the current branching is commited to alternative a with branching description d. Note that committing with branching descriptions must be carried out in the same order as the branch descriptions have been obtained.
Committing throws the following exceptions:
- SpaceFailed, if the space is failed (or becomes failed through propagation).
- SpaceNoBranching, if the space has no current branching (it is already solved).
- SpaceIllegalAlternative, if a is not smaller than the number of laternatives provided by the branching.
BranchingDesc * Gecode::Space::description | ( | void | ) | const [inline, inherited] |
void Gecode::Space::flush | ( | void | ) | [inherited] |