Gecode::Search::ReCoStack Class Reference
#include <search.hh>
Detailed Description
Stack of nodes supporting recomputation.Maintains the invariant that it contains the path of the node being currently explored. This is required to support recomputation, of course.
The stack supports adaptive recomputation controlled by the value of a_d: only if the recomputation distance is at least this large, an additional clone is created.
Definition at line 278 of file search.hh.
Public Member Functions | |
ReCoStack (unsigned int a_d) | |
Initialize with adaptive recomputation distance a_d. | |
const BranchingDesc * | push (Space *s, Space *c) |
Push space c (a clone of s or NULL). | |
bool | next (EngineCtrl &s) |
Generate path for next node and return whether a next node exists. | |
int | lc (Space *&s) const |
Return position on stack of last copy. | |
void | unwind (int l) |
Unwind the stack up to position l (after failure). | |
void | commit (Space *s, int i) const |
Commit space s as described by stack entry at position i. | |
template<bool constrained> | |
Space * | recompute (unsigned int &d, EngineCtrl &s) |
Recompute space according to path with copying distance d. | |
int | entries (void) const |
Return number of entries on stack. | |
size_t | stacksize (void) const |
Return stack size used. | |
void | reset (void) |
Reset stack. |
Constructor & Destructor Documentation
|
Initialize with adaptive recomputation distance a_d.
Definition at line 74 of file reco-stack.icc. |
Member Function Documentation
|
Push space c (a clone of s or NULL).
Definition at line 77 of file reco-stack.icc. |
|
Generate path for next node and return whether a next node exists.
Definition at line 84 of file reco-stack.icc. |
|
Return position on stack of last copy.
Definition at line 104 of file reco-stack.icc. |
|
Unwind the stack up to position l (after failure).
Definition at line 123 of file reco-stack.icc. |
|
Commit space s as described by stack entry at position i.
Definition at line 98 of file reco-stack.icc. |
|
Recompute space according to path with copying distance d. The template parameter constrained describes whether the stack might contain spaces not propagated (from constraining during branch-and-bound). Definition at line 139 of file reco-stack.icc. |
|
Return number of entries on stack.
Definition at line 113 of file reco-stack.icc. |
|
Return stack size used.
Definition at line 118 of file reco-stack.icc. |
|
Reset stack.
Definition at line 132 of file reco-stack.icc. |
The documentation for this class was generated from the following files:
- gecode/search.hh (Revision: 3516)
- gecode/search/reco-stack.icc (Revision: 3511)