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

Gecode::Int::GCC::Dom< View, Card, isView > Class Template Reference
[Integer propagators]

#include <gcc.hh>

Inherits Gecode::Propagator.

List of all members.


Detailed Description

template<class View, class Card, bool isView>
class Gecode::Int::GCC::Dom< View, Card, isView >

Domain-consistent global cardinality propagator.

[Reference]
The algorithm is taken from:
     @PROCEEDINGS{improvedgcc,
     title     = {Improved Algorithms for the
                  Global Cardinality Constraint},
     year      = {2004},
     volume    = {3528},
     address   = {Toronto, Canada},
     month     = {September},
     author    = {Claude-Guy Quimper and Peter van Beek and
                  Alejandro López-Ortiz and Alexander Golynski},
     booktitle = {Proceedings of the 10th International
                  Conference on Principles and Practice of
		  Constraint Programming},
     url       = {http://ai.uwaterloo.ca/~vanbeek/publications},
     }
     
Requires
 #include "gecode/int/gcc.hh" 

Definition at line 206 of file gcc.hh.

Public Member Functions

virtual size_t dispose (Space *home)
 Destructor including deallocation of variable-value graph.
virtual void flush (void)
 Flush variable-value graph.
virtual Actorcopy (Space *home, bool share)
 Copy propagator during cloning.
virtual PropCost cost (void) const
 Cost function.
virtual ExecStatus propagate (Space *home)
 Perform domain propagation.

Static Public Member Functions

static ExecStatus post (Space *home, ViewArray< View > &x, ViewArray< Card > &k, bool all)
 Post propagator for views x and cardinalities k.

Protected Member Functions

 Dom (Space *home, bool share, Dom< View, Card, isView > &p)
 Constructor for cloning p.
 Dom (Space *home, ViewArray< View > &, ViewArray< Card > &, bool, bool)
 Constructor for posting.

Protected Attributes

ViewArray< View > x
 Views on which to perform domain-propagation.
ViewArray< View > y
 Views used to channel information between x and k ($ x \subseteq y $ ).
ViewArray< Card > k
 Array containing either fixed cardinalities or CardViews.
VarValGraph< View, Card, isView > * vvg
 Propagation is performed on a variable-value graph (used as cache).
bool card_fixed
 Stores whether cardinalities are all assigned.
bool card_all
 Stores whether all values in domains of the x-views are used for cardinality reasoning or whether we only use a subset of them.


Constructor & Destructor Documentation

template<class View, class Card, bool isView>
Gecode::Int::GCC::Dom< View, Card, isView >::Dom Space home,
bool  share,
Dom< View, Card, isView > &  p
[inline, protected]
 

Constructor for cloning p.

Definition at line 62 of file dom.icc.

template<class View, class Card, bool isView>
Gecode::Int::GCC::Dom< View, Card, isView >::Dom Space home,
ViewArray< View > &  ,
ViewArray< Card > &  ,
bool  ,
bool 
[inline, protected]
 

Constructor for posting.

Definition at line 50 of file dom.icc.


Member Function Documentation

template<class View, class Card, bool isView>
size_t Gecode::Int::GCC::Dom< View, Card, isView >::dispose Space home  )  [virtual]
 

Destructor including deallocation of variable-value graph.

Reimplemented from Gecode::Actor.

Definition at line 73 of file dom.icc.

template<class View, class Card, bool isView>
void Gecode::Int::GCC::Dom< View, Card, isView >::flush void   )  [virtual]
 

Flush variable-value graph.

Reimplemented from Gecode::Actor.

Definition at line 85 of file dom.icc.

template<class View, class Card, bool isView>
Actor * Gecode::Int::GCC::Dom< View, Card, isView >::copy Space home,
bool  share
[virtual]
 

Copy propagator during cloning.

Implements Gecode::Actor.

Definition at line 92 of file dom.icc.

template<class View, class Card, bool isView>
PropCost Gecode::Int::GCC::Dom< View, Card, isView >::cost void   )  const [virtual]
 

Cost function.

As the propagation stronlgy depends on the domain size of the views on which propagation is performed, the propagation costs are computed as follows, where d denotes the size of the largest domain of a view in x:

  • dynamic PC_LINEAR_LO ( $ d < 6$ )
  • dynamic PC_LINEAR_HI ( $ 6 \leq d < \frac{n}{2} $ )
  • dynamic PC_QUADRATIC_LO ( $ \frac{n}{2} \leq d < n^2 $ )
  • dynamic PC_CUBIC_LO ( $ n^2 \leq d $ )

Implements Gecode::Propagator.

Definition at line 98 of file dom.icc.

template<class View, class Card, bool isView>
ExecStatus Gecode::Int::GCC::Dom< View, Card, isView >::propagate Space home  )  [virtual]
 

Perform domain propagation.

Implements Gecode::Propagator.

Definition at line 130 of file dom.icc.

template<class View, class Card, bool isView>
ExecStatus Gecode::Int::GCC::Dom< View, Card, isView >::post Space home,
ViewArray< View > &  x,
ViewArray< Card > &  k,
bool  all
[inline, static]
 

Post propagator for views x and cardinalities k.

all denotes whether the propagator uses all value occuring in the domains of the problem vies specified in x.

Definition at line 487 of file dom.icc.


Member Data Documentation

template<class View, class Card, bool isView>
ViewArray<View> Gecode::Int::GCC::Dom< View, Card, isView >::x [protected]
 

Views on which to perform domain-propagation.

Definition at line 209 of file gcc.hh.

template<class View, class Card, bool isView>
ViewArray<View> Gecode::Int::GCC::Dom< View, Card, isView >::y [protected]
 

Views used to channel information between x and k ($ x \subseteq y $ ).

Definition at line 214 of file gcc.hh.

template<class View, class Card, bool isView>
ViewArray<Card> Gecode::Int::GCC::Dom< View, Card, isView >::k [protected]
 

Array containing either fixed cardinalities or CardViews.

Definition at line 216 of file gcc.hh.

template<class View, class Card, bool isView>
VarValGraph<View, Card, isView>* Gecode::Int::GCC::Dom< View, Card, isView >::vvg [protected]
 

Propagation is performed on a variable-value graph (used as cache).

Definition at line 218 of file gcc.hh.

template<class View, class Card, bool isView>
bool Gecode::Int::GCC::Dom< View, Card, isView >::card_fixed [protected]
 

Stores whether cardinalities are all assigned.

If all cardinalities are assigned the propagation algorithm only has to perform propagation for the upper bounds.

Definition at line 225 of file gcc.hh.

template<class View, class Card, bool isView>
bool Gecode::Int::GCC::Dom< View, Card, isView >::card_all [protected]
 

Stores whether all values in domains of the x-views are used for cardinality reasoning or whether we only use a subset of them.

Definition at line 230 of file gcc.hh.


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