38#ifndef GECODE_SEARCH_PAR_PATH_HH
39#define GECODE_SEARCH_PAR_PATH_HH
63 template<
class Tracer>
68 typedef typename Tracer::ID
ID;
97 unsigned int alt(
void)
const;
99 unsigned int truealt(
void)
const;
103 bool lao(
void)
const;
105 bool work(
void)
const;
109 unsigned int steal(
void);
112 unsigned int nid(
void)
const;
126 Path(
unsigned int l);
128 unsigned int ngdl(
void)
const;
130 void ngdl(
unsigned int l);
138 bool empty(
void)
const;
150 const Space* best,
int& mark,
155 void reset(
unsigned int l);
157 bool steal(
void)
const;
Choice for performing commit
Search tree edge for recomputation
bool work(void) const
Test whether there is an alternative that can be stolen.
void dispose(void)
Free memory for edge.
Edge(void)
Default constructor.
unsigned int truealt(void) const
Return true number for alternatives (excluding lao optimization).
bool lao(void) const
Test whether current alternative was LAO.
unsigned int nid(void) const
Return node identifier.
const Choice * _choice
Choice.
unsigned int _alt_max
Number of alternatives left.
const Choice * choice(void) const
Return choice.
Space * space(void) const
Return space for edge.
unsigned int alt(void) const
Return number for alternatives.
unsigned int _alt
Current alternative.
bool rightmost(void) const
Test whether current alternative is rightmost.
unsigned int steal(void)
Steal rightmost alternative and return its number.
void next(void)
Move to next alternative.
Space * _space
Space corresponding to this edge (might be nullptr).
void reset(unsigned int l)
Reset stack and set no-good depth limit to l.
unsigned int ngdl(void) const
Return no-good depth limit.
void unwind(int l, Tracer &t)
Unwind the stack up to position l (after failure).
Tracer::ID ID
Identity type.
unsigned int n_work
Number of edges that have work for stealing.
const Choice * push(Worker &stat, Space *s, Space *c, unsigned int nid)
Push space c (a clone of s or nullptr).
Path(unsigned int l)
Initialize with no-good depth limit l.
Support::DynamicStack< Edge, Heap > ds
Stack to store edge information.
void commit(Space *s, int i) const
Commit space s as described by stack entry at position i.
void next(void)
Generate path for next node.
bool empty(void) const
Test whether path is empty.
virtual void post(Space &home) const
Post no-goods.
unsigned int _ngdl
Depth limit for no-good generation.
int lc(void) const
Return position on stack of last copy.
int entries(void) const
Return number of entries on stack.
Edge & top(void) const
Provide access to topmost edge.
bool steal(void) const
Make a quick check whether stealing might be feasible.
Space * recompute(unsigned int &d, unsigned int a_d, Worker &s, Tracer &t)
Recompute space according to path.
Stack with arbitrary number of elements.
Gecode toplevel namespace