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