Generated on Mon Jul 6 18:09:37 2009 for Gecode by doxygen 1.5.9

Gecode::Search::Sequential::Path Class Reference

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

#include <path.hh>

List of all members.

Classes

class  Node
 Search tree node for recomputation More...

Public Member Functions

 Path (void)
 Initialize.
const BranchingDescpush (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.
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.

Public Attributes

Support::DynamicStack< Node, Heapds
 Stack to store node information.


Detailed Description

Depth-first path (stack of nodes) 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::Sequential::Path::Path ( void   )  [inline]

Initialize.

Definition at line 174 of file path.hh.


Member Function Documentation

const BranchingDesc * Gecode::Search::Sequential::Path::push ( Worker stat,
Space s,
Space c 
) [inline]

Push space c (a clone of s or NULL).

Definition at line 177 of file path.hh.

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

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

Definition at line 185 of file path.hh.

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

Return position on stack of last copy.

Definition at line 205 of file path.hh.

void Gecode::Search::Sequential::Path::unwind ( int  l  )  [inline]

Unwind the stack up to position l (after failure).

Definition at line 223 of file path.hh.

void Gecode::Search::Sequential::Path::commit ( Space s,
int  i 
) const [inline]

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

Definition at line 199 of file path.hh.

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

Recompute space according to path.

Definition at line 238 of file path.hh.

Space * Gecode::Search::Sequential::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 301 of file path.hh.

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

Return number of entries on stack.

Definition at line 213 of file path.hh.

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

Return size used.

Definition at line 218 of file path.hh.

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

Reset stack.

Definition at line 232 of file path.hh.


Member Data Documentation

Stack to store node information.

Definition at line 94 of file path.hh.


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