Link Search Menu Expand Document
Specifications PyCSP3 Tools Instances Competitions About

Constraint AllEqual

The constraint allEqual ensures that all involved variables take the same value.

allEqual($X$) with $X=\langle x_1,x_2,\ldots \rangle$, iff $\forall (i, j) : 1 \leq i \lt j \leq |X|, x_i = x_j$

Syntax

<allEqual>
  <list> (intVar wspace)2+ </list>
</allEqual>

Note that the opening and closing tags of list are optional, which gives:

Syntax

<allEqual> (intVar wspace)2+ </allEqual>   <!-- Simplified Form -->

Example

<allEqual> 
  x1 x2 x3 x4 x5
</allEqual>