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

Sorting constraints
[Using finite domain integers]

Collaboration diagram for Sorting constraints:


Detailed Description

Note:
The Sortedness propagator described in this section only supports bounds-consistency no matter what value for the argument icl is given!


Functions

void Gecode::sortedness (Space *home, const IntVarArgs &x, const IntVarArgs &y, IntConLevel icl=ICL_DEF)
 Post propagator $\exists\pi:\forall i\in\{0,\dots,|x|-1\}: y_0 \leq\dots\leq y_{|x|-1} \wedge x_i=y_{\pi(i)}$.
void Gecode::sortedness (Space *, const IntVarArgs &x, const IntVarArgs &y, const IntVarArgs &z, IntConLevel icl=ICL_DEF)
 Post propagator $\forall i\in\{0,\dots,|x|-1\}: y_0 \leq\dots\leq y_{|x|-1} \wedge x_i=y_{z_i} $
.


Function Documentation

void Gecode::sortedness Space *  home,
const IntVarArgs x,
const IntVarArgs y,
IntConLevel  icl = ICL_DEF
 

Post propagator $\exists\pi:\forall i\in\{0,\dots,|x|-1\}: y_0 \leq\dots\leq y_{|x|-1} \wedge x_i=y_{\pi(i)}$.

Exceptions:
Int::ArgumentSizeMismatch thrown if x and y differ in size.
Int::ArgumentSame thrown if x or y contain shared variables.
Taking only two arguments, this interface for Sortedness leaves the sorting permutation $\pi$ implicit.

Definition at line 26 of file sortedness.cc.

void Gecode::sortedness Space *  ,
const IntVarArgs x,
const IntVarArgs y,
const IntVarArgs z,
IntConLevel  icl = ICL_DEF
 

Post propagator $\forall i\in\{0,\dots,|x|-1\}: y_0 \leq\dots\leq y_{|x|-1} \wedge x_i=y_{z_i} $
.

Exceptions:
Int::ArgumentSizeMismatch thrown if x, y or z differ in size.
Int::ArgumentSame thrown if x, y or z contain shared variables.
Providing a third argument $z_0, \dots, z_{|x|-1} $ , this interface for Sortedness models the sorting permutation $\pi$ explicitly, such that $\forall i\in\{0,\dots,|x|-1\}:\pi(i) = z_i$ holds.

Definition at line 66 of file sortedness.cc.