Generated on Wed Jan 4 17:49:15 2006 for Gecode by doxygen 1.4.6

gcc.cc File Reference

(Revision: 2696)

#include "int/gcc.hh"
#include "int/linear.hh"
#include "int/distinct.hh"

Go to the source code of this file.

Namespaces

namespace  Gecode
namespace  Gecode::Int
namespace  Gecode::Int::GCC

Functions

template<class Card>
bool Gecode::Int::GCC::check_alldiff (int n, Card &k)
 Check whether gcc can be rewritten to distinct.
template<class View>
void Gecode::Int::GCC::x_setidx (ViewArray< View > &x)
 Set the index of every variable to its initial position in x.
template<class View>
int Gecode::Int::GCC::x_card (ViewArray< View > &x)
 Compute the cardinality of the union of all variable domains in x.
template<class Card, class View>
void Gecode::Int::GCC::initcard (Space *home, ViewArray< View > &x, Card &k, int lb, int ub)
 Initialize the cardinalities for the values in k.
template<class Card, class View, bool isView>
void Gecode::Int::GCC::setcard (Space *home, ViewArray< View > &x, Card &k, int xmin, int xmax)
 Reset already existing cardinalities to zero.
template<class Card, bool isView>
ExecStatus Gecode::Int::GCC::card_cons (Space *home, Card &k, int n)
 Check whether the cardinalities are consistent.
template<class View, class Card, bool isView>
void Gecode::Int::GCC::post_template (Space *home, ViewArray< View > &x, Card &k, IntConLevel &icl)
 Template to post the global cardinality constraint for the different interfaces.
void Gecode::gcc (Space *home, const IntVarArgs &x, const IntArgs &c, int m, int unspec_low, int unspec_up, int min, int max, IntConLevel icl)
 Post propagator for

\begin{eqnarray*} \forall t=(v, lb, ub) \in c: & & lb \leq \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} \leq ub \\ \forall t=(v, unspec_{low}, unspec_{up}) \not\in c: & & unspec_{low} \leq \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} \leq unspec_{up} \end{eqnarray*}

.

void Gecode::gcc (Space *home, const IntVarArgs &x, const IntArgs &c, int m, int unspec, int min, int max, IntConLevel icl)
 Post propagator for

\begin{eqnarray*} \forall t=(v, lb, ub) \in c: & & lb \leq \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} \leq ub \\ \forall t=(v, 0, unspec) \not\in c: & & 0 \leq \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} \leq unspec \end{eqnarray*}

.

void Gecode::gcc (Space *home, const IntVarArgs &x, int lb, int ub, IntConLevel cl)
 Post propagator for $ \forall v \in \displaystyle \bigcup_{i\in\{0, \dots, |x|-1\}} dom(x_i): lb \leq \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} \leq ub $.
void Gecode::gcc (Space *home, const IntVarArgs &x, int ub, IntConLevel cl)
 Post propagator for $ \forall v \in \displaystyle \bigcup_{i\in\{0, \dots, |x|-1\}} dom(x_i): lb = \#\{i\in\{0, \dots, |x| - 1\} | x_i = v\} = ub $.
void Gecode::gcc (Space *home, const IntVarArgs &x, const IntVarArgs &c, int min, int max, IntConLevel cl)
 Post propagator for $ \forall j \in \{0, \dots, |[min;max]| - 1\}: \#\{i\in\{0, \dots, |x| - 1\} | x_i = v_j\} = c_j \wedge v_j \in [min;max]$.
void Gecode::gcc (Space *home, const IntVarArgs &x, const IntArgs &v, const IntVarArgs &c, int m, int unspec, bool all, int min, int max, IntConLevel icl)
 Post propagator for $ \forall j \in \{0, \dots, |v| - 1\}: \#\{i\in\{0, \dots, |x| - 1\} | x_i = v_j\} = c_j $.
void Gecode::gcc (Space *home, const IntVarArgs &x, const IntArgs &v, const IntVarArgs &c, int m, int unspec_low, int unspec_up, bool all, int min, int max, IntConLevel icl)
 Post propagator for $ \forall j \in \{0, \dots, |v| - 1\}: \#\{i\in\{0, \dots, |x| - 1\} | x_i = v_j\} = c_j $.