Main Page | Class Hierarchy | Class List | File List | Class Members

Retraction Class Reference

#include <Retraction.h>

Inheritance diagram for Retraction:

CBJ Chronological List of all members.

Public Member Functions

 Retraction (const wstring &name, Problem &problem)
const wstring & name () const
 Return the retraction's name.
const Problemproblem () const
 Return the problem to solve.
Problemproblem ()
 Return the problem to solve.
const Decompositiondecomposition () const
 Return the decomposition to which the retraction reports.
Decompositiondecomposition ()
 Return the decomposition to which the retraction reports.
const Filterfilter () const
 Return the monitored filter.
Filterfilter ()
 Return the monitored filter.
virtual void init ()
virtual void done ()
virtual void start ()
virtual void stop ()
virtual void recordDomainChange (Variable &victim, Variable &aggressor)=0
virtual void recordFailure (Constraint &constraint, Variable &victim, Variable &aggressor)=0
virtual void unifyConflictSets (int)
virtual void eraseConflictSets (int)
virtual int computeJump (bool chronological=true) const =0
virtual wostream & print (wostream &wos) const

Protected Attributes

Problemm_problem
Decompositionm_decomposition
Filterm_filter

Friends

class Decomposition
CSP_API wostream & operator<< (wostream &wos, const Retraction &retraction)

Detailed Description

A retraction is an object that monitors the changes performed by the filter in order to guide the back jumping process.


Member Function Documentation

virtual int Retraction::computeJump bool  chronological = true  )  const [pure virtual]
 

Return the back jumping depth based on the conflict set of the variables modified at the current depth. We have to parse all of them and select the deepest variable that could have caused a conflict.

Parameters:
chronological if `true', this function returns the depth corresponding to a chronological back jump.

Implemented in CBJ, and Chronological.

virtual void Retraction::done  )  [inline, virtual]
 

This function cleans up the retraction after a search.

Reimplemented in CBJ.

virtual void Retraction::eraseConflictSets int   )  [inline, virtual]
 

Erase the conflict sets of all the variables whose modification depth is greater than the depth we want to jump to and less than or equal to the current depth.

Parameters:
jumpDepth the depth we want to jump to.

Reimplemented in CBJ.

virtual void Retraction::init  )  [inline, virtual]
 

This function prepares the retraction for a new search.

Reimplemented in CBJ.

virtual wostream& Retraction::print wostream &  wos  )  const [inline, virtual]
 

Print information about the monitor at the given stream.

Parameters:
wos the output stream to print to.
Returns:
the given stream.

Reimplemented in CBJ.

virtual void Retraction::recordDomainChange Variable victim,
Variable aggressor
[pure virtual]
 

Notify the monitor that values have been removed from the domain of `victim' (but no dwo='domain wipe out'). This function adds to the conflict set of `victim' all the variables modified at the current depth of the search.

Parameters:
victim the variable whose domain has changed.
aggressor the variable that caused the domain change.

Implemented in CBJ, and Chronological.

virtual void Retraction::recordFailure Constraint constraint,
Variable victim,
Variable aggressor
[pure virtual]
 

Record a failure in the filter.

Parameters:
constraint the constraint causing the failure.
victim the variable whose domain has been wiped out.
aggressor the variable that caused the domain wipe out.

Implemented in CBJ, and Chronological.

virtual void Retraction::start  )  [inline, virtual]
 

This function should be called before the constraint propagation.

Reimplemented in CBJ.

virtual void Retraction::stop  )  [inline, virtual]
 

This function should be called after the constraint propagation.

Reimplemented in CBJ.

virtual void Retraction::unifyConflictSets int   )  [inline, virtual]
 

Merge the conflict sets of all the variables modified at the current depth in all the variables modified at the depth we want to jump to.

Parameters:
jumpDepth the depth we want to jump to.

Reimplemented in CBJ.


Friends And Related Function Documentation

friend class Decomposition [friend]
 

We give the Decomposition class access to this, to simplify the interface. This used to be part of Decomposition anyway, and it is only used there.


The documentation for this class was generated from the following file:
Generated on Wed May 25 12:21:21 2005 for csp.kdevelop by  doxygen 1.3.9.1