Gecode::Int::Distinct::Bnd< View > Class Template Reference
[Integer propagators]
#include <distinct.hh>
Inherits Gecode::Propagator.
Detailed Description
template<class View>
class Gecode::Int::Distinct::Bnd< View >
Boundsconsistent distinct propagator.
The propagator uses staging: first it uses naive valuebased propagation and only then uses boundsconsistent propagation. Due to using naive valuebased propagation, the propagator might actually achieve stronger consistency than just boundsconsistency.
The algorithm is taken from: A. LopezOrtiz, C.G. Quimper, J. Tromp, and P. van Beek. A fast and simple algorithm for bounds consistency of the alldifferent constraint. IJCAI2003.
This implementation uses the code that is provided by Peter Van Beek: http://ai.uwaterloo.ca/~vanbeek/software/software.html The code (originally by John Tromp) here has only been slightly modified to fit Gecode (taking idempotent/nonidempotent propagation into account) and uses a more efficient layout of datastructures (keeping the number of different arrays small).
Requires
#include "gecode/int/distinct.hh"
Definition at line 112 of file distinct.hh.
Public Member Functions  
virtual ExecStatus  propagate (Space *home) 
Perform propagation.  
virtual PropCost  cost (void) const 
Cost function.  
virtual Actor *  copy (Space *home, bool share) 
Copy propagator during cloning.  
virtual size_t  dispose (Space *home) 
Destructor.  
Static Public Member Functions  
static ExecStatus  post (Space *home, ViewArray< View > &x) 
Post propagator for view array x.  
Protected Member Functions  
Bnd (Space *home, ViewArray< View > &x)  
Constructor for posting.  
Bnd (Space *home, bool share, Bnd< View > &p)  
Constructor for cloning p.  
Protected Attributes  
ViewArray< View >  x 
Views on which to perform boundspropagation.  
ViewArray< View >  y 
Views on which to perform valuepropagation (subset of x ). 
Constructor & Destructor Documentation

Constructor for posting.


Constructor for cloning p.

Member Function Documentation

Post propagator for view array x.


Perform propagation.
Implements Gecode::Propagator. 

Cost function. If in stage for naive value propagation, the cost is dynamic PC_LINEAR_LO. Otherwise it is dynamic PC_LINEAR_HI. Implements Gecode::Propagator. 

Copy propagator during cloning.
Implements Gecode::Actor. 

Destructor.
Reimplemented from Gecode::Actor. 
Member Data Documentation

Views on which to perform boundspropagation.
Definition at line 115 of file distinct.hh. 

Views on which to perform valuepropagation (subset of
Definition at line 117 of file distinct.hh. 
The documentation for this class was generated from the following files:
 gecode/int/distinct.hh (Revision: 3768)
 gecode/int/distinct/bnd.icc (Revision: 3768)