Generated on Sat Feb 7 2015 02:01:50 for Gecode by doxygen 1.8.9.1
Gecode::Search::Parallel::Path Class Reference

Depth-first path (stack of edges) supporting recomputation. More...

#include <path.hh>

Classes

class  Edge
 Search tree edge for recomputation More...
 

Public Member Functions

 Path (int l)
 Initialize with no-good depth limit l. More...
 
int ngdl (void) const
 Return no-good depth limit. More...
 
void ngdl (int l)
 Set no-good depth limit to l. More...
 
const Choicepush (Worker &stat, Space *s, Space *c)
 Push space c (a clone of s or NULL) More...
 
void next (void)
 Generate path for next node. More...
 
Edgetop (void) const
 Provide access to topmost edge. More...
 
bool empty (void) const
 Test whether path is empty. More...
 
int lc (void) const
 Return position on stack of last copy. More...
 
void unwind (int l)
 Unwind the stack up to position l (after failure) More...
 
void commit (Space *s, int i) const
 Commit space s as described by stack entry at position i. More...
 
Spacerecompute (unsigned int &d, unsigned int a_d, Worker &s)
 Recompute space according to path. More...
 
Spacerecompute (unsigned int &d, unsigned int a_d, Worker &s, const Space &best, int &mark)
 Recompute space according to path. More...
 
int entries (void) const
 Return number of entries on stack. More...
 
void reset (int l)
 Reset stack and set no-good depth limit to l. More...
 
bool steal (void) const
 Make a quick check whether stealing might be feasible. More...
 
Spacesteal (Worker &stat, unsigned long int &d)
 Steal work at depth d. More...
 
virtual void post (Space &home) const
 Post no-goods. More...
 
- Public Member Functions inherited from Gecode::NoGoods
 NoGoods (void)
 Initialize. More...
 
unsigned long int ng (void) const
 Return number of no-goods posted. More...
 
void ng (unsigned long int n)
 Set number of no-goods posted to n More...
 
virtual ~NoGoods (void)
 Destructor. More...
 

Protected Attributes

Support::DynamicStack< Edge, Heapds
 Stack to store edge information. More...
 
int _ngdl
 Depth limit for no-good generation. More...
 
unsigned int n_work
 Number of edges that have work for stealing. More...
 
- Protected Attributes inherited from Gecode::NoGoods
unsigned long int n
 Number of no-goods. More...
 

Additional Inherited Members

- Static Public Attributes inherited from Gecode::NoGoods
static NoGoods eng
 Empty no-goods. More...
 

Detailed Description

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.

Definition at line 61 of file path.hh.

Constructor & Destructor Documentation

Gecode::Search::Parallel::Path::Path ( int  l)
inline

Initialize with no-good depth limit l.

Definition at line 225 of file path.hh.

Member Function Documentation

int Gecode::Search::Parallel::Path::ngdl ( void  ) const
inline

Return no-good depth limit.

Definition at line 229 of file path.hh.

void Gecode::Search::Parallel::Path::ngdl ( int  l)
inline

Set no-good depth limit to l.

Definition at line 234 of file path.hh.

const Choice * Gecode::Search::Parallel::Path::push ( Worker stat,
Space s,
Space c 
)
inline

Push space c (a clone of s or NULL)

Definition at line 239 of file path.hh.

void Gecode::Search::Parallel::Path::next ( void  )
inline

Generate path for next node.

Definition at line 253 of file path.hh.

Path::Edge & Gecode::Search::Parallel::Path::top ( void  ) const
inline

Provide access to topmost edge.

Definition at line 267 of file path.hh.

bool Gecode::Search::Parallel::Path::empty ( void  ) const
inline

Test whether path is empty.

Definition at line 273 of file path.hh.

int Gecode::Search::Parallel::Path::lc ( void  ) const
inline

Return position on stack of last copy.

Definition at line 284 of file path.hh.

void Gecode::Search::Parallel::Path::unwind ( int  l)
inline

Unwind the stack up to position l (after failure)

Definition at line 297 of file path.hh.

void Gecode::Search::Parallel::Path::commit ( Space s,
int  i 
) const
inline

Commit space s as described by stack entry at position i.

Definition at line 278 of file path.hh.

Space * Gecode::Search::Parallel::Path::recompute ( unsigned int &  d,
unsigned int  a_d,
Worker s 
)
inline

Recompute space according to path.

Definition at line 353 of file path.hh.

Space * Gecode::Search::Parallel::Path::recompute ( unsigned int &  d,
unsigned int  a_d,
Worker s,
const Space best,
int &  mark 
)
inline

Recompute space according to path.

Definition at line 417 of file path.hh.

int Gecode::Search::Parallel::Path::entries ( void  ) const
inline

Return number of entries on stack.

Definition at line 292 of file path.hh.

void Gecode::Search::Parallel::Path::reset ( int  l)
inline

Reset stack and set no-good depth limit to l.

Definition at line 309 of file path.hh.

bool Gecode::Search::Parallel::Path::steal ( void  ) const
inline

Make a quick check whether stealing might be feasible.

Definition at line 317 of file path.hh.

Space * Gecode::Search::Parallel::Path::steal ( Worker stat,
unsigned long int &  d 
)
inline

Steal work at depth d.

Definition at line 322 of file path.hh.

void Gecode::Search::Parallel::Path::post ( Space home) const
virtual

Post no-goods.

Reimplemented from Gecode::NoGoods.

Definition at line 43 of file path.cpp.

Member Data Documentation

Support::DynamicStack<Edge,Heap> Gecode::Search::Parallel::Path::ds
protected

Stack to store edge information.

Definition at line 109 of file path.hh.

int Gecode::Search::Parallel::Path::_ngdl
protected

Depth limit for no-good generation.

Definition at line 111 of file path.hh.

unsigned int Gecode::Search::Parallel::Path::n_work
protected

Number of edges that have work for stealing.

Definition at line 113 of file path.hh.


The documentation for this class was generated from the following files: