34#ifndef __GECODE_SEARCH_PAR_PATH_HH__
35#define __GECODE_SEARCH_PAR_PATH_HH__
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);
134 bool empty(
void)
const;
146 const Space& best,
int& mark,
151 void reset(
unsigned int l);
153 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 NULL)
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 NULL)
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