Gecode::Int::GCC::Dom< View, Card, isView > Class Template Reference
[Integer propagators]
#include <gcc.hh>
Inherits Gecode::Propagator.
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}, }
#include "gecode/int/gcc.hh"
Definition at line 207 of file gcc.hh.
Public Member Functions | |
virtual size_t | dispose (Space *home) |
Destructor including deallocation of variable-value graph. | |
virtual size_t | allocated (void) const |
Return how much extra memory is allocated by the propagator. | |
virtual Actor * | copy (Space *home, bool share) |
Copy propagator during cloning. | |
virtual PropCost | cost (ModEventDelta med) const |
Cost function. | |
virtual ExecStatus | propagate (Space *home, ModEventDelta med) |
Perform propagation. | |
virtual Reflection::ActorSpec | spec (const Space *home, Reflection::VarMap &m) const |
Specification for this propagator. | |
Static Public Member Functions | |
static void | post (Space *home, Reflection::VarMap &vars, const Reflection::ActorSpec &spec) |
Post propagator according to specification. | |
static Support::Symbol | ati (void) |
Name of this propagator. | |
static ExecStatus | post (Space *home, ViewArray< View > &x, ViewArray< Card > &k) |
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) | |
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 (). | |
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. |
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] |
template<class View, class Card, bool isView>
Gecode::Int::GCC::Dom< View, Card, isView >::Dom | ( | Space * | home, | |
ViewArray< View > & | x0, | |||
ViewArray< Card > & | k0, | |||
bool | cf | |||
) | [inline, protected] |
Member Function Documentation
template<class View, class Card, bool isView>
size_t Gecode::Int::GCC::Dom< View, Card, isView >::dispose | ( | Space * | home | ) | [inline, virtual] |
template<class View, class Card, bool isView>
size_t Gecode::Int::GCC::Dom< View, Card, isView >::allocated | ( | void | ) | const [inline, virtual] |
template<class View, class Card, bool isView>
Actor * Gecode::Int::GCC::Dom< View, Card, isView >::copy | ( | Space * | home, | |
bool | share | |||
) | [inline, virtual] |
template<class View, class Card, bool isView>
PropCost Gecode::Int::GCC::Dom< View, Card, isView >::cost | ( | ModEventDelta | med | ) | const [inline, 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 ( )
- dynamic PC_LINEAR_HI ( )
- dynamic PC_QUADRATIC_LO ( )
- dynamic PC_CUBIC_LO ( )
Implements Gecode::Propagator.
template<class View, class Card, bool isView>
ExecStatus Gecode::Int::GCC::Dom< View, Card, isView >::propagate | ( | Space * | home, | |
ModEventDelta | med | |||
) | [inline, virtual] |
template<class View, class Card, bool isView>
Reflection::ActorSpec Gecode::Int::GCC::Dom< View, Card, isView >::spec | ( | const Space * | home, | |
Reflection::VarMap & | m | |||
) | const [inline, virtual] |
template<class View, class Card, bool isView>
void Gecode::Int::GCC::Dom< View, Card, isView >::post | ( | Space * | home, | |
Reflection::VarMap & | vars, | |||
const Reflection::ActorSpec & | spec | |||
) | [inline, static] |
template<class View, class Card, bool isView>
Support::Symbol Gecode::Int::GCC::Dom< View, Card, isView >::ati | ( | void | ) | [inline, static] |
template<class View, class Card, bool isView>
ExecStatus Gecode::Int::GCC::Dom< View, Card, isView >::post | ( | Space * | home, | |
ViewArray< View > & | x, | |||
ViewArray< Card > & | k | |||
) | [inline, static] |
Member Data Documentation
template<class View, class Card, bool isView>
ViewArray<View> Gecode::Int::GCC::Dom< View, Card, isView >::x [protected] |
template<class View, class Card, bool isView>
ViewArray<View> Gecode::Int::GCC::Dom< View, Card, isView >::y [protected] |
template<class View, class Card, bool isView>
ViewArray<Card> Gecode::Int::GCC::Dom< View, Card, isView >::k [protected] |
template<class View, class Card, bool isView>
VarValGraph<View, Card, isView>* Gecode::Int::GCC::Dom< View, Card, isView >::vvg [protected] |
template<class View, class Card, bool isView>
bool Gecode::Int::GCC::Dom< View, Card, isView >::card_fixed [protected] |
The documentation for this class was generated from the following files:
- gecode/int/gcc.hh (Revision: 7285)
- gecode/int/gcc/dom.icc (Revision: 7289)