Generated on Thu Mar 22 10:39:59 2012 for Gecode by doxygen 1.6.3

Gecode::Search::Parallel::Path Class Reference

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

#include <path.hh>

List of all members.

Classes

class  Edge
 Search tree edge for recomputation More...

Public Member Functions

 Path (void)
 Initialize.
const Choicepush (Worker &stat, Space *s, Space *c)
 Push space c (a clone of s or NULL).
bool next (Worker &s)
 Generate path for next node and return whether a next node exists.
Edgetop (void) const
 Provide access to topmost edge.
bool empty (void) const
 Test whether path is empty.
int lc (void) const
 Return position on stack of last copy.
void unwind (int l)
 Unwind the stack up to position l (after failure).
void commit (Space *s, int i) const
 Commit space s as described by stack entry at position i.
Spacerecompute (unsigned int &d, unsigned int a_d, Worker &s)
 Recompute space according to path.
Spacerecompute (unsigned int &d, unsigned int a_d, Worker &s, const Space *best, int &mark)
 Recompute space according to path.
int entries (void) const
 Return number of entries on stack.
size_t size (void) const
 Return size used.
void reset (void)
 Reset stack.
bool steal (void) const
 Make a quick check whether stealing might be feasible.
Spacesteal (Worker &stat, unsigned long int &d)
 Steal work at depth d.

Protected Attributes

Support::DynamicStack< Edge, Heapds
 Stack to store edge information.
unsigned int n_work
 Number of edges that have work for stealing.

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 58 of file path.hh.


Constructor & Destructor Documentation

Gecode::Search::Parallel::Path::Path ( void   )  [inline]

Initialize.

Definition at line 202 of file path.hh.


Member Function Documentation

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 205 of file path.hh.

bool Gecode::Search::Parallel::Path::next ( Worker s  )  [inline]

Generate path for next node and return whether a next node exists.

Definition at line 215 of file path.hh.

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

Provide access to topmost edge.

Definition at line 231 of file path.hh.

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

Test whether path is empty.

Definition at line 237 of file path.hh.

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

Return position on stack of last copy.

Definition at line 248 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 266 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 242 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 319 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 382 of file path.hh.

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

Return number of entries on stack.

Definition at line 256 of file path.hh.

size_t Gecode::Search::Parallel::Path::size ( void   )  const [inline]

Return size used.

Definition at line 261 of file path.hh.

void Gecode::Search::Parallel::Path::reset ( void   )  [inline]

Reset stack.

Definition at line 278 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 285 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 290 of file path.hh.


Member Data Documentation

Stack to store edge information.

Definition at line 101 of file path.hh.

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

Number of edges that have work for stealing.

Definition at line 103 of file path.hh.


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