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 (int l) | |
Initialize with no-good depth limit l. More... | |
int | ngdl (void) const |
Return no-good depth limit. More... | |
void | ngdl (int l) |
Set no-good depth limit to l. More... | |
const Choice * | push (Worker &stat, Space *s, Space *c) |
Push space c (a clone of s or NULL) More... | |
void | next (void) |
Generate path for next node. 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... | |
void | reset (void) |
Reset stack. More... | |
virtual void | post (Space &home) const |
Post no-goods. More... | |
![]() | |
NoGoods (void) | |
Initialize. More... | |
unsigned long int | ng (void) const |
Return number of no-goods posted. More... | |
void | ng (unsigned long int n) |
Set number of no-goods posted to n More... | |
virtual | ~NoGoods (void) |
Destructor. More... | |
Protected Attributes | |
Support::DynamicStack< Edge, Heap > | ds |
Stack to store edge information. More... | |
int | _ngdl |
Depth limit for no-good generation. More... | |
![]() | |
unsigned long int | n |
Number of no-goods. More... | |
Additional Inherited Members | |
![]() | |
static NoGoods | eng |
Empty no-goods. 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 |
|
inline |
|
virtual |
|
protected |
|
protected |