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

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,n-1\}: y_0 \leq\dots\leq y_{n-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,n-1\}: y_0 \leq\dots\leq y_{n-1} \wedge x_i=y_{z_i} $
.


Function Documentation

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

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

Taking only two arguments, this interface for Sortedness leaves the sorting permutation $\pi$ implicit.

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

Definition at line 26 of file sortedness.cc.

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

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

Providing a third argument $z_0, \dots, z_{n-1} $, this interface for Sortedness models the sorting permutation $\pi$ explicitly, such that $\forall i\in\{0,\dots,n-1\}:\pi(i) = z_i$ holds.

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

Definition at line 63 of file sortedness.cc.