Generated on Wed Nov 1 15:04:54 2006 for Gecode by doxygen 1.4.5

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 long int &pn=unused_uli)
 Query space status.
const BranchingDesc * Gecode::Space::description (void) const
 Create new branching description for current branching.
Space * Gecode::Space::clone (bool share=true, unsigned long int &pn=unused_uli)
 Clone space.
void Gecode::Space::commit (const BranchingDesc *d, unsigned int a)
 Commit branching description d and for alternative a.
void Gecode::Space::flush (void)
 Flush cache datastructures in actors.


Enumeration Type Documentation

enum Gecode::SpaceStatus
 

Space status

Enumerator:
SS_FAILED  Space is failed
SS_SOLVED  Space is solved (no branching left)
SS_BRANCH  Space must be branched (at least one branching left)

Definition at line 604 of file core.icc.


Function Documentation

SpaceStatus Gecode::Space::status unsigned long int &  pn = unused_uli  )  [inline, inherited]
 

Query space status.

Propagates the space until fixpoint or failure and increments pn by the number of propagator executions.

Definition at line 1162 of file core.icc.

const BranchingDesc * Gecode::Space::description void   )  const [inline, inherited]
 

Create new branching description for current branching.

This member function can only be called after the member function Space::status on the same space has been called and in between no non-const member function has been called on this space.

Note that the above invariant obly pertains to calls of member functions of the same space. If the invariant is violated, the system is likely to crash (hopefully it does). In particular, if applied to a space with no current branching, the system will crash.

Definition at line 1143 of file core.icc.

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.

Definition at line 340 of file core.cc.

void Gecode::Space::commit const BranchingDesc d,
unsigned int  a
[inherited]
 

Commit branching description d and for alternative a.

The current branching in the space performs a commit from the information provided by the branching description d and the alternative a.

Note that no propagation is perfomed (to support batch recomputation), in order to perform propagation the member function status must be used.

Committing with branching descriptions must be carried out in the same order as the branch descriptions have been obtained by the member function Space::description().

It is perfectly okay to add constraints interleaved with branching descriptions (provided they are in the right order). However, if propagation is performed by calling the member function status and then new branching descriptions are computed, these branching descriptions are different.

Committing throws the following exceptions:

  • SpaceNoBranching, if the space has no current branching (it is already solved).
  • SpaceIllegalAlternative, if a is not smaller than the number of alternatives supported by the branching description d.

Definition at line 230 of file core.cc.

void Gecode::Space::flush void   )  [inherited]
 

Flush cache datastructures in actors.

Flushes caches of actors in the space. This is useful to free memory (in particular when considering a space to be stored for later use such as during search). Even better is to make a clone of the space.

Definition at line 73 of file core.cc.