Go to the documentation of this file.
34 #ifndef __GECODE_SEARCH_PAR_PATH_HH__
35 #define __GECODE_SEARCH_PAR_PATH_HH__
44 namespace Gecode {
namespace Search {
namespace Par {
59 template<
class Tracer>
64 typedef typename Tracer::ID
ID;
93 unsigned int alt(
void)
const;
95 unsigned int truealt(
void)
const;
101 bool work(
void)
const;
105 unsigned int steal(
void);
108 unsigned int nid(
void)
const;
122 Path(
unsigned int l);
124 unsigned int ngdl(
void)
const;
126 void ngdl(
unsigned int l);
132 Edge&
top(
void)
const;
134 bool empty(
void)
const;
151 void reset(
unsigned int l);
153 bool steal(
void)
const;
const Choice * push(Worker &stat, Space *s, Space *c, unsigned int nid)
Push space c (a clone of s or NULL)
void commit(Space *s, int i) const
Commit space s as described by stack entry at position i.
unsigned int nid(void) const
Return node identifier.
bool empty(void) const
Test whether path is empty.
bool rightmost(void) const
Test whether current alternative is rightmost.
bool work(void) const
Test whether there is an alternative that can be stolen.
void next(void)
Move to next alternative.
Support::DynamicStack< Edge, Heap > ds
Stack to store edge information.
Path(unsigned int l)
Initialize with no-good depth limit l.
Space * recompute(unsigned int &d, unsigned int a_d, Worker &s, Tracer &t)
Recompute space according to path.
void * mark(void *p)
Return marked pointer for unmarked pointer p.
Search tree edge for recomputation
const Choice * _choice
Choice.
unsigned int truealt(void) const
Return true number for alternatives (excluding lao optimization)
void unwind(int l, Tracer &t)
Unwind the stack up to position l (after failure)
bool lao(void) const
Test whether current alternative was LAO.
unsigned int _alt_max
Number of alternatives left.
Gecode toplevel namespace
const Choice * choice(void) const
Return choice.
No-goods recorded from restarts.
Space * _space
Space corresponding to this edge (might be NULL)
Edge(void)
Default constructor.
unsigned int n_work
Number of edges that have work for stealing.
Depth-first path (stack of edges) supporting recomputation.
bool steal(void) const
Make a quick check whether stealing might be feasible.
unsigned int _ngdl
Depth limit for no-good generation.
int entries(void) const
Return number of entries on stack.
unsigned int ngdl(void) const
Return no-good depth limit.
Space * space(void) const
Return space for edge.
void dispose(void)
Free memory for edge.
Tracer::ID ID
Identity type.
unsigned int _alt
Current alternative.
unsigned int steal(void)
Steal rightmost alternative and return its number.
Stack with arbitrary number of elements.
void next(void)
Generate path for next node.
virtual void post(Space &home) const
Post no-goods.
const unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance)
Gecode::FloatVal c(-8, 8)
Choice for performing commit
int lc(void) const
Return position on stack of last copy.
unsigned int alt(void) const
Return number for alternatives.
Edge & top(void) const
Provide access to topmost edge.
Gecode::IntArgs i({1, 2, 3, 4})
void reset(unsigned int l)
Reset stack and set no-good depth limit to l.