Generated on Wed Nov 1 15:05:22 2006 for Gecode by doxygen 1.4.5

Gecode::Search::ReCoStack Class Reference

#include <search.hh>

List of all members.


Detailed Description

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 stack 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 278 of file search.hh.

Public Member Functions

 ReCoStack (unsigned int a_d)
 Initialize with adaptive recomputation distance a_d.
const BranchingDescpush (Space *s, Space *c)
 Push space c (a clone of s or NULL).
bool next (EngineCtrl &s)
 Generate path for next node and return whether a next node exists.
int lc (Space *&s) 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.
template<bool constrained>
Spacerecompute (unsigned int &d, EngineCtrl &s)
 Recompute space according to path with copying distance d.
int entries (void) const
 Return number of entries on stack.
size_t stacksize (void) const
 Return stack size used.
void reset (void)
 Reset stack.


Constructor & Destructor Documentation

Gecode::Search::ReCoStack::ReCoStack unsigned int  a_d  )  [inline]
 

Initialize with adaptive recomputation distance a_d.

Definition at line 74 of file reco-stack.icc.


Member Function Documentation

const BranchingDesc * Gecode::Search::ReCoStack::push Space s,
Space c
[inline]
 

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

Definition at line 77 of file reco-stack.icc.

bool Gecode::Search::ReCoStack::next EngineCtrl s  )  [inline]
 

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

Definition at line 84 of file reco-stack.icc.

int Gecode::Search::ReCoStack::lc Space *&  s  )  const [inline]
 

Return position on stack of last copy.

Definition at line 104 of file reco-stack.icc.

void Gecode::Search::ReCoStack::unwind int  l  )  [inline]
 

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

Definition at line 123 of file reco-stack.icc.

void Gecode::Search::ReCoStack::commit Space s,
int  i
const [inline]
 

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

Definition at line 98 of file reco-stack.icc.

template<bool constrained>
Space * Gecode::Search::ReCoStack::recompute unsigned int &  d,
EngineCtrl s
[inline]
 

Recompute space according to path with copying distance d.

The template parameter constrained describes whether the stack might contain spaces not propagated (from constraining during branch-and-bound).

Definition at line 139 of file reco-stack.icc.

int Gecode::Search::ReCoStack::entries void   )  const [inline]
 

Return number of entries on stack.

Definition at line 113 of file reco-stack.icc.

size_t Gecode::Search::ReCoStack::stacksize void   )  const [inline]
 

Return stack size used.

Definition at line 118 of file reco-stack.icc.

void Gecode::Search::ReCoStack::reset void   )  [inline]
 

Reset stack.

Definition at line 132 of file reco-stack.icc.


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