5.224. neq

DESCRIPTIONLINKS
Origin

Arithmetic.

Constraint

𝚗𝚎𝚚(𝚅𝙰𝚁1,𝚅𝙰𝚁2)

Synonym

𝚛𝚎𝚕.

Arguments
𝚅𝙰𝚁1𝚍𝚟𝚊𝚛
𝚅𝙰𝚁2𝚍𝚟𝚊𝚛
Purpose

Enforce the fact that two variables are not equal.

Example
(1,8)

The 𝚗𝚎𝚚 constraint holds since 1 is not equal to 8.

Symmetries
  • Arguments are permutable w.r.t. permutation (𝚅𝙰𝚁1,𝚅𝙰𝚁2).

  • A value in 𝚅𝙰𝚁1 or 𝚅𝙰𝚁2 can be renamed to any unused value.

Systems

neq in Choco, rel in Gecode, #\= in SICStus.

See also

common keyword: 𝚐𝚎𝚚, 𝚕𝚎𝚚 (binary constraint,arithmetic constraint).

generalisation: 𝚗𝚎𝚚_𝚌𝚜𝚝 (𝚌𝚘𝚗𝚜𝚝𝚊𝚗𝚝 added), 𝚗𝚘𝚝_𝚊𝚕𝚕_𝚎𝚚𝚞𝚊𝚕.

implied by: 𝚐𝚝, 𝚕𝚝.

negation: 𝚎𝚚.

system of constraints: 𝚊𝚕𝚕𝚍𝚒𝚏𝚏𝚎𝚛𝚎𝚗𝚝.

Keywords

constraint arguments: binary constraint.

constraint type: predefined constraint, arithmetic constraint.

filtering: arc-consistency.