Depth-first path (stack of edges) supporting recomputation. More...
#include <path.hh>
Classes | |
class | Edge |
Search tree edge for recomputation More... | |
Public Member Functions | |
Path (void) | |
Initialize. More... | |
const Choice * | push (Worker &stat, Space *s, Space *c) |
Push space c (a clone of s or NULL) More... | |
bool | next (Worker &s) |
Generate path for next node and return whether a next node exists. More... | |
Edge & | top (void) const |
Provide access to topmost edge. More... | |
bool | empty (void) const |
Test whether path is empty. More... | |
int | lc (void) const |
Return position on stack of last copy. More... | |
void | unwind (int l) |
Unwind the stack up to position l (after failure) More... | |
void | commit (Space *s, int i) const |
Commit space s as described by stack entry at position i. More... | |
Space * | recompute (unsigned int &d, unsigned int a_d, Worker &s) |
Recompute space according to path. More... | |
Space * | recompute (unsigned int &d, unsigned int a_d, Worker &s, const Space *best, int &mark) |
Recompute space according to path. More... | |
int | entries (void) const |
Return number of entries on stack. More... | |
size_t | size (void) const |
Return size used. More... | |
void | reset (void) |
Reset stack. More... | |
Protected Attributes | |
Support::DynamicStack< Edge, Heap > | ds |
Stack to store edge information. More... | |
Depth-first path (stack of edges) supporting recomputation.
Maintains the invariant that it contains the path of the space being currently explored. This is required to support recomputation, of course.
The path 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.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |