Gecode::Search::Par::Path< Tracer > Class Template Reference
Depth-first path (stack of edges) supporting recomputation. More...
#include <gecode/search/par/path.hh>
Classes | |
| class | Edge |
| Search tree edge for recomputation More... | |
Public Types | |
| typedef Tracer::ID | ID |
| Identity type. | |
Public Member Functions | |
| Path (unsigned int l) | |
| Initialize with no-good depth limit l. | |
| unsigned int | ngdl (void) const |
| Return no-good depth limit. | |
| void | ngdl (unsigned int l) |
| Set no-good depth limit to l. | |
| const Choice * | push (Worker &stat, Space *s, Space *c, unsigned int nid) |
| Push space c (a clone of s or nullptr). | |
| void | next (void) |
| Generate path for next node. | |
| Edge & | top (void) const |
| Provide access to topmost edge. | |
| bool | empty (void) const |
| Test whether path is empty. | |
| int | lc (void) const |
| Return position on stack of last copy. | |
| void | unwind (int l, Tracer &t) |
| 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. | |
| Space * | recompute (unsigned int &d, unsigned int a_d, Worker &s, Tracer &t) |
| Recompute space according to path. | |
| Space * | recompute (unsigned int &d, unsigned int a_d, Worker &s, const Space *best, int &mark, Tracer &t) |
| Recompute space according to path. | |
| int | entries (void) const |
| Return number of entries on stack. | |
| void | reset (unsigned int l) |
| Reset stack and set no-good depth limit to l. | |
| bool | steal (void) const |
| Make a quick check whether stealing might be feasible. | |
| Space * | steal (Worker &stat, unsigned long int &d, Tracer &myt, Tracer &ot) |
| Steal work at depth d. | |
| virtual void | post (Space &home) const |
| Post no-goods. | |
| Public Member Functions inherited from Gecode::NoGoods | |
| NoGoods (void) | |
| Initialize. | |
| NoGoods (const NoGoods &ng) | |
| Copy constructor. | |
| NoGoods & | operator= (const NoGoods &ng) |
| Assignment operator. | |
| unsigned long int | ng (void) const |
| Return number of no-goods posted. | |
| void | ng (unsigned long int n) |
| Set number of no-goods posted to n | |
| virtual | ~NoGoods (void) |
| Destructor. | |
Protected Attributes | |
| Support::DynamicStack< Edge, Heap > | ds |
| Stack to store edge information. | |
| unsigned int | _ngdl |
| Depth limit for no-good generation. | |
| unsigned int | n_work |
| Number of edges that have work for stealing. | |
| Protected Attributes inherited from Gecode::NoGoods | |
| std::atomic< unsigned long int > | n |
| Number of no-goods. | |
Additional Inherited Members | |
| Static Public Attributes inherited from Gecode::NoGoods | |
| static NoGoods | eng |
| Empty no-goods. | |
Detailed Description
template<class Tracer>
class Gecode::Search::Par::Path< Tracer >
class Gecode::Search::Par::Path< Tracer >
Depth-first path (stack of edges) 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 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.
Member Typedef Documentation
◆ ID
template<class Tracer>
| typedef Tracer::ID Gecode::Search::Par::Path< Tracer >::ID |
Constructor & Destructor Documentation
◆ Path()
template<class Tracer>
|
inline |
Member Function Documentation
◆ ngdl() [1/2]
template<class Tracer>
|
inline |
◆ ngdl() [2/2]
template<class Tracer>
|
inline |
◆ push()
◆ next()
template<class Tracer>
|
inline |
◆ top()
◆ empty()
template<class Tracer>
|
inline |
◆ lc()
template<class Tracer>
|
inline |
◆ unwind()
template<class Tracer>
|
inline |
◆ commit()
template<class Tracer>
|
inline |
◆ recompute() [1/2]
◆ recompute() [2/2]
◆ entries()
template<class Tracer>
|
inline |
◆ reset()
template<class Tracer>
|
inline |
◆ steal() [1/2]
template<class Tracer>
|
inline |
◆ steal() [2/2]
◆ post()
template<class Tracer>
|
virtual |
Member Data Documentation
◆ ds
template<class Tracer>
|
protected |
◆ _ngdl
template<class Tracer>
|
protected |
◆ n_work
template<class Tracer>
|
protected |
The documentation for this class was generated from the following files:
