Generated on Tue Dec 13 2011 10:02:32 for Gecode by doxygen 1.7.4
Counting constraints

Functions

void Gecode::count (Home home, const IntVarArgs &x, int n, IntRelType r, int m, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r m$.
void Gecode::count (Home home, const IntVarArgs &x, const IntSet &y, IntRelType r, int m, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r m$.
void Gecode::count (Home home, const IntVarArgs &x, IntVar y, IntRelType r, int m, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r m$.
void Gecode::count (Home home, const IntVarArgs &x, const IntArgs &y, IntRelType r, int m, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r m$.
void Gecode::count (Home home, const IntVarArgs &x, int n, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r z$.
void Gecode::count (Home home, const IntVarArgs &x, const IntSet &y, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r z$.
void Gecode::count (Home home, const IntVarArgs &x, IntVar y, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r z$.
void Gecode::count (Home home, const IntVarArgs &x, const IntArgs &y, IntRelType r, IntVar z, IntConLevel icl=ICL_DEF)
 Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r z$.
void Gecode::count (Home home, const IntVarArgs &x, const IntVarArgs &c, IntConLevel icl=ICL_DEF)
 Posts a global count (cardinality) constraint.
void Gecode::count (Home home, const IntVarArgs &x, const IntSetArgs &c, IntConLevel icl=ICL_DEF)
 Posts a global count (cardinality) constraint.
void Gecode::count (Home home, const IntVarArgs &x, const IntVarArgs &c, const IntArgs &v, IntConLevel icl=ICL_DEF)
 Posts a global count (cardinality) constraint.
void Gecode::count (Home home, const IntVarArgs &x, const IntSetArgs &c, const IntArgs &v, IntConLevel icl=ICL_DEF)
 Posts a global count (cardinality) constraint.
void Gecode::count (Home home, const IntVarArgs &x, const IntSet &c, const IntArgs &v, IntConLevel icl=ICL_DEF)
 Posts a global count (cardinality) constraint.

Detailed Description

Note:
Domain consistency on the extended cardinality variables of the Global Cardinality Propagator is only obtained if they are bounds consistent, otherwise the problem of enforcing domain consistency on the cardinality variables is NP-complete as proved by Qumiper et. al. in ''Improved Algorithms for the Global Cardinality Constraint''.

Function Documentation

void Gecode::count ( Home  home,
const IntVarArgs &  x,
int  n,
IntRelType  r,
int  m,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r m$.

Supports domain consistent propagation only.

Definition at line 44 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntSet &  y,
IntRelType  r,
int  m,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r m$.

Supports domain consistent propagation only.

Definition at line 138 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
IntVar  y,
IntRelType  r,
int  m,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r m$.

Supports domain consistent propagation (icl = ICL_DOM, default) and "almost" domain consistent propagation (all other values for icl), where y is not pruned.

Definition at line 86 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntArgs &  y,
IntRelType  r,
int  m,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r m$.

Supports domain consistent propagation only.

Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.

Definition at line 182 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
int  n,
IntRelType  r,
IntVar  z,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=n\}\sim_r z$.

Supports domain consistent propagation only.

Definition at line 226 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntSet &  y,
IntRelType  r,
IntVar  z,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i\in y\}\sim_r z$.

Supports domain consistent propagation only.

Definition at line 320 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
IntVar  y,
IntRelType  r,
IntVar  z,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y\}\sim_r z$.

Supports domain consistent propagation (icl = ICL_DOM, default) and "almost" domain consistent propagation (all other values for icl), where y is not pruned.

Definition at line 268 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntArgs &  y,
IntRelType  r,
IntVar  z,
IntConLevel  icl = ICL_DEF 
)

Post propagator for $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=y_i\}\sim_r z$.

Supports domain consistent propagation only.

Throws an exception of type Int::ArgumentSizeMismatch, if x and y are of different size.

Definition at line 369 of file count.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntVarArgs &  c,
IntConLevel  icl = ICL_DEF 
)

Posts a global count (cardinality) constraint.

Posts the constraint that $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=j\}=c_j$ and $ \bigcup_i \{x_i\} \subseteq \{0,\ldots,|c|-1\}$ (no other value occurs).

Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.

Definition at line 80 of file gcc.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntSetArgs &  c,
IntConLevel  icl = ICL_DEF 
)

Posts a global count (cardinality) constraint.

Posts the constraint that $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=j\}\in c_j$ and $ \bigcup_i \{x_i\} \subseteq \{0,\ldots,|c|-1\}$ (no other value occurs).

Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.

Definition at line 153 of file gcc.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntVarArgs &  c,
const IntArgs &  v,
IntConLevel  icl = ICL_DEF 
)

Posts a global count (cardinality) constraint.

Posts the constraint that $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}=c_j$ and $ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}$ (no other value occurs).

Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.

Throws an exception of type Int::ArgumentSizeMismatch, if c and v are of different size.

Definition at line 48 of file gcc.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntSetArgs &  c,
const IntArgs &  v,
IntConLevel  icl = ICL_DEF 
)

Posts a global count (cardinality) constraint.

Posts the constraint that $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}\in c_j$ and $ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}$ (no other value occurs).

Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.

Throws an exception of type Int::ArgumentSizeMismatch, if c and v are of different size.

Definition at line 89 of file gcc.cpp.

void Gecode::count ( Home  home,
const IntVarArgs &  x,
const IntSet &  c,
const IntArgs &  v,
IntConLevel  icl = ICL_DEF 
)

Posts a global count (cardinality) constraint.

Posts the constraint that $\#\{i\in\{0,\ldots,|x|-1\}\;|\;x_i=v_j\}\in c$ and $ \bigcup_i \{x_i\} \subseteq \bigcup_j \{v_j\}$ (no other value occurs).

Supports value (icl = ICL_VAL, default), bounds (icl = ICL_BND), and domain consistency (icl = ICL_DOM).

Throws an exception of type Int::ArgumentSame, if x contains the same unassigned variable multiply.

Throws an exception of type Int::ArgumentSizeMismatch, if c and v are of different size.

Definition at line 161 of file gcc.cpp.